/branches/arm/defaults/sparc64/us3/Makefile.config |
---|
File deleted |
/branches/arm/defaults/sparc64/output |
---|
File deleted |
\ No newline at end of file |
/branches/arm/defaults/sparc64/Makefile.config |
---|
File deleted |
/branches/arm/defaults/sparc64/serengeti/Makefile.config |
---|
File deleted |
/branches/arm/defaults/sparc64/us/Makefile.config |
---|
File deleted |
/branches/arm/defaults/ia64/i460GX/Makefile.config |
---|
File deleted |
/branches/arm/defaults/ia64/Makefile.config |
---|
File deleted |
/branches/arm/defaults/ia64/ski/Makefile.config |
---|
File deleted |
/branches/arm/defaults/ia64/output |
---|
File deleted |
\ No newline at end of file |
/branches/arm/defaults/arm32/output |
---|
File deleted |
\ No newline at end of file |
/branches/arm/defaults/arm32/Makefile.config |
---|
File deleted |
/branches/arm/defaults/ppc32/output |
---|
File deleted |
\ No newline at end of file |
/branches/arm/defaults/ppc32/Makefile.config |
---|
File deleted |
/branches/arm/defaults/amd64/output |
---|
File deleted |
\ No newline at end of file |
/branches/arm/defaults/amd64/Makefile.config |
---|
File deleted |
/branches/arm/defaults/mips32/output |
---|
File deleted |
\ No newline at end of file |
/branches/arm/defaults/mips32/Makefile.config |
---|
File deleted |
/branches/arm/defaults/mips32/GXemul/Makefile.config |
---|
File deleted |
/branches/arm/defaults/mips32/msim/Makefile.config |
---|
File deleted |
/branches/arm/defaults/ia32/output |
---|
File deleted |
\ No newline at end of file |
/branches/arm/defaults/ia32/Makefile.config |
---|
File deleted |
/branches/arm/kernel/arch/arm32/include/machine_func.h |
---|
File deleted |
/branches/arm/kernel/arch/arm32/include/mach/testarm/testarm.h |
---|
File deleted |
/branches/arm/kernel/arch/arm32/include/mach/integratorcp/integratorcp.h |
---|
File deleted |
/branches/arm/kernel/arch/arm32/include/machine.h |
---|
0,0 → 1,147 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
* @brief Declarations of machine specific functions. |
* |
* These functions enable to differentiate more kinds of ARM emulators |
* or CPUs. It's the same concept as "arch" functions on the architecture |
* level. |
*/ |
#ifndef KERN_arm32_MACHINE_H_ |
#define KERN_arm32_MACHINE_H_ |
#include <console/console.h> |
#include <arch/types.h> |
#include <arch/exception.h> |
#ifdef MACHINE_GXEMUL_TESTARM |
#include <arch/drivers/gxemul.h> |
#endif |
#ifdef MACHINE_QEMU_ICP |
#include <arch/drivers/qemu.h> |
#endif |
/** Initializes console. |
* |
* @param devno Console device number. |
*/ |
extern void machine_console_init(devno_t devno); |
/** Acquire console back for kernel. */ |
extern void machine_grab_console(void); |
/** Return console to userspace. */ |
extern void machine_release_console(void); |
/** Maps HW devices to the kernel address space using #hw_map. */ |
extern void machine_hw_map_init(void); |
/** Starts timer. */ |
extern void machine_timer_irq_start(void); |
/** Halts CPU. */ |
extern void machine_cpu_halt(void); |
/** Returns size of available memory. |
* |
* @return Size of available memory. |
*/ |
extern size_t machine_get_memory_size(void); |
/** Prints a character. |
* |
* @param ch Character to be printed. |
*/ |
extern void machine_debug_putc(char ch); |
/** Initializes the Frame Buffer |
* |
*/ |
extern void machine_fb_init(void); |
/** Interrupt exception handler. |
* |
* @param exc_no Interrupt exception number. |
* @param istate Saved processor state. |
*/ |
extern void machine_irq_exception(int exc_no, istate_t *istate); |
/** Returns address of framebuffer device. |
* |
* @return Address of framebuffer device. |
*/ |
extern uintptr_t machine_get_fb_address(void); |
#ifdef MACHINE_GXEMUL_TESTARM |
#define machine_console_init(devno) gxemul_console_init(devno) |
#define machine_grab_console gxemul_grab_console |
#define machine_release_console gxemul_release_console |
#define machine_hw_map_init gxemul_hw_map_init |
#define machine_timer_irq_start gxemul_timer_irq_start |
#define machine_cpu_halt gxemul_cpu_halt |
#define machine_get_memory_size gxemul_get_memory_size |
#define machine_debug_putc(ch) gxemul_debug_putc(ch) |
#define machine_irq_exception(exc_no, istate) \ |
gxemul_irq_exception(exc_no, istate) |
#define machine_get_fb_address gxemul_get_fb_address |
#define machine_fb_init gxemul_fb_init |
#endif |
#ifdef MACHINE_QEMU_ICP |
#define machine_console_init(devno) qemu_icp_console_init(devno) |
#define machine_grab_console qemu_icp_grab_console |
#define machine_release_console qemu_icp_release_console |
#define machine_hw_map_init qemu_icp_hw_map_init |
#define machine_timer_irq_start qemu_icp_timer_irq_start |
#define machine_cpu_halt qemu_icp_cpu_halt |
#define machine_get_memory_size qemu_icp_get_memory_size |
#define machine_debug_putc(ch) qemu_icp_debug_putc(ch) |
#define machine_irq_exception(exc_no, istate) \ |
qemu_icp_irq_exception(exc_no, istate) |
#define machine_get_fb_address qemu_icp_get_fb_address |
#define machine_fb_init qemu_icp_fb_init |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/drivers/gxemul.h |
---|
0,0 → 1,80 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32gxemul GXemul |
* @brief GXemul machine specific parts. |
* @ingroup arm32 |
* @{ |
*/ |
/** @file |
* @brief GXemul peripheries drivers declarations. |
*/ |
#ifndef KERN_arm32_GXEMUL_H_ |
#define KERN_arm32_GXEMUL_H_ |
#include <console/chardev.h> |
/** Last interrupt number (beginning from 0) whose status is probed |
* from interrupt controller |
*/ |
#define GXEMUL_IRQC_MAX_IRQ 8 |
/** Timer frequency */ |
#define GXEMUL_TIMER_FREQ 100 |
/** Struct containing mappings of gxemul HW devices into kernel part |
* of virtual address space. |
*/ |
typedef struct { |
uintptr_t videoram; |
uintptr_t kbd; |
uintptr_t rtc; |
uintptr_t rtc_freq; |
uintptr_t rtc_ack; |
uintptr_t irqc; |
uintptr_t irqc_mask; |
uintptr_t irqc_unmask; |
} gxemul_hw_map_t; |
extern void gxemul_hw_map_init(void); |
extern void gxemul_console_init(devno_t devno); |
extern void gxemul_release_console(void); |
extern void gxemul_grab_console(void); |
extern void gxemul_timer_irq_start(void); |
extern void gxemul_debug_putc(char ch); |
extern void gxemul_cpu_halt(void); |
extern void gxemul_irq_exception(int exc_no, istate_t *istate); |
extern size_t gxemul_get_memory_size(void); |
extern uintptr_t gxemul_get_fb_address(void); |
extern void gxemul_fb_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/drivers/qemu.h |
---|
0,0 → 1,81 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32qemu_icp GXemul |
* @brief GXemul machine specific parts. |
* @ingroup arm32 |
* @{ |
*/ |
/** @file |
* @brief GXemul peripheries drivers declarations. |
*/ |
#ifndef KERN_arm32_QEMU_ICP_H_ |
#define KERN_arm32_QEMU_ICP_H_ |
#include <console/chardev.h> |
/** Last interrupt number (beginning from 0) whose status is probed |
* from interrupt controller |
*/ |
#define QEMU_ICP_IRQC_MAX_IRQ 8 |
/** Timer frequency */ |
#define QEMU_ICP_TIMER_FREQ 100 |
/** Struct containing mappings of qemu_icp HW devices into kernel part |
* of virtual address space. |
*/ |
typedef struct { |
uintptr_t videoram; |
uintptr_t kbd; |
uintptr_t rtc; |
uintptr_t rtc_freq; |
uintptr_t rtc_ack; |
uintptr_t irqc; |
uintptr_t irqc_mask; |
uintptr_t irqc_unmask; |
uintptr_t vga; |
uintptr_t cmcr; |
} qemu_icp_hw_map_t; |
extern void qemu_icp_hw_map_init(void); |
extern void qemu_icp_console_init(devno_t devno); |
extern void qemu_icp_release_console(void); |
extern void qemu_icp_grab_console(void); |
extern void qemu_icp_timer_irq_start(void); |
extern void qemu_icp_debug_putc(char ch); |
extern void qemu_icp_cpu_halt(void); |
extern void qemu_icp_irq_exception(int exc_no, istate_t *istate); |
extern size_t qemu_icp_get_memory_size(void); |
extern uintptr_t qemu_icp_get_fb_address(void); |
extern void qemu_icp_fb_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/mm/page.h |
---|
94,21 → 94,21 |
/* Get PTE flags accessors for each level. */ |
#define GET_PTL1_FLAGS_ARCH(ptl0, i) \ |
get_pt_level0_flags((pte_level0_t *) (ptl0), (size_t) (i)) |
get_pt_level0_flags((pte_level0_t *) (ptl0), (index_t) (i)) |
#define GET_PTL2_FLAGS_ARCH(ptl1, i) \ |
PAGE_PRESENT |
#define GET_PTL3_FLAGS_ARCH(ptl2, i) \ |
PAGE_PRESENT |
#define GET_FRAME_FLAGS_ARCH(ptl3, i) \ |
get_pt_level1_flags((pte_level1_t *) (ptl3), (size_t) (i)) |
get_pt_level1_flags((pte_level1_t *) (ptl3), (index_t) (i)) |
/* Set PTE flags accessors for each level. */ |
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ |
set_pt_level0_flags((pte_level0_t *) (ptl0), (size_t) (i), (x)) |
set_pt_level0_flags((pte_level0_t *) (ptl0), (index_t) (i), (x)) |
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ |
set_pt_level1_flags((pte_level1_t *) (ptl3), (size_t) (i), (x)) |
set_pt_level1_flags((pte_level1_t *) (ptl3), (index_t) (i), (x)) |
/* Macros for querying the last-level PTE entries. */ |
#define PTE_VALID_ARCH(pte) \ |
193,8 → 193,9 |
static inline void set_ptl0_addr(pte_level0_t *pt) |
{ |
asm volatile ( |
"mcr p15, 0, %[pt], c2, c0, 0\n" |
:: [pt] "r" (pt) |
"mcr p15, 0, %0, c2, c0, 0 \n" |
: |
: "r"(pt) |
); |
} |
204,7 → 205,7 |
* @param pt Level 0 page table. |
* @param i Index of the entry to return. |
*/ |
static inline int get_pt_level0_flags(pte_level0_t *pt, size_t i) |
static inline int get_pt_level0_flags(pte_level0_t *pt, index_t i) |
{ |
pte_level0_t *p = &pt[i]; |
int np = (p->descriptor_type == PTE_DESCRIPTOR_NOT_PRESENT); |
219,7 → 220,7 |
* @param pt Level 1 page table. |
* @param i Index of the entry to return. |
*/ |
static inline int get_pt_level1_flags(pte_level1_t *pt, size_t i) |
static inline int get_pt_level1_flags(pte_level1_t *pt, index_t i) |
{ |
pte_level1_t *p = &pt[i]; |
244,7 → 245,7 |
* @param i index of the entry to be changed |
* @param flags new flags |
*/ |
static inline void set_pt_level0_flags(pte_level0_t *pt, size_t i, int flags) |
static inline void set_pt_level0_flags(pte_level0_t *pt, index_t i, int flags) |
{ |
pte_level0_t *p = &pt[i]; |
272,7 → 273,7 |
* @param i Index of the entry to be changed. |
* @param flags New flags. |
*/ |
static inline void set_pt_level1_flags(pte_level1_t *pt, size_t i, int flags) |
static inline void set_pt_level1_flags(pte_level1_t *pt, index_t i, int flags) |
{ |
pte_level1_t *p = &pt[i]; |
/branches/arm/kernel/arch/arm32/include/mm/frame.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32mm |
/** @addtogroup arm32mm |
* @{ |
*/ |
/** @file |
36,8 → 36,8 |
#ifndef KERN_arm32_FRAME_H_ |
#define KERN_arm32_FRAME_H_ |
#define FRAME_WIDTH 12 /* 4KB frames */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#define FRAME_WIDTH 12 /* 4KB frames */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#ifdef KERNEL |
#ifndef __ASM__ |
44,8 → 44,8 |
#include <arch/types.h> |
#define BOOT_PAGE_TABLE_SIZE 0x4000 |
#define BOOT_PAGE_TABLE_ADDRESS 0x4000 |
#define BOOT_PAGE_TABLE_SIZE 0x4000 |
#define BOOT_PAGE_TABLE_ADDRESS 0x4000 |
#define BOOT_PAGE_TABLE_START_FRAME (BOOT_PAGE_TABLE_ADDRESS >> FRAME_WIDTH) |
#define BOOT_PAGE_TABLE_SIZE_IN_FRAMES (BOOT_PAGE_TABLE_SIZE >> FRAME_WIDTH) |
/branches/arm/kernel/arch/arm32/include/mm/tlb.h |
---|
36,6 → 36,9 |
#ifndef KERN_arm32_TLB_H_ |
#define KERN_arm32_TLB_H_ |
#define tlb_arch_init() |
#define tlb_print() |
#endif |
/** @} |
/branches/arm/kernel/arch/arm32/include/barrier.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
39,12 → 39,12 |
/* |
* TODO: implement true ARM memory barriers for macros below. |
*/ |
#define CS_ENTER_BARRIER() asm volatile ("" ::: "memory") |
#define CS_LEAVE_BARRIER() asm volatile ("" ::: "memory") |
#define CS_ENTER_BARRIER() asm volatile ("" ::: "memory") |
#define CS_LEAVE_BARRIER() asm volatile ("" ::: "memory") |
#define memory_barrier() asm volatile ("" ::: "memory") |
#define read_barrier() asm volatile ("" ::: "memory") |
#define write_barrier() asm volatile ("" ::: "memory") |
#define memory_barrier() asm volatile ("" ::: "memory") |
#define read_barrier() asm volatile ("" ::: "memory") |
#define write_barrier() asm volatile ("" ::: "memory") |
#define smc_coherence(a) |
#define smc_coherence_block(a, l) |
/branches/arm/kernel/arch/arm32/include/types.h |
---|
53,6 → 53,8 |
typedef unsigned long long uint64_t; |
typedef uint32_t size_t; |
typedef uint32_t count_t; |
typedef uint32_t index_t; |
typedef uint32_t uintptr_t; |
typedef uint32_t pfn_t; |
62,11 → 64,10 |
typedef uint32_t unative_t; |
typedef int32_t native_t; |
typedef struct { |
} fncptr_t; |
#define PRIp "x" /**< Format for uintptr_t. */ |
#define PRIs "u" /**< Format for size_t. */ |
#define PRIc "u" /**< Format for count_t. */ |
#define PRIi "u" /**< Format for index_t. */ |
#define PRId8 "d" /**< Format for int8_t. */ |
#define PRId16 "d" /**< Format for int16_t. */ |
/branches/arm/kernel/arch/arm32/include/byteorder.h |
---|
0,0 → 1,48 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
* @brief Endianness definitions. |
*/ |
#ifndef KERN_arm32_BYTEORDER_H_ |
#define KERN_arm32_BYTEORDER_H_ |
#ifdef BIG_ENDIAN |
#define ARCH_IS_BIG_ENDIAN |
#else |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/asm/boot.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
37,9 → 37,26 |
#define KERN_arm32_ASM_BOOT_H_ |
/** Size of a temporary stack used for initial kernel start. */ |
#define TEMP_STACK_SIZE 0x100 |
#define TEMP_STACK_SIZE 0x100 |
#ifndef __ASM__ |
/** Kernel entry point. |
* |
* Implemented in assembly. Copies boot_bootinfo (declared as bootinfo in |
* boot/arch/arm32/loader/main.c) to #bootinfo struct. Then jumps to |
* #arch_pre_main and #main_bsp. |
* |
* @param entry Entry point address (not used). |
* @param boot_bootinfo Struct holding information about loaded tasks. |
* @param bootinfo_size Size of the bootinfo structure. |
*/ |
extern void kernel_image_start(void *entry, void *boot_bootinfo, |
unsigned int bootinfo_size); |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/exception.h |
---|
136,13 → 136,6 |
extern void install_exception_handlers(void); |
extern void exception_init(void); |
extern void print_istate(istate_t *istate); |
extern void reset_exception_entry(void); |
extern void irq_exception_entry(void); |
extern void fiq_exception_entry(void); |
extern void undef_instr_exception_entry(void); |
extern void prefetch_abort_exception_entry(void); |
extern void data_abort_exception_entry(void); |
extern void swi_exception_entry(void); |
#endif |
/branches/arm/kernel/arch/arm32/include/regutils.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
/** @addtogroup arm32 |
* @{ |
*/ |
/** |
57,10 → 57,7 |
static inline uint32_t nm## _status_reg_read(void) \ |
{ \ |
uint32_t retval; \ |
asm volatile( \ |
"mrs %[retval], " #reg \ |
: [retval] "=r" (retval) \ |
); \ |
asm volatile("mrs %0, " #reg : "=r" (retval)); \ |
return retval; \ |
} |
67,10 → 64,7 |
#define GEN_STATUS_WRITE(nm,reg,fieldname, field) \ |
static inline void nm## _status_reg_ ##fieldname## _write(uint32_t value) \ |
{ \ |
asm volatile( \ |
"msr " #reg "_" #field ", %[value]" \ |
:: [value] "r" (value) \ |
); \ |
asm volatile("msr " #reg "_" #field ", %0" : : "r" (value)); \ |
} |
/branches/arm/kernel/arch/arm32/include/debug/print.h |
---|
0,0 → 1,56 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
* @brief Debug printing functions. |
*/ |
#ifndef KERN_arm32_DEBUG_PRINT_H_ |
#define KERN_arm32_DEBUG_PRINT_H_ |
#include <stdarg.h> |
#include <arch/types.h> |
extern void debug_puts(const char *str); |
extern void debug_printf(const char *fmt, ...); |
#ifdef CONFIG_DEBUG |
# define dprintf(arg1...) debug_printf(arg1) |
# define dputs(arg1) debug_puts(arg1) |
#else |
# define dprintf(arg1...) |
# define dputs(arg1) |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/console.h |
---|
0,0 → 1,49 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
* @brief Console. |
*/ |
#ifndef KERN_arm32_CONSOLE_H_ |
#define KERN_arm32_CONSOLE_H_ |
/** Initializes console. |
* |
* @param devno Console device number. |
*/ |
extern void console_init(devno_t devno); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/boot.h |
---|
0,0 → 1,76 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
* @brief Bootinfo declarations. |
* |
* Reflects boot/arch/arm32/loader/main.h. |
*/ |
#ifndef KERN_arm32_BOOT_H_ |
#define KERN_arm32_BOOT_H_ |
#include <arch/types.h> |
/** Maximum number of tasks in the #bootinfo_t struct. */ |
#define TASKMAP_MAX_RECORDS 32 |
/** Struct holding information about single loaded uspace task. */ |
typedef struct { |
/** Address where the task was placed. */ |
uintptr_t addr; |
/** Size of the task's binary. */ |
uint32_t size; |
} utask_t; |
/** Struct holding information about loaded uspace tasks. */ |
typedef struct { |
/** Number of loaded tasks. */ |
uint32_t cnt; |
/** Array of loaded tasks. */ |
utask_t tasks[TASKMAP_MAX_RECORDS]; |
} bootinfo_t; |
/** Bootinfo that is filled in #kernel_image_start. */ |
extern bootinfo_t bootinfo; |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/include/atomic.h |
---|
26,10 → 26,10 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
/** @file |
* @brief Atomic operations. |
*/ |
42,26 → 42,26 |
* @param i Value to be added. |
* |
* @return Value after addition. |
* |
*/ |
static inline long atomic_add(atomic_t *val, int i) |
{ |
int ret; |
volatile long *mem = &(val->count); |
asm volatile ( |
"1:\n" |
"ldr r2, [%[mem]]\n" |
"add r3, r2, %[i]\n" |
"str r3, %[ret]\n" |
"swp r3, r3, [%[mem]]\n" |
"cmp r3, r2\n" |
"bne 1b\n" |
: [ret] "=m" (ret) |
: [mem] "r" (mem), [i] "r" (i) |
"1:\n" |
"ldr r2, [%1] \n" |
"add r3, r2, %2 \n" |
"str r3, %0 \n" |
"swp r3, r3, [%1] \n" |
"cmp r3, r2 \n" |
"bne 1b \n" |
: "=m" (ret) |
: "r" (mem), "r" (i) |
: "r3", "r2" |
); |
return ret; |
} |
/branches/arm/kernel/arch/arm32/include/arch.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
36,26 → 36,6 |
#ifndef KERN_arm32_ARCH_H_ |
#define KERN_arm32_ARCH_H_ |
#define TASKMAP_MAX_RECORDS 32 |
#define CPUMAP_MAX_RECORDS 32 |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
#include <typedefs.h> |
typedef struct { |
uintptr_t addr; |
uint32_t size; |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} utask_t; |
typedef struct { |
uint32_t cnt; |
utask_t tasks[TASKMAP_MAX_RECORDS]; |
} bootinfo_t; |
extern void arch_pre_main(void *entry, bootinfo_t *bootinfo); |
#endif |
/** @} |
/branches/arm/kernel/arch/arm32/include/asm.h |
---|
26,10 → 26,10 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
/** @file |
* @brief Declarations of functions implemented in assembly. |
*/ |
36,7 → 36,6 |
#ifndef KERN_arm32_ASM_H_ |
#define KERN_arm32_ASM_H_ |
#include <typedefs.h> |
#include <arch/types.h> |
#include <arch/stack.h> |
#include <config.h> |
47,50 → 46,19 |
{ |
} |
static inline void pio_write_8(ioport8_t *port, uint8_t v) |
{ |
*port = v; |
} |
static inline void pio_write_16(ioport16_t *port, uint16_t v) |
{ |
*port = v; |
} |
static inline void pio_write_32(ioport32_t *port, uint32_t v) |
{ |
*port = v; |
} |
static inline uint8_t pio_read_8(ioport8_t *port) |
{ |
return *port; |
} |
static inline uint16_t pio_read_16(ioport16_t *port) |
{ |
return *port; |
} |
static inline uint32_t pio_read_32(ioport32_t *port) |
{ |
return *port; |
} |
/** Return base address of current stack. |
* |
* |
* Return the base address of the current stack. |
* The stack is assumed to be STACK_SIZE bytes long. |
* The stack must start on page boundary. |
* |
*/ |
static inline uintptr_t get_stack_base(void) |
{ |
uintptr_t v; |
asm volatile ( |
"and %[v], sp, %[size]\n" |
: [v] "=r" (v) |
: [size] "r" (~(STACK_SIZE - 1)) |
"and %0, sp, %1\n" |
: "=r" (v) |
: "r" (~(STACK_SIZE - 1)) |
); |
return v; |
} |
/branches/arm/kernel/arch/arm32/src/machine_func.c |
---|
File deleted |
/branches/arm/kernel/arch/arm32/src/exc_handler.S |
---|
File deleted |
/branches/arm/kernel/arch/arm32/src/mach/testarm/testarm.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/arch/arm32/src/mach/integratorcp/integratorcp.c |
---|
File deleted |
/branches/arm/kernel/arch/arm32/src/arm32.c |
---|
34,37 → 34,36 |
*/ |
#include <arch.h> |
#include <arch/boot.h> |
#include <config.h> |
#include <arch/console.h> |
#include <ddi/device.h> |
#include <genarch/fb/fb.h> |
#include <genarch/fb/visuals.h> |
#include <genarch/drivers/dsrln/dsrlnin.h> |
#include <genarch/drivers/dsrln/dsrlnout.h> |
#include <genarch/srln/srln.h> |
#include <sysinfo/sysinfo.h> |
#include <console/console.h> |
#include <ddi/irq.h> |
#include <arch/machine.h> |
#include <arch/debug/print.h> |
#include <print.h> |
#include <config.h> |
#include <interrupt.h> |
#include <arch/regutils.h> |
#include <arch/machine.h> |
#include <userspace.h> |
#include <macros.h> |
#include <string.h> |
/** Performs arm32-specific initialization before main_bsp() is called. */ |
void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) |
/** Information about loaded tasks. */ |
bootinfo_t bootinfo; |
/** Performs arm32 specific initialization before main_bsp() is called. */ |
void arch_pre_main(void) |
{ |
unsigned int i; |
init.cnt = bootinfo.cnt; |
for (i = 0; i < bootinfo.cnt; ++i) { |
init.tasks[i].addr = bootinfo.tasks[i].addr; |
init.tasks[i].size = bootinfo.tasks[i].size; |
} |
init.cnt = bootinfo->cnt; |
for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); ++i) { |
init.tasks[i].addr = bootinfo->tasks[i].addr; |
init.tasks[i].size = bootinfo->tasks[i].size; |
str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, |
bootinfo->tasks[i].name); |
} |
} |
/** Performs arm32 specific initialization before mm is initialized. */ |
77,19 → 76,18 |
/** Performs arm32 specific initialization afterr mm is initialized. */ |
void arch_post_mm_init(void) |
{ |
machine_init(); |
machine_hw_map_init(); |
/* Initialize exception dispatch table */ |
exception_init(); |
interrupt_init(); |
console_init(device_assign_devno()); |
#ifdef CONFIG_FB |
machine_fb_init(); |
#else |
#ifdef CONFIG_ARM_PRN |
machine_srlnout_init(); |
#endif /* CONFIG_ARM_PRN */ |
#endif /* CONFIG_FB */ |
#endif |
} |
/** Performs arm32 specific tasks needed after cpu is initialized. |
118,7 → 116,6 |
*/ |
void arch_post_smp_init(void) |
{ |
machine_input_init(); |
} |
125,6 → 122,7 |
/** Performs arm32 specific tasks needed before the new task is run. */ |
void before_task_runs_arch(void) |
{ |
tlb_invalidate_all(); |
} |
136,7 → 134,6 |
{ |
uint8_t *stck; |
tlb_invalidate_all(); |
stck = &THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA]; |
supervisor_sp = (uintptr_t) stck; |
} |
159,37 → 156,9 |
void arch_reboot() |
{ |
/* not implemented */ |
while (1); |
for (;;) |
; |
} |
/** Construct function pointer |
* |
* @param fptr function pointer structure |
* @param addr function address |
* @param caller calling function address |
* |
* @return address of the function pointer |
* |
*/ |
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
{ |
return addr; |
} |
/** Acquire console back for kernel. */ |
void arch_grab_console(void) |
{ |
machine_grab_console(); |
#ifdef CONFIG_FB |
fb_redraw(); |
#endif |
} |
/** Return console to userspace. */ |
void arch_release_console(void) |
{ |
machine_release_console(); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/src/drivers/gxemul.c |
---|
0,0 → 1,400 |
/* |
* Copyright (c) 2007 Michal Kebrt, Petr Stepan |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32gxemul |
* @{ |
*/ |
/** @file |
* @brief GXemul drivers. |
*/ |
#include <interrupt.h> |
#include <ipc/irq.h> |
#include <console/chardev.h> |
#include <arch/drivers/gxemul.h> |
#include <console/console.h> |
#include <sysinfo/sysinfo.h> |
#include <print.h> |
#include <ddi/device.h> |
#include <mm/page.h> |
#include <arch/machine.h> |
#include <arch/debug/print.h> |
#include <genarch/fb/fb.h> |
#include <genarch/fb/visuals.h> |
/* Addresses of devices. */ |
#define GXEMUL_VIDEORAM 0x10000000 |
#define GXEMUL_KBD 0x10000000 |
#define GXEMUL_HALT_OFFSET 0x10 |
#define GXEMUL_RTC 0x15000000 |
#define GXEMUL_RTC_FREQ_OFFSET 0x100 |
#define GXEMUL_RTC_ACK_OFFSET 0x110 |
#define GXEMUL_IRQC 0x16000000 |
#define GXEMUL_IRQC_MASK_OFFSET 0x4 |
#define GXEMUL_IRQC_UNMASK_OFFSET 0x8 |
#define GXEMUL_MP 0x11000000 |
#define GXEMUL_MP_MEMSIZE_OFFSET 0x0090 |
#define GXEMUL_FB 0x12000000 |
/* IRQs */ |
#define GXEMUL_KBD_IRQ 2 |
#define GXEMUL_TIMER_IRQ 4 |
static gxemul_hw_map_t gxemul_hw_map; |
static chardev_t console; |
static irq_t gxemul_console_irq; |
static irq_t gxemul_timer_irq; |
static bool hw_map_init_called = false; |
static void gxemul_kbd_enable(chardev_t *dev); |
static void gxemul_kbd_disable(chardev_t *dev); |
static void gxemul_write(chardev_t *dev, const char ch); |
static char gxemul_do_read(chardev_t *dev); |
static chardev_operations_t gxemul_ops = { |
.resume = gxemul_kbd_enable, |
.suspend = gxemul_kbd_disable, |
.write = gxemul_write, |
.read = gxemul_do_read, |
}; |
/** Returns the mask of active interrupts. */ |
static inline uint32_t gxemul_irqc_get_sources(void) |
{ |
return *((uint32_t *) gxemul_hw_map.irqc); |
} |
/** Masks interrupt. |
* |
* @param irq interrupt number |
*/ |
static inline void gxemul_irqc_mask(uint32_t irq) |
{ |
*((uint32_t *) gxemul_hw_map.irqc_mask) = irq; |
} |
/** Unmasks interrupt. |
* |
* @param irq interrupt number |
*/ |
static inline void gxemul_irqc_unmask(uint32_t irq) |
{ |
*((uint32_t *) gxemul_hw_map.irqc_unmask) = irq; |
} |
/** Initializes the gxemul testarm frame buffer */ |
void gxemul_fb_init(void) |
{ |
fb_init(gxemul_get_fb_address(), 640, 480, 1920, VISUAL_RGB_8_8_8); |
} |
/** Initializes #gxemul_hw_map. */ |
void gxemul_hw_map_init(void) |
{ |
gxemul_hw_map.videoram = hw_map(GXEMUL_VIDEORAM, PAGE_SIZE); |
gxemul_hw_map.kbd = hw_map(GXEMUL_KBD, PAGE_SIZE); |
gxemul_hw_map.rtc = hw_map(GXEMUL_RTC, PAGE_SIZE); |
gxemul_hw_map.irqc = hw_map(GXEMUL_IRQC, PAGE_SIZE); |
gxemul_hw_map.rtc_freq = gxemul_hw_map.rtc + GXEMUL_RTC_FREQ_OFFSET; |
gxemul_hw_map.rtc_ack = gxemul_hw_map.rtc + GXEMUL_RTC_ACK_OFFSET; |
gxemul_hw_map.irqc_mask = gxemul_hw_map.irqc + GXEMUL_IRQC_MASK_OFFSET; |
gxemul_hw_map.irqc_unmask = gxemul_hw_map.irqc + |
GXEMUL_IRQC_UNMASK_OFFSET; |
hw_map_init_called = true; |
} |
/** Putchar that works with gxemul. |
* |
* @param dev Not used. |
* @param ch Characted to be printed. |
*/ |
static void gxemul_write(chardev_t *dev, const char ch) |
{ |
*((char *) gxemul_hw_map.videoram) = ch; |
} |
/** Enables gxemul keyboard (interrupt unmasked). |
* |
* @param dev Not used. |
* |
* Called from getc(). |
*/ |
static void gxemul_kbd_enable(chardev_t *dev) |
{ |
gxemul_irqc_unmask(GXEMUL_KBD_IRQ); |
} |
/** Disables gxemul keyboard (interrupt masked). |
* |
* @param dev not used |
* |
* Called from getc(). |
*/ |
static void gxemul_kbd_disable(chardev_t *dev) |
{ |
gxemul_irqc_mask(GXEMUL_KBD_IRQ); |
} |
/** Read character using polling, assume interrupts disabled. |
* |
* @param dev Not used. |
*/ |
static char gxemul_do_read(chardev_t *dev) |
{ |
char ch; |
while (1) { |
ch = *((volatile char *) gxemul_hw_map.kbd); |
if (ch) { |
if (ch == '\r') |
return '\n'; |
if (ch == 0x7f) |
return '\b'; |
return ch; |
} |
} |
} |
/** Process keyboard interrupt. |
* |
* @param irq IRQ information. |
* @param arg Not used. |
*/ |
static void gxemul_irq_handler(irq_t *irq, void *arg, ...) |
{ |
if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) { |
ipc_irq_send_notif(irq); |
} else { |
char ch = 0; |
ch = *((char *) gxemul_hw_map.kbd); |
if (ch == '\r') { |
ch = '\n'; |
} |
if (ch == 0x7f) { |
ch = '\b'; |
} |
chardev_push_character(&console, ch); |
} |
} |
static irq_ownership_t gxemul_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
/** Acquire console back for kernel. */ |
void gxemul_grab_console(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&gxemul_console_irq.lock); |
gxemul_console_irq.notif_cfg.notify = false; |
spinlock_unlock(&gxemul_console_irq.lock); |
interrupts_restore(ipl); |
} |
/** Return console to userspace. */ |
void gxemul_release_console(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&gxemul_console_irq.lock); |
if (gxemul_console_irq.notif_cfg.answerbox) { |
gxemul_console_irq.notif_cfg.notify = true; |
} |
spinlock_unlock(&gxemul_console_irq.lock); |
interrupts_restore(ipl); |
} |
/** Initializes console object representing gxemul console. |
* |
* @param devno device number. |
*/ |
void gxemul_console_init(devno_t devno) |
{ |
chardev_initialize("gxemul_console", &console, &gxemul_ops); |
stdin = &console; |
stdout = &console; |
irq_initialize(&gxemul_console_irq); |
gxemul_console_irq.devno = devno; |
gxemul_console_irq.inr = GXEMUL_KBD_IRQ; |
gxemul_console_irq.claim = gxemul_claim; |
gxemul_console_irq.handler = gxemul_irq_handler; |
irq_register(&gxemul_console_irq); |
gxemul_irqc_unmask(GXEMUL_KBD_IRQ); |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.devno", NULL, devno); |
sysinfo_set_item_val("kbd.inr", NULL, GXEMUL_KBD_IRQ); |
sysinfo_set_item_val("kbd.address.virtual", NULL, gxemul_hw_map.kbd); |
} |
/** Starts gxemul Real Time Clock device, which asserts regular interrupts. |
* |
* @param frequency Interrupts frequency (0 disables RTC). |
*/ |
static void gxemul_timer_start(uint32_t frequency) |
{ |
*((uint32_t*) gxemul_hw_map.rtc_freq) = frequency; |
} |
static irq_ownership_t gxemul_timer_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
/** Timer interrupt handler. |
* |
* @param irq Interrupt information. |
* @param arg Not used. |
*/ |
static void gxemul_timer_irq_handler(irq_t *irq, void *arg, ...) |
{ |
/* |
* We are holding a lock which prevents preemption. |
* Release the lock, call clock() and reacquire the lock again. |
*/ |
spinlock_unlock(&irq->lock); |
clock(); |
spinlock_lock(&irq->lock); |
/* acknowledge tick */ |
*((uint32_t*) gxemul_hw_map.rtc_ack) = 0; |
} |
/** Initializes and registers timer interrupt handler. */ |
static void gxemul_timer_irq_init(void) |
{ |
irq_initialize(&gxemul_timer_irq); |
gxemul_timer_irq.devno = device_assign_devno(); |
gxemul_timer_irq.inr = GXEMUL_TIMER_IRQ; |
gxemul_timer_irq.claim = gxemul_timer_claim; |
gxemul_timer_irq.handler = gxemul_timer_irq_handler; |
irq_register(&gxemul_timer_irq); |
} |
/** Starts timer. |
* |
* Initiates regular timer interrupts after initializing |
* corresponding interrupt handler. |
*/ |
void gxemul_timer_irq_start(void) |
{ |
gxemul_timer_irq_init(); |
gxemul_timer_start(GXEMUL_TIMER_FREQ); |
} |
/** Returns the size of emulated memory. |
* |
* @return Size in bytes. |
*/ |
size_t gxemul_get_memory_size(void) |
{ |
return *((int *) (GXEMUL_MP + GXEMUL_MP_MEMSIZE_OFFSET)); |
} |
/** Prints a character. |
* |
* @param ch Character to be printed. |
*/ |
void gxemul_debug_putc(char ch) |
{ |
char *addr = 0; |
if (!hw_map_init_called) { |
addr = (char *) GXEMUL_KBD; |
} else { |
addr = (char *) gxemul_hw_map.videoram; |
} |
*(addr) = ch; |
} |
/** Stops gxemul. */ |
void gxemul_cpu_halt(void) |
{ |
char * addr = 0; |
if (!hw_map_init_called) { |
addr = (char *) GXEMUL_KBD; |
} else { |
addr = (char *) gxemul_hw_map.videoram; |
} |
*(addr + GXEMUL_HALT_OFFSET) = '\0'; |
} |
/** Gxemul specific interrupt exception handler. |
* |
* Determines sources of the interrupt from interrupt controller and |
* calls high-level handlers for them. |
* |
* @param exc_no Interrupt exception number. |
* @param istate Saved processor state. |
*/ |
void gxemul_irq_exception(int exc_no, istate_t *istate) |
{ |
uint32_t sources = gxemul_irqc_get_sources(); |
int i; |
for (i = 0; i < GXEMUL_IRQC_MAX_IRQ; i++) { |
if (sources & (1 << i)) { |
irq_t *irq = irq_dispatch_and_lock(i); |
if (irq) { |
/* The IRQ handler was found. */ |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
/* Spurious interrupt.*/ |
dprintf("cpu%d: spurious interrupt (inum=%d)\n", |
CPU->id, i); |
} |
} |
} |
} |
/** Returns address of framebuffer device. |
* |
* @return Address of framebuffer device. |
*/ |
uintptr_t gxemul_get_fb_address(void) |
{ |
return (uintptr_t) GXEMUL_FB; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/src/drivers/qemu.c |
---|
0,0 → 1,432 |
/* |
* Copyright (c) 2007 Michal Kebrt, Petr Stepan |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32qemu_icp |
* @{ |
*/ |
/** @file |
* @brief QEMU icp drivers. |
*/ |
#include <interrupt.h> |
#include <ipc/irq.h> |
#include <console/chardev.h> |
#include <arch/drivers/qemu.h> |
#include <console/console.h> |
#include <sysinfo/sysinfo.h> |
#include <print.h> |
#include <ddi/device.h> |
#include <mm/page.h> |
#include <arch/machine.h> |
#include <arch/debug/print.h> |
#include <genarch/fb/fb.h> |
#include <genarch/fb/visuals.h> |
/* Addresses of devices. */ |
#define QEMU_ICP_VIDEORAM 0x16000000 |
#define QEMU_ICP_KBD 0x18000000 |
#define QEMU_ICP_HALT_OFFSET 0x10 |
#define QEMU_ICP_RTC 0x13000000 |
#define QEMU_ICP_RTC_FREQ_OFFSET 0x100 |
#define QEMU_ICP_RTC_ACK_OFFSET 0x110 |
#define QEMU_ICP_IRQC 0x14000000 |
#define QEMU_ICP_IRQC_MASK_OFFSET 0x8 |
#define QEMU_ICP_IRQC_UNMASK_OFFSET 0xC |
#define QEMU_ICP_MP 0x11000000 |
#define QEMU_ICP_MP_MEMSIZE_OFFSET 0x0090 |
#define QEMU_ICP_FB 0x94000 |
#define ICP_VGA 0xC0000000 |
#define ICP_CMCR 0x10000000 |
/* IRQs */ |
#define QEMU_ICP_KBD_IRQ 3 |
#define QEMU_ICP_TIMER_IRQ 5 |
static qemu_icp_hw_map_t qemu_icp_hw_map; |
static chardev_t console; |
static irq_t qemu_icp_console_irq; |
static irq_t qemu_icp_timer_irq; |
static bool hw_map_init_called = false; |
static bool vga_init = false; |
static void qemu_icp_kbd_enable(chardev_t *dev); |
static void qemu_icp_kbd_disable(chardev_t *dev); |
static void qemu_icp_write(chardev_t *dev, const char ch); |
static char qemu_icp_do_read(chardev_t *dev); |
void icp_vga_init(void); |
static chardev_operations_t qemu_icp_ops = { |
.resume = qemu_icp_kbd_enable, |
.suspend = qemu_icp_kbd_disable, |
.write = qemu_icp_write, |
.read = qemu_icp_do_read, |
}; |
/** Initializes the vga |
* |
*/ |
void icp_vga_init(void) |
{ |
*(uint32_t*)((char *)(qemu_icp_hw_map.cmcr)+0x14) = 0xA05F0000; |
*(uint32_t*)((char *)(qemu_icp_hw_map.cmcr)+0x1C) = 0x12C11000; |
*(uint32_t*)qemu_icp_hw_map.vga = 0x3F1F3F9C; |
*(uint32_t*)((char *)(qemu_icp_hw_map.vga) + 0x4) = 0x080B61DF; |
*(uint32_t*)((char *)(qemu_icp_hw_map.vga) + 0x8) = 0x067F3800; |
*(uint32_t*)((char *)(qemu_icp_hw_map.vga) + 0x10) = QEMU_ICP_FB; |
*(uint32_t *)((char *)(qemu_icp_hw_map.vga) + 0x1C) = 0x182B; |
*(uint32_t*)((char *)(qemu_icp_hw_map.cmcr)+0xC) = 0x33805000; |
} |
/** Returns the mask of active interrupts. */ |
static inline uint32_t qemu_icp_irqc_get_sources(void) |
{ |
return *((uint32_t *) qemu_icp_hw_map.irqc); |
} |
/** Masks interrupt. |
* |
* @param irq interrupt number |
*/ |
static inline void qemu_icp_irqc_mask(uint32_t irq) |
{ |
*((uint32_t *) qemu_icp_hw_map.irqc_mask) = irq; |
} |
/** Unmasks interrupt. |
* |
* @param irq interrupt number |
*/ |
static inline void qemu_icp_irqc_unmask(uint32_t irq) |
{ |
*((uint32_t *) qemu_icp_hw_map.irqc_unmask) = irq; |
} |
/** Initializes the icp frame buffer */ |
void qemu_icp_fb_init(void) |
{ |
fb_init(qemu_icp_get_fb_address(), 640, 480, 2560, VISUAL_BGR_8_8_8_0); |
} |
/** Initializes #qemu_icp_hw_map. */ |
void qemu_icp_hw_map_init(void) |
{ |
qemu_icp_hw_map.videoram = hw_map(QEMU_ICP_VIDEORAM, PAGE_SIZE); |
qemu_icp_hw_map.kbd = hw_map(QEMU_ICP_KBD, PAGE_SIZE); |
qemu_icp_hw_map.rtc = hw_map(QEMU_ICP_RTC, PAGE_SIZE); |
qemu_icp_hw_map.irqc = hw_map(QEMU_ICP_IRQC, PAGE_SIZE); |
qemu_icp_hw_map.rtc_freq = qemu_icp_hw_map.rtc + QEMU_ICP_RTC_FREQ_OFFSET; |
qemu_icp_hw_map.rtc_ack = qemu_icp_hw_map.rtc + QEMU_ICP_RTC_ACK_OFFSET; |
qemu_icp_hw_map.irqc_mask = qemu_icp_hw_map.irqc + QEMU_ICP_IRQC_MASK_OFFSET; |
qemu_icp_hw_map.irqc_unmask = qemu_icp_hw_map.irqc + |
QEMU_ICP_IRQC_UNMASK_OFFSET; |
qemu_icp_hw_map.cmcr = hw_map(ICP_CMCR, PAGE_SIZE); |
qemu_icp_hw_map.vga = hw_map(ICP_VGA, PAGE_SIZE); |
//icp_vga_init(); |
hw_map_init_called = true; |
} |
/** Putchar that works with qemu_icp. |
* |
* @param dev Not used. |
* @param ch Characted to be printed. |
*/ |
static void qemu_icp_write(chardev_t *dev, const char ch) |
{ |
*((char *) qemu_icp_hw_map.videoram) = ch; |
} |
/** Enables qemu_icp keyboard (interrupt unmasked). |
* |
* @param dev Not used. |
* |
* Called from getc(). |
*/ |
static void qemu_icp_kbd_enable(chardev_t *dev) |
{ |
qemu_icp_irqc_unmask(QEMU_ICP_KBD_IRQ); |
} |
/** Disables qemu_icp keyboard (interrupt masked). |
* |
* @param dev not used |
* |
* Called from getc(). |
*/ |
static void qemu_icp_kbd_disable(chardev_t *dev) |
{ |
qemu_icp_irqc_mask(QEMU_ICP_KBD_IRQ); |
} |
/** Read character using polling, assume interrupts disabled. |
* |
* @param dev Not used. |
*/ |
static char qemu_icp_do_read(chardev_t *dev) |
{ |
char ch; |
while (1) { |
ch = *((volatile char *) qemu_icp_hw_map.kbd); |
if (ch) { |
if (ch == '\r') |
return '\n'; |
if (ch == 0x7f) |
return '\b'; |
return ch; |
} |
} |
} |
/** Process keyboard interrupt. |
* |
* @param irq IRQ information. |
* @param arg Not used. |
*/ |
static void qemu_icp_irq_handler(irq_t *irq, void *arg, ...) |
{ |
if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) { |
ipc_irq_send_notif(irq); |
} else { |
char ch = 0; |
ch = *((char *) qemu_icp_hw_map.kbd); |
if (ch == '\r') { |
ch = '\n'; |
} |
if (ch == 0x7f) { |
ch = '\b'; |
} |
chardev_push_character(&console, ch); |
} |
} |
static irq_ownership_t qemu_icp_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
/** Acquire console back for kernel. */ |
void qemu_icp_grab_console(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&qemu_icp_console_irq.lock); |
qemu_icp_console_irq.notif_cfg.notify = false; |
spinlock_unlock(&qemu_icp_console_irq.lock); |
interrupts_restore(ipl); |
} |
/** Return console to userspace. */ |
void qemu_icp_release_console(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&qemu_icp_console_irq.lock); |
if (qemu_icp_console_irq.notif_cfg.answerbox) { |
qemu_icp_console_irq.notif_cfg.notify = true; |
} |
spinlock_unlock(&qemu_icp_console_irq.lock); |
interrupts_restore(ipl); |
} |
/** Initializes console object representing qemu_icp console. |
* |
* @param devno device number. |
*/ |
void qemu_icp_console_init(devno_t devno) |
{ |
chardev_initialize("qemu_icp_console", &console, &qemu_icp_ops); |
stdin = &console; |
stdout = &console; |
irq_initialize(&qemu_icp_console_irq); |
qemu_icp_console_irq.devno = devno; |
qemu_icp_console_irq.inr = QEMU_ICP_KBD_IRQ; |
qemu_icp_console_irq.claim = qemu_icp_claim; |
qemu_icp_console_irq.handler = qemu_icp_irq_handler; |
irq_register(&qemu_icp_console_irq); |
qemu_icp_irqc_unmask(QEMU_ICP_KBD_IRQ); |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.devno", NULL, devno); |
sysinfo_set_item_val("kbd.inr", NULL, QEMU_ICP_KBD_IRQ); |
sysinfo_set_item_val("kbd.address.virtual", NULL, qemu_icp_hw_map.kbd); |
} |
/** Starts qemu_icp Real Time Clock device, which asserts regular interrupts. |
* |
* @param frequency Interrupts frequency (0 disables RTC). |
*/ |
static void qemu_icp_timer_start(uint32_t frequency) |
{ |
*((uint32_t*) qemu_icp_hw_map.rtc_freq) = frequency; |
} |
static irq_ownership_t qemu_icp_timer_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
/** Timer interrupt handler. |
* |
* @param irq Interrupt information. |
* @param arg Not used. |
*/ |
static void qemu_icp_timer_irq_handler(irq_t *irq, void *arg, ...) |
{ |
/* |
* We are holding a lock which prevents preemption. |
* Release the lock, call clock() and reacquire the lock again. |
*/ |
spinlock_unlock(&irq->lock); |
clock(); |
spinlock_lock(&irq->lock); |
/* acknowledge tick */ |
*((uint32_t*) qemu_icp_hw_map.rtc_ack) = 0; |
} |
/** Initializes and registers timer interrupt handler. */ |
static void qemu_icp_timer_irq_init(void) |
{ |
irq_initialize(&qemu_icp_timer_irq); |
qemu_icp_timer_irq.devno = device_assign_devno(); |
qemu_icp_timer_irq.inr = QEMU_ICP_TIMER_IRQ; |
qemu_icp_timer_irq.claim = qemu_icp_timer_claim; |
qemu_icp_timer_irq.handler = qemu_icp_timer_irq_handler; |
irq_register(&qemu_icp_timer_irq); |
} |
/** Starts timer. |
* |
* Initiates regular timer interrupts after initializing |
* corresponding interrupt handler. |
*/ |
void qemu_icp_timer_irq_start(void) |
{ |
qemu_icp_timer_irq_init(); |
qemu_icp_timer_start(QEMU_ICP_TIMER_FREQ); |
} |
/** Returns the size of emulated memory. |
* |
* @return Size in bytes. |
*/ |
size_t qemu_icp_get_memory_size(void) |
{ |
//return *((int *) (QEMU_ICP_MP + QEMU_ICP_MP_MEMSIZE_OFFSET)); |
return 0x2000000; |
} |
/** Prints a character. |
* |
* @param ch Character to be printed. |
*/ |
void qemu_icp_debug_putc(char ch) |
{ |
char *addr = 0; |
if (!hw_map_init_called) { |
addr = (char *) QEMU_ICP_KBD; |
} else { |
addr = (char *) qemu_icp_hw_map.videoram; |
} |
if (ch == '\n') |
*(addr) = '\r'; |
*(addr) = ch; |
} |
/** Stops qemu_icp. */ |
void qemu_icp_cpu_halt(void) |
{ |
char * addr = 0; |
if (!hw_map_init_called) { |
addr = (char *) QEMU_ICP_KBD; |
} else { |
addr = (char *) qemu_icp_hw_map.videoram; |
} |
*(addr + QEMU_ICP_HALT_OFFSET) = '\0'; |
} |
/** Gxemul specific interrupt exception handler. |
* |
* Determines sources of the interrupt from interrupt controller and |
* calls high-level handlers for them. |
* |
* @param exc_no Interrupt exception number. |
* @param istate Saved processor state. |
*/ |
void qemu_icp_irq_exception(int exc_no, istate_t *istate) |
{ |
uint32_t sources = qemu_icp_irqc_get_sources(); |
int i; |
for (i = 0; i < QEMU_ICP_IRQC_MAX_IRQ; i++) { |
if (sources & (1 << i)) { |
irq_t *irq = irq_dispatch_and_lock(i); |
if (irq) { |
/* The IRQ handler was found. */ |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
/* Spurious interrupt.*/ |
dprintf("cpu%d: spurious interrupt (inum=%d)\n", |
CPU->id, i); |
} |
} |
} |
} |
/** Returns address of framebuffer device. |
* |
* @return Address of framebuffer device. |
*/ |
uintptr_t qemu_icp_get_fb_address(void) |
{ |
if (!vga_init) { |
icp_vga_init(); |
vga_init = true; |
} |
return (uintptr_t) QEMU_ICP_FB; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/src/asm.S |
---|
30,7 → 30,6 |
.text |
.global memsetb |
.global memsetw |
.global memcpy |
.global memcpy_from_uspace |
.global memcpy_to_uspace |
40,9 → 39,6 |
memsetb: |
b _memsetb |
memsetw: |
b _memsetw |
memcpy: |
memcpy_from_uspace: |
memcpy_to_uspace: |
/branches/arm/kernel/arch/arm32/src/userspace.c |
---|
90,11 → 90,12 |
/* set user mode, set registers, jump */ |
asm volatile ( |
"mov sp, %[ustate]\n" |
"msr spsr_c, %[user_mode]\n" |
"ldmfd sp!, {r0-r12, sp, lr}^\n" |
"mov sp, %0 \n" |
"msr spsr_c, %1 \n" |
"ldmfd sp!, {r0-r12, sp, lr}^ \n" |
"ldmfd sp!, {pc}^\n" |
:: [ustate] "r" (&ustate), [user_mode] "r" (user_mode) |
: |
: "r" (&ustate), "r" (user_mode) |
); |
/* unreachable */ |
/branches/arm/kernel/arch/arm32/src/exception.c |
---|
34,12 → 34,13 |
*/ |
#include <arch/exception.h> |
#include <arch/debug/print.h> |
#include <arch/memstr.h> |
#include <arch/regutils.h> |
#include <interrupt.h> |
#include <arch/machine.h> |
#include <arch/mm/page_fault.h> |
#include <arch/barrier.h> |
#include <arch/machine.h> |
#include <print.h> |
#include <syscall/syscall.h> |
58,6 → 59,153 |
/** Size of memory block occupied by exception vectors. */ |
#define EXC_VECTORS_SIZE (EXC_VECTORS * 4) |
/** Switches to kernel stack and saves all registers there. |
* |
* Temporary exception stack is used to save a few registers |
* before stack switch takes place. |
*/ |
inline static void setup_stack_and_save_regs() |
{ |
asm volatile( |
"ldr r13, =exc_stack \n" |
"stmfd r13!, {r0} \n" |
"mrs r0, spsr \n" |
"and r0, r0, #0x1f \n" |
"cmp r0, #0x10 \n" |
"bne 1f \n" |
/* prev mode was usermode */ |
"ldmfd r13!, {r0} \n" |
"ldr r13, =supervisor_sp \n" |
"ldr r13, [r13] \n" |
"stmfd r13!, {lr} \n" |
"stmfd r13!, {r0-r12} \n" |
"stmfd r13!, {r13, lr}^ \n" |
"mrs r0, spsr \n" |
"stmfd r13!, {r0} \n" |
"b 2f \n" |
/* mode was not usermode */ |
"1:\n" |
"stmfd r13!, {r1, r2, r3} \n" |
"mrs r1, cpsr \n" |
"mov r2, lr \n" |
"bic r1, r1, #0x1f \n" |
"orr r1, r1, r0 \n" |
"mrs r0, cpsr \n" |
"msr cpsr_c, r1 \n" |
"mov r3, r13 \n" |
"stmfd r13!, {r2} \n" |
"mov r2, lr \n" |
"stmfd r13!, {r4-r12} \n" |
"mov r1, r13 \n" |
/* the following two lines are for debugging */ |
"mov sp, #0 \n" |
"mov lr, #0 \n" |
"msr cpsr_c, r0 \n" |
"ldmfd r13!, {r4, r5, r6, r7} \n" |
"stmfd r1!, {r4, r5, r6} \n" |
"stmfd r1!, {r7} \n" |
"stmfd r1!, {r2} \n" |
"stmfd r1!, {r3} \n" |
"mrs r0, spsr \n" |
"stmfd r1!, {r0} \n" |
"mov r13, r1 \n" |
"2:\n" |
); |
} |
/** Returns from exception mode. |
* |
* Previously saved state of registers (including control register) |
* is restored from the stack. |
*/ |
inline static void load_regs() |
{ |
asm volatile( |
"ldmfd r13!, {r0} \n" |
"msr spsr, r0 \n" |
"and r0, r0, #0x1f \n" |
"cmp r0, #0x10 \n" |
"bne 1f \n" |
/* return to user mode */ |
"ldmfd r13!, {r13, lr}^ \n" |
"b 2f \n" |
/* return to non-user mode */ |
"1:\n" |
"ldmfd r13!, {r1, r2} \n" |
"mrs r3, cpsr \n" |
"bic r3, r3, #0x1f \n" |
"orr r3, r3, r0 \n" |
"mrs r0, cpsr \n" |
"msr cpsr_c, r3 \n" |
"mov r13, r1 \n" |
"mov lr, r2 \n" |
"msr cpsr_c, r0 \n" |
/* actual return */ |
"2:\n" |
"ldmfd r13, {r0-r12, pc}^\n" |
); |
} |
/** Switch CPU to mode in which interrupts are serviced (currently it |
* is Undefined mode). |
* |
* The default mode for interrupt servicing (Interrupt Mode) |
* can not be used because of nested interrupts (which can occur |
* because interrupts are enabled in higher levels of interrupt handler). |
*/ |
inline static void switch_to_irq_servicing_mode() |
{ |
/* switch to Undefined mode */ |
asm volatile( |
/* save regs used during switching */ |
"stmfd sp!, {r0-r3} \n" |
/* save stack pointer and link register to r1, r2 */ |
"mov r1, sp \n" |
"mov r2, lr \n" |
/* mode switch */ |
"mrs r0, cpsr \n" |
"bic r0, r0, #0x1f \n" |
"orr r0, r0, #0x1b \n" |
"msr cpsr_c, r0 \n" |
/* restore saved sp and lr */ |
"mov sp, r1 \n" |
"mov lr, r2 \n" |
/* restore original regs */ |
"ldmfd sp!, {r0-r3} \n" |
); |
} |
/** Calls exception dispatch routine. */ |
#define CALL_EXC_DISPATCH(exception) \ |
asm("mov r0, %0" : : "i" (exception)); \ |
asm("mov r1, r13"); \ |
asm("bl exc_dispatch"); |
/** General exception handler. |
* |
* Stores registers, dispatches the exception, |
* and finally restores registers and returns from exception processing. |
* |
* @param exception Exception number. |
*/ |
#define PROCESS_EXCEPTION(exception) \ |
setup_stack_and_save_regs(); \ |
CALL_EXC_DISPATCH(exception) \ |
load_regs(); |
/** Updates specified exception vector to jump to given handler. |
* |
* Addresses of handlers are stored in memory following exception vectors. |
79,6 → 227,62 |
} |
/** Low-level Reset Exception handler. */ |
static void reset_exception_entry(void) |
{ |
PROCESS_EXCEPTION(EXC_RESET); |
} |
/** Low-level Software Interrupt Exception handler. */ |
static void swi_exception_entry(void) |
{ |
PROCESS_EXCEPTION(EXC_SWI); |
} |
/** Low-level Undefined Instruction Exception handler. */ |
static void undef_instr_exception_entry(void) |
{ |
PROCESS_EXCEPTION(EXC_UNDEF_INSTR); |
} |
/** Low-level Fast Interrupt Exception handler. */ |
static void fiq_exception_entry(void) |
{ |
PROCESS_EXCEPTION(EXC_FIQ); |
} |
/** Low-level Prefetch Abort Exception handler. */ |
static void prefetch_abort_exception_entry(void) |
{ |
asm("sub lr, lr, #4"); |
PROCESS_EXCEPTION(EXC_PREFETCH_ABORT); |
} |
/** Low-level Data Abort Exception handler. */ |
static void data_abort_exception_entry(void) |
{ |
asm("sub lr, lr, #8"); |
PROCESS_EXCEPTION(EXC_DATA_ABORT); |
} |
/** Low-level Interrupt Exception handler. |
* |
* CPU is switched to Undefined mode before further interrupt processing |
* because of possible occurence of nested interrupt exception, which |
* would overwrite (and thus spoil) stack pointer. |
*/ |
static void irq_exception_entry(void) |
{ |
asm("sub lr, lr, #4"); |
setup_stack_and_save_regs(); |
switch_to_irq_servicing_mode(); |
CALL_EXC_DISPATCH(EXC_IRQ) |
load_regs(); |
} |
/** Software Interrupt handler. |
* |
* Dispatches the syscall. |
89,6 → 293,15 |
istate->r3, istate->r4, istate->r5, istate->r6); |
} |
/** Interrupt Exception handler. |
* |
* Determines the sources of interrupt and calls their handlers. |
*/ |
static void irq_exception(int exc_no, istate_t *istate) |
{ |
machine_irq_exception(exc_no, istate); |
} |
/** Fills exception vectors with appropriate exception handlers. */ |
void install_exception_handlers(void) |
{ |
110,7 → 323,7 |
install_handler((unsigned) irq_exception_entry, |
(unsigned *) EXC_IRQ_VEC); |
install_handler((unsigned) fiq_exception_entry, |
install_handler((unsigned)fiq_exception_entry, |
(unsigned *) EXC_FIQ_VEC); |
} |
120,32 → 333,17 |
{ |
uint32_t control_reg; |
asm volatile ( |
"mrc p15, 0, %[control_reg], c1, c1" |
: [control_reg] "=r" (control_reg) |
); |
asm volatile("mrc p15, 0, %0, c1, c1" : "=r" (control_reg)); |
/* switch on the high vectors bit */ |
control_reg |= CP15_R1_HIGH_VECTORS_BIT; |
asm volatile ( |
"mcr p15, 0, %[control_reg], c1, c1" |
:: [control_reg] "r" (control_reg) |
); |
asm volatile("mcr p15, 0, %0, c1, c1" : : "r" (control_reg)); |
} |
#endif |
/** Interrupt Exception handler. |
* |
* Determines the sources of interrupt and calls their handlers. |
*/ |
static void irq_exception(int exc_no, istate_t *istate) |
{ |
machine_irq_exception(exc_no, istate); |
} |
/** Initializes exception handling. |
* |
* |
* Installs low-level exception handlers and then registers |
* exceptions and their handlers to kernel exception dispatcher. |
*/ |
169,18 → 367,18 |
*/ |
void print_istate(istate_t *istate) |
{ |
printf("istate dump:\n"); |
printf(" r0: %x r1: %x r2: %x r3: %x\n", |
dprintf("istate dump:\n"); |
dprintf(" r0: %x r1: %x r2: %x r3: %x\n", |
istate->r0, istate->r1, istate->r2, istate->r3); |
printf(" r4: %x r5: %x r6: %x r7: %x\n", |
dprintf(" r4: %x r5: %x r6: %x r7: %x\n", |
istate->r4, istate->r5, istate->r6, istate->r7); |
printf(" r8: %x r8: %x r10: %x r11: %x\n", |
dprintf(" r8: %x r8: %x r10: %x r11: %x\n", |
istate->r8, istate->r9, istate->r10, istate->r11); |
printf(" r12: %x sp: %x lr: %x spsr: %x\n", |
dprintf(" r12: %x sp: %x lr: %x spsr: %x\n", |
istate->r12, istate->sp, istate->lr, istate->spsr); |
printf(" pc: %x\n", istate->pc); |
dprintf(" pc: %x\n", istate->pc); |
} |
/** @} |
/branches/arm/kernel/arch/arm32/src/mm/page_fault.c |
---|
34,6 → 34,7 |
*/ |
#include <panic.h> |
#include <arch/exception.h> |
#include <arch/debug/print.h> |
#include <arch/mm/page_fault.h> |
#include <mm/as.h> |
#include <genarch/mm/page_pt.h> |
48,13 → 49,12 |
static inline fault_status_t read_fault_status_register(void) |
{ |
fault_status_union_t fsu; |
/* fault status is stored in CP15 register 5 */ |
asm volatile ( |
"mrc p15, 0, %[dummy], c5, c0, 0" |
: [dummy] "=r" (fsu.dummy) |
"mrc p15, 0, %0, c5, c0, 0" |
: "=r"(fsu.dummy) |
); |
return fsu.fs; |
} |
61,18 → 61,17 |
/** Returns FAR (fault address register) content. |
* |
* @return FAR (fault address register) content (address that caused a page |
* fault) |
* fault) |
*/ |
static inline uintptr_t read_fault_address_register(void) |
{ |
uintptr_t ret; |
/* fault adress is stored in CP15 register 6 */ |
asm volatile ( |
"mrc p15, 0, %[ret], c6, c0, 0" |
: [ret] "=r" (ret) |
"mrc p15, 0, %0, c6, c0, 0" |
: "=r"(ret) |
); |
return ret; |
} |
81,26 → 80,29 |
* @param instr Instruction |
* |
* @return true when instruction is load/store, false otherwise |
* |
*/ |
static inline bool is_load_store_instruction(instruction_t instr) |
{ |
/* load store immediate offset */ |
if (instr.type == 0x2) |
if (instr.type == 0x2) { |
return true; |
} |
/* load store register offset */ |
if ((instr.type == 0x3) && (instr.bit4 == 0)) |
if (instr.type == 0x3 && instr.bit4 == 0) { |
return true; |
} |
/* load store multiple */ |
if (instr.type == 0x4) |
if (instr.type == 0x4) { |
return true; |
} |
/* oprocessor load/store */ |
if (instr.type == 0x6) |
if (instr.type == 0x6) { |
return true; |
} |
return false; |
} |
113,11 → 115,12 |
static inline bool is_swap_instruction(instruction_t instr) |
{ |
/* swap, swapb instruction */ |
if ((instr.type == 0x0) && |
((instr.opcode == 0x8) || (instr.opcode == 0xa)) && |
(instr.access == 0x0) && (instr.bits567 == 0x4) && (instr.bit4 == 1)) |
if (instr.type == 0x0 && |
(instr.opcode == 0x8 || instr.opcode == 0xa) && |
instr.access == 0x0 && instr.bits567 == 0x4 && instr.bit4 == 1) { |
return true; |
} |
return false; |
} |
139,8 → 142,8 |
/* undefined instructions */ |
if (instr.condition == 0xf) { |
panic("page_fault - instruction does not access memory " |
"(instr_code: %x, badvaddr:%x).", instr, badvaddr); |
panic("page_fault - instruction doesn't access memory " |
"(instr_code: %x, badvaddr:%x)", instr, badvaddr); |
return PF_ACCESS_EXEC; |
} |
159,7 → 162,7 |
} |
panic("page_fault - instruction doesn't access memory " |
"(instr_code: %x, badvaddr:%x).", instr, badvaddr); |
"(instr_code: %x, badvaddr:%x)", instr, badvaddr); |
return PF_ACCESS_EXEC; |
} |
181,12 → 184,12 |
if (ret == AS_PF_FAULT) { |
print_istate(istate); |
printf("page fault - pc: %x, va: %x, status: %x(%x), " |
dprintf("page fault - pc: %x, va: %x, status: %x(%x), " |
"access:%d\n", istate->pc, badvaddr, fsr.status, fsr, |
access); |
fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr); |
panic("Page fault."); |
fault_if_from_uspace(istate, "Page fault: %#x", badvaddr); |
panic("page fault\n"); |
} |
} |
200,9 → 203,9 |
int ret = as_page_fault(istate->pc, PF_ACCESS_EXEC, istate); |
if (ret == AS_PF_FAULT) { |
printf("prefetch_abort\n"); |
dprintf("prefetch_abort\n"); |
print_istate(istate); |
panic("page fault - prefetch_abort at address: %x.", |
panic("page fault - prefetch_abort at address: %x\n", |
istate->pc); |
} |
} |
/branches/arm/kernel/arch/arm32/src/mm/frame.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32mm |
/** @addtogroup arm32mm |
* @{ |
*/ |
/** @file |
37,6 → 37,7 |
#include <arch/mm/frame.h> |
#include <arch/machine.h> |
#include <config.h> |
#include <arch/debug/print.h> |
/** Address of the last frame in the memory. */ |
uintptr_t last_frame = 0; |
44,25 → 45,23 |
/** Creates memory zones. */ |
void frame_arch_init(void) |
{ |
/* all memory as one zone */ |
zone_create(0, ADDR2PFN(machine_get_memory_size()), |
BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0); |
last_frame = machine_get_memory_size(); |
/* All memory as one zone */ |
zone_create(0, ADDR2PFN(last_frame), |
BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0); |
/* blacklist boot page table */ |
frame_mark_unavailable(BOOT_PAGE_TABLE_START_FRAME, |
BOOT_PAGE_TABLE_SIZE_IN_FRAMES); |
machine_frame_init(); |
} |
/** Frees the boot page table. */ |
void boot_page_table_free(void) |
{ |
unsigned int i; |
for (i = 0; i < BOOT_PAGE_TABLE_SIZE_IN_FRAMES; i++) |
int i; |
for (i = 0; i < BOOT_PAGE_TABLE_SIZE_IN_FRAMES; i++) { |
frame_free(i * FRAME_SIZE + BOOT_PAGE_TABLE_ADDRESS); |
} |
} |
/** @} |
/branches/arm/kernel/arch/arm32/src/mm/tlb.c |
---|
48,7 → 48,7 |
asm volatile ( |
"eor r1, r1\n" |
"mcr p15, 0, r1, c8, c7, 0\n" |
::: "r1" |
: : : "r1" |
); |
} |
68,8 → 68,9 |
static inline void invalidate_page(uintptr_t page) |
{ |
asm volatile ( |
"mcr p15, 0, %[page], c8, c7, 1\n" |
:: [page] "r" (page) |
"mcr p15, 0, %0, c8, c7, 1" |
: |
: "r" (page) |
); |
} |
80,7 → 81,7 |
* @param page Address of the first page whose entry is to be invalidated. |
* @param cnt Number of entries to invalidate. |
*/ |
void tlb_invalidate_pages(asid_t asid __attribute__((unused)), uintptr_t page, size_t cnt) |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
{ |
unsigned int i; |
88,13 → 89,5 |
invalidate_page(page + i * PAGE_SIZE); |
} |
void tlb_arch_init(void) |
{ |
} |
void tlb_print(void) |
{ |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/src/mm/page.c |
---|
51,15 → 51,19 |
*/ |
void page_arch_init(void) |
{ |
int flags = PAGE_CACHEABLE; |
uintptr_t cur; |
int flags; |
page_mapping_operations = &pt_mapping_operations; |
uintptr_t cur; |
/* Kernel identity mapping */ |
for (cur = 0; cur < last_frame; cur += FRAME_SIZE) |
flags = PAGE_CACHEABLE; |
/* PA2KA(identity) mapping for all frames until last_frame */ |
for (cur = 0; cur < last_frame; cur += FRAME_SIZE) { |
page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
} |
/* Create mapping for exception table at high offset */ |
/* create mapping for exception table at high offset */ |
#ifdef HIGH_EXCEPTION_VECTORS |
void *virtaddr = frame_alloc(ONE_FRAME, FRAME_KA); |
page_mapping_insert(AS_KERNEL, EXC_BASE_ADDRESS, KA2PA(virtaddr), flags); |
66,9 → 70,9 |
#else |
#error "Only high exception vector supported now" |
#endif |
as_switch(NULL, AS_KERNEL); |
boot_page_table_free(); |
} |
86,10 → 90,10 |
{ |
if (last_frame + ALIGN_UP(size, PAGE_SIZE) > |
KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) { |
panic("Unable to map physical memory %p (%d bytes).", |
panic("Unable to map physical memory %p (%d bytes)", |
physaddr, size) |
} |
uintptr_t virtaddr = PA2KA(last_frame); |
pfn_t i; |
for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) { |
97,7 → 101,7 |
physaddr + PFN2ADDR(i), |
PAGE_NOT_CACHEABLE | PAGE_READ | PAGE_WRITE | PAGE_KERNEL); |
} |
last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE); |
return virtaddr; |
} |
/branches/arm/kernel/arch/arm32/src/debug/print.c |
---|
0,0 → 1,97 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
* @brief Debug print functions. |
*/ |
#include <printf/printf_core.h> |
#include <arch/debug/print.h> |
#include <arch/machine.h> |
/** Prints a character to the console. |
* |
* @param ch Character to be printed. |
*/ |
static void putc(char ch) |
{ |
machine_debug_putc(ch); |
} |
/** Prints a string to the console. |
* |
* @param str String to be printed. |
* @param count Number of characters to be printed. |
* @param unused Unused parameter. |
* |
* @return Number of printed characters. |
*/ |
static int debug_write(const char *str, size_t count, void *unused) |
{ |
unsigned int i; |
for (i = 0; i < count; ++i) |
putc(str[i]); |
return i; |
} |
/** Prints a formated string. |
* |
* @param fmt "Printf-like" format. |
*/ |
void debug_printf(const char *fmt, ...) |
{ |
va_list args; |
va_start (args, fmt); |
struct printf_spec ps = { |
(int (*)(void *, size_t, void *)) debug_write, |
NULL |
}; |
printf_core(fmt, &ps, args); |
va_end(args); |
} |
/** Prints a string. |
* |
* @param str String to print. |
*/ |
void debug_puts(const char *str) |
{ |
while (*str) { |
putc(*str); |
str++; |
} |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/src/cpu/cpu.c |
---|
36,7 → 36,7 |
#include <arch/cpu.h> |
#include <cpu.h> |
#include <arch.h> |
#include <print.h> |
#include <print.h> |
/** Number of indexes left out in the #imp_data array */ |
#define IMP_DATA_START_OFFSET 0x40 |
82,10 → 82,10 |
{ |
uint32_t ident; |
asm volatile ( |
"mrc p15, 0, %[ident], c0, c0, 0\n" |
: [ident] "=r" (ident) |
"mrc p15, 0, %0, c0, c0, 0\n" |
: "=r" (ident) |
); |
cpu->imp_num = ident >> 24; |
cpu->variant_num = (ident << 8) >> 28; |
cpu->arch_num = (ident << 12) >> 28; |
/branches/arm/kernel/arch/arm32/src/console.c |
---|
0,0 → 1,58 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32 |
* @{ |
*/ |
/** @file |
* @brief Console. |
*/ |
#include <console/console.h> |
#include <arch/console.h> |
#include <arch/machine.h> |
void console_init(devno_t devno) |
{ |
machine_console_init(devno); |
} |
/** Acquire console back for kernel. */ |
void arch_grab_console(void) |
{ |
machine_grab_console(); |
} |
/** Return console to userspace. */ |
void arch_release_console(void) |
{ |
machine_release_console(); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/arm32/src/panic.S |
---|
31,5 → 31,5 |
.global panic_printf |
panic_printf: |
bl printf |
bl debug_printf |
bl cpu_halt |
/branches/arm/kernel/arch/arm32/src/interrupt.c |
---|
35,9 → 35,8 |
#include <arch/asm.h> |
#include <arch/regutils.h> |
#include <ddi/irq.h> |
#include <arch/machine.h> |
#include <ddi/irq.h> |
#include <ddi/device.h> |
#include <interrupt.h> |
/** Initial size of a table holding interrupt handlers. */ |
65,7 → 64,7 |
ipl_t ipl = current_status_reg_read(); |
current_status_reg_control_write(ipl & ~STATUS_REG_IRQ_DISABLED_BIT); |
return ipl; |
} |
96,7 → 95,6 |
{ |
irq_init(IRQ_COUNT, IRQ_COUNT); |
machine_timer_irq_start(); |
} |
/** @} |
/branches/arm/kernel/arch/arm32/src/start.S |
---|
35,39 → 35,35 |
.global supervisor_sp |
kernel_image_start: |
# switch to supervisor mode |
mrs r3, cpsr |
bic r3, r3, #0x1f |
orr r3, r3, #0x13 |
msr cpsr_c, r3 |
ldr sp, =temp_stack |
# initialize Stack pointer for exception modes |
mrs r4, cpsr |
bic r4, r4, #0x1f |
cmp r2, #0 |
beq bootinfo_end |
#FIQ Mode |
orr r3, r4, #0x11 |
msr cpsr_c, r3 |
ldr sp, =exc_stack |
ldr r3, =bootinfo |
#IRQ Mode |
orr r3, r4, #0x12 |
msr cpsr_c, r3 |
ldr sp, =exc_stack |
bootinfo_loop: |
ldr r4, [r1] |
str r4, [r3] |
#ABORT Mode |
orr r3, r4, #0x17 |
msr cpsr_c, r3 |
ldr sp, =exc_stack |
add r1, r1, #4 |
add r3, r3, #4 |
add r2, r2, #-4 |
#UNDEFINED Mode |
orr r3, r4, #0x1b |
msr cpsr_c, r3 |
ldr sp, =exc_stack |
cmp r2, #0 |
bne bootinfo_loop |
bootinfo_end: |
# switch to supervisor mode |
orr r3, r4, #0x13 |
msr cpsr_c, r3 |
ldr sp, =temp_stack |
bl arch_pre_main |
bl main_bsp |
.space TEMP_STACK_SIZE |
78,3 → 74,4 |
supervisor_sp: |
.space 4 |
/branches/arm/kernel/arch/arm32/Makefile.inc |
---|
29,6 → 29,10 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf32-littlearm |
BFD_ARCH = arm |
BFD = binary |
35,37 → 39,66 |
TARGET = arm-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm |
KERNEL_LOAD_ADDRESS = 0x80200000 |
ifeq ($(MACHINE), gxemul_testarm) |
DMACHINE = MACHINE_GXEMUL_TESTARM |
else ifeq ($(MACHINE), qemu_icp) |
DMACHINE = MACHINE_QEMU_ICP |
endif |
ATSIGN = % |
GCC_CFLAGS += -fno-zero-initialized-in-bss |
BITS = 32 |
ENDIANESS = LE |
DEFS += -D__32_BITS__ -DKERNEL_LOAD_ADDRESS=$(KERNEL_LOAD_ADDRESS) -D$(DMACHINE) |
# Compile with framebuffer support |
ifeq ($(CONFIG_FB), y) |
DEFS += -DCONFIG_FB -DFB_INVERT_ENDIAN |
endif |
## Compile with hierarchical page tables support. |
# |
CONFIG_PAGE_PT = y |
DEFS += -DCONFIG_PAGE_PT |
## Compile with support for address space identifiers. |
# |
# no HW support for ASIDs |
#CONFIG_ASID = y |
#CONFIG_ASID_FIFO = y |
## Compile with support with software division and multiplication. |
# |
CONFIG_SOFTINT = y |
ARCH_SOURCES = \ |
arch/$(KARCH)/src/start.S \ |
arch/$(KARCH)/src/asm.S \ |
arch/$(KARCH)/src/exc_handler.S \ |
arch/$(KARCH)/src/arm32.c \ |
arch/$(KARCH)/src/machine_func.c \ |
arch/$(KARCH)/src/context.S \ |
arch/$(KARCH)/src/dummy.S \ |
arch/$(KARCH)/src/panic.S \ |
arch/$(KARCH)/src/cpu/cpu.c \ |
arch/$(KARCH)/src/ddi/ddi.c \ |
arch/$(KARCH)/src/interrupt.c \ |
arch/$(KARCH)/src/exception.c \ |
arch/$(KARCH)/src/userspace.c \ |
arch/$(KARCH)/src/mm/as.c \ |
arch/$(KARCH)/src/mm/frame.c \ |
arch/$(KARCH)/src/mm/page.c \ |
arch/$(KARCH)/src/mm/tlb.c \ |
arch/$(KARCH)/src/mm/page_fault.c |
ifeq ($(MACHINE), testarm) |
ARCH_SOURCES += arch/$(KARCH)/src/mach/testarm/testarm.c |
else ifeq ($(MACHINE), integratorcp) |
ARCH_SOURCES += arch/$(KARCH)/src/mach/integratorcp/integratorcp.c |
arch/$(ARCH)/src/start.S \ |
arch/$(ARCH)/src/asm.S \ |
arch/$(ARCH)/src/arm32.c \ |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/dummy.S \ |
arch/$(ARCH)/src/panic.S \ |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/interrupt.c \ |
arch/$(ARCH)/src/debug/print.c \ |
arch/$(ARCH)/src/console.c \ |
arch/$(ARCH)/src/exception.c \ |
arch/$(ARCH)/src/userspace.c \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/mm/page_fault.c |
ifeq ($(MACHINE), gxemul_testarm) |
ARCH_SOURCES += arch/$(ARCH)/src/drivers/gxemul.c |
else ifeq ($(MACHINE), qemu_icp) |
ARCH_SOURCES += arch/$(ARCH)/src/drivers/qemu.c |
endif |
ifeq ($(CONFIG_PL050), y) |
ARCH_SOURCES += genarch/src/drivers/pl050/pl050.c |
endif |
/branches/arm/kernel/arch/arm32/_link.ld.in |
---|
1,16 → 1,15 |
/* |
* ARM linker script |
* |
* ARM linker script |
* |
* kernel text |
* kernel data |
* |
* |
*/ |
#define KERNEL_LOAD_ADDRESS 0x80200000 |
OUTPUT_ARCH(arm) |
ENTRY(kernel_image_start) |
ENTRY(kernel_image_start) |
SECTIONS { |
. = KERNEL_LOAD_ADDRESS; |
.text : { |
20,29 → 19,29 |
} |
.data : { |
kdata_start = .; |
*(.data); /* initialized data */ |
*(.data); /* initialized data */ |
hardcoded_ktext_size = .; |
LONG(ktext_end - ktext_start); |
LONG(ktext_end - ktext_start); |
hardcoded_kdata_size = .; |
LONG(kdata_end - kdata_start); |
hardcoded_load_address = .; |
LONG(KERNEL_LOAD_ADDRESS); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
*(.rodata*); |
*(.sdata); |
*(.reginfo); |
symbol_table = .; |
*(symtab.*); |
*(symtab.*); |
} |
.sbss : { |
*(.sbss); |
*(.scommon); |
} |
kdata_end = .; |
/DISCARD/ : { |
*(.mdebug*); |
*(.pdr); |
49,4 → 48,5 |
*(.comment); |
*(.note); |
} |
} |
/branches/arm/kernel/arch/sparc64/include/cpu_node.h |
---|
File deleted |
/branches/arm/kernel/arch/sparc64/include/cpu_family.h |
---|
File deleted |
/branches/arm/kernel/arch/sparc64/include/trap/trap_table.h |
---|
100,7 → 100,7 |
.macro PREEMPTIBLE_HANDLER f |
sethi %hi(\f), %g1 |
ba %xcc, preemptible_handler |
b preemptible_handler |
or %g1, %lo(\f), %g1 |
.endm |
/branches/arm/kernel/arch/sparc64/include/trap/mmu.h |
---|
103,20 → 103,17 |
* Note that branch-delay slots are used in order to save space. |
*/ |
0: |
sethi %hi(fast_data_access_mmu_miss_data_hi), %g7 |
wr %g0, ASI_DMMU, %asi |
ldxa [VA_DMMU_TAG_ACCESS] %asi, %g1 ! read the faulting Context and VPN |
mov VA_DMMU_TAG_ACCESS, %g1 |
ldxa [%g1] ASI_DMMU, %g1 ! read the faulting Context and VPN |
set TLB_TAG_ACCESS_CONTEXT_MASK, %g2 |
andcc %g1, %g2, %g3 ! get Context |
bnz %xcc, 0f ! Context is non-zero |
bnz 0f ! Context is non-zero |
andncc %g1, %g2, %g3 ! get page address into %g3 |
bz %xcc, 0f ! page address is zero |
ldx [%g7 + %lo(end_of_identity)], %g4 |
cmp %g3, %g4 |
bgeu %xcc, 0f |
bz 0f ! page address is zero |
ldx [%g7 + %lo(kernel_8k_tlb_data_template)], %g2 |
add %g3, %g2, %g2 |
sethi %hi(kernel_8k_tlb_data_template), %g2 |
ldx [%g2 + %lo(kernel_8k_tlb_data_template)], %g2 |
or %g3, %g2, %g2 |
stxa %g2, [%g0] ASI_DTLB_DATA_IN_REG ! identity map the kernel page |
retry |
141,7 → 138,8 |
* Read the Tag Access register for the higher-level handler. |
* This is necessary to survive nested DTLB misses. |
*/ |
ldxa [VA_DMMU_TAG_ACCESS] %asi, %g2 |
mov VA_DMMU_TAG_ACCESS, %g2 |
ldxa [%g2] ASI_DMMU, %g2 |
/* |
* g2 will be passed as an argument to fast_data_access_mmu_miss(). |
/branches/arm/kernel/arch/sparc64/include/trap/interrupt.h |
---|
49,43 → 49,21 |
/* Interrupt ASI registers. */ |
#define ASI_INTR_W 0x77 |
#define ASI_UDB_INTR_W 0x77 |
#define ASI_INTR_DISPATCH_STATUS 0x48 |
#define ASI_INTR_R 0x7f |
#define ASI_UDB_INTR_R 0x7f |
#define ASI_INTR_RECEIVE 0x49 |
/* VA's used with ASI_INTR_W register. */ |
#if defined (US) |
/* VA's used with ASI_UDB_INTR_W register. */ |
#define ASI_UDB_INTR_W_DATA_0 0x40 |
#define ASI_UDB_INTR_W_DATA_1 0x50 |
#define ASI_UDB_INTR_W_DATA_2 0x60 |
#elif defined (US3) |
#define VA_INTR_W_DATA_0 0x40 |
#define VA_INTR_W_DATA_1 0x48 |
#define VA_INTR_W_DATA_2 0x50 |
#define VA_INTR_W_DATA_3 0x58 |
#define VA_INTR_W_DATA_4 0x60 |
#define VA_INTR_W_DATA_5 0x68 |
#define VA_INTR_W_DATA_6 0x80 |
#define VA_INTR_W_DATA_7 0x88 |
#endif |
#define VA_INTR_W_DISPATCH 0x70 |
#define ASI_UDB_INTR_W_DISPATCH 0x70 |
/* VA's used with ASI_INTR_R register. */ |
#if defined(US) |
/* VA's used with ASI_UDB_INTR_R register. */ |
#define ASI_UDB_INTR_R_DATA_0 0x40 |
#define ASI_UDB_INTR_R_DATA_1 0x50 |
#define ASI_UDB_INTR_R_DATA_2 0x60 |
#elif defined (US3) |
#define VA_INTR_R_DATA_0 0x40 |
#define VA_INTR_R_DATA_1 0x48 |
#define VA_INTR_R_DATA_2 0x50 |
#define VA_INTR_R_DATA_3 0x58 |
#define VA_INTR_R_DATA_4 0x60 |
#define VA_INTR_R_DATA_5 0x68 |
#define VA_INTR_R_DATA_6 0x80 |
#define VA_INTR_R_DATA_7 0x88 |
#endif |
/* Shifts in the Interrupt Vector Dispatch virtual address. */ |
#define INTR_VEC_DISPATCH_MID_SHIFT 14 |
/branches/arm/kernel/arch/sparc64/include/trap/regwin.h |
---|
39,7 → 39,6 |
#include <arch/stack.h> |
#include <arch/arch.h> |
#include <align.h> |
#define TT_CLEAN_WINDOW 0x24 |
#define TT_SPILL_0_NORMAL 0x80 /* kernel spills */ |
73,11 → 72,6 |
#define I6_OFFSET 112 |
#define I7_OFFSET 120 |
/* Uspace Window Buffer constants. */ |
#define UWB_SIZE ((NWINDOWS - 1) * STACK_WINDOW_SAVE_AREA_SIZE) |
#define UWB_ALIGNMENT 1024 |
#define UWB_ASIZE ALIGN_UP(UWB_SIZE, UWB_ALIGNMENT) |
#ifdef __ASM__ |
/* |
/branches/arm/kernel/arch/sparc64/include/atomic.h |
---|
123,7 → 123,7 |
"ldx %0, %2\n" |
"brz %2, 0b\n" |
"nop\n" |
"ba %xcc, 1b\n" |
"ba 1b\n" |
"nop\n" |
"2:\n" |
: "+m" (*((uint64_t *) x)), "+r" (tmp1), "+r" (tmp2) : "r" (0) |
/branches/arm/kernel/arch/sparc64/include/mm/tlb.h |
---|
35,17 → 35,9 |
#ifndef KERN_sparc64_TLB_H_ |
#define KERN_sparc64_TLB_H_ |
#if defined (US) |
#define ITLB_ENTRY_COUNT 64 |
#define DTLB_ENTRY_COUNT 64 |
#define DTLB_MAX_LOCKED_ENTRIES DTLB_ENTRY_COUNT |
#endif |
/** TLB_DSMALL is the only of the three DMMUs that can hold locked entries. */ |
#if defined (US3) |
#define DTLB_MAX_LOCKED_ENTRIES 16 |
#endif |
#define MEM_CONTEXT_KERNEL 0 |
#define MEM_CONTEXT_TEMP 1 |
61,9 → 53,6 |
/* TLB Demap Operation types. */ |
#define TLB_DEMAP_PAGE 0 |
#define TLB_DEMAP_CONTEXT 1 |
#if defined (US3) |
#define TLB_DEMAP_ALL 2 |
#endif |
#define TLB_DEMAP_TYPE_SHIFT 6 |
72,18 → 61,6 |
#define TLB_DEMAP_SECONDARY 1 |
#define TLB_DEMAP_NUCLEUS 2 |
/* There are more TLBs in one MMU in US3, their codes are defined here. */ |
#if defined (US3) |
/* D-MMU: one small (16-entry) TLB and two big (512-entry) TLBs */ |
#define TLB_DSMALL 0 |
#define TLB_DBIG_0 2 |
#define TLB_DBIG_1 3 |
/* I-MMU: one small (16-entry) TLB and one big TLB */ |
#define TLB_ISMALL 0 |
#define TLB_IBIG 2 |
#endif |
#define TLB_DEMAP_CONTEXT_SHIFT 4 |
/* TLB Tag Access shifts */ |
99,8 → 76,6 |
#include <arch/asm.h> |
#include <arch/barrier.h> |
#include <arch/types.h> |
#include <arch/register.h> |
#include <arch/cpu.h> |
union tlb_context_reg { |
uint64_t v; |
115,9 → 90,6 |
typedef tte_data_t tlb_data_t; |
/** I-/D-TLB Data Access Address in Alternate Space. */ |
#if defined (US) |
union tlb_data_access_addr { |
uint64_t value; |
struct { |
126,54 → 98,9 |
unsigned : 3; |
} __attribute__ ((packed)); |
}; |
typedef union tlb_data_access_addr dtlb_data_access_addr_t; |
typedef union tlb_data_access_addr dtlb_tag_read_addr_t; |
typedef union tlb_data_access_addr itlb_data_access_addr_t; |
typedef union tlb_data_access_addr itlb_tag_read_addr_t; |
typedef union tlb_data_access_addr tlb_data_access_addr_t; |
typedef union tlb_data_access_addr tlb_tag_read_addr_t; |
#elif defined (US3) |
/* |
* In US3, I-MMU and D-MMU have different formats of the data |
* access register virtual address. In the corresponding |
* structures the member variable for the entry number is |
* called "local_tlb_entry" - it contrasts with the "tlb_entry" |
* for the US data access register VA structure. The rationale |
* behind this is to prevent careless mistakes in the code |
* caused by setting only the entry number and not the TLB |
* number in the US3 code (when taking the code from US). |
*/ |
union dtlb_data_access_addr { |
uint64_t value; |
struct { |
uint64_t : 45; |
unsigned : 1; |
unsigned tlb_number : 2; |
unsigned : 4; |
unsigned local_tlb_entry : 9; |
unsigned : 3; |
} __attribute__ ((packed)); |
}; |
typedef union dtlb_data_access_addr dtlb_data_access_addr_t; |
typedef union dtlb_data_access_addr dtlb_tag_read_addr_t; |
union itlb_data_access_addr { |
uint64_t value; |
struct { |
uint64_t : 45; |
unsigned : 1; |
unsigned tlb_number : 2; |
unsigned : 6; |
unsigned local_tlb_entry : 7; |
unsigned : 3; |
} __attribute__ ((packed)); |
}; |
typedef union itlb_data_access_addr itlb_data_access_addr_t; |
typedef union itlb_data_access_addr itlb_tag_read_addr_t; |
#endif |
/** I-/D-TLB Tag Read Register. */ |
union tlb_tag_read_reg { |
uint64_t value; |
191,13 → 118,8 |
uint64_t value; |
struct { |
uint64_t vpn: 51; /**< Virtual Address bits 63:13. */ |
#if defined (US) |
unsigned : 6; /**< Ignored. */ |
unsigned type : 1; /**< The type of demap operation. */ |
#elif defined (US3) |
unsigned : 5; /**< Ignored. */ |
unsigned type: 2; /**< The type of demap operation. */ |
#endif |
unsigned context : 2; /**< Context register selection. */ |
unsigned : 4; /**< Zero. */ |
} __attribute__ ((packed)); |
208,19 → 130,10 |
union tlb_sfsr_reg { |
uint64_t value; |
struct { |
#if defined (US) |
unsigned long : 40; /**< Implementation dependent. */ |
unsigned asi : 8; /**< ASI. */ |
unsigned : 2; |
unsigned ft : 7; /**< Fault type. */ |
#elif defined (US3) |
unsigned long : 39; /**< Implementation dependent. */ |
unsigned nf : 1; /**< Non-faulting load. */ |
unsigned asi : 8; /**< ASI. */ |
unsigned tm : 1; /**< I-TLB miss. */ |
unsigned : 3; /**< Reserved. */ |
unsigned ft : 5; /**< Fault type. */ |
#endif |
unsigned e : 1; /**< Side-effect bit. */ |
unsigned ct : 2; /**< Context Register selection. */ |
unsigned pr : 1; /**< Privilege bit. */ |
231,53 → 144,9 |
}; |
typedef union tlb_sfsr_reg tlb_sfsr_reg_t; |
#if defined (US3) |
/* |
* Functions for determining the number of entries in TLBs. They either return |
* a constant value or a value based on the CPU autodetection. |
*/ |
/** |
* Determine the number of entries in the DMMU's small TLB. |
*/ |
static inline uint16_t tlb_dsmall_size(void) |
{ |
return 16; |
} |
/** |
* Determine the number of entries in each DMMU's big TLB. |
*/ |
static inline uint16_t tlb_dbig_size(void) |
{ |
return 512; |
} |
/** |
* Determine the number of entries in the IMMU's small TLB. |
*/ |
static inline uint16_t tlb_ismall_size(void) |
{ |
return 16; |
} |
/** |
* Determine the number of entries in the IMMU's big TLB. |
*/ |
static inline uint16_t tlb_ibig_size(void) |
{ |
if (((ver_reg_t) ver_read()).impl == IMPL_ULTRASPARCIV_PLUS) |
return 512; |
else |
return 128; |
} |
#endif |
/** Read MMU Primary Context Register. |
* |
* @return Current value of Primary Context Register. |
* @return Current value of Primary Context Register. |
*/ |
static inline uint64_t mmu_primary_context_read(void) |
{ |
286,7 → 155,7 |
/** Write MMU Primary Context Register. |
* |
* @param v New value of Primary Context Register. |
* @param v New value of Primary Context Register. |
*/ |
static inline void mmu_primary_context_write(uint64_t v) |
{ |
296,7 → 165,7 |
/** Read MMU Secondary Context Register. |
* |
* @return Current value of Secondary Context Register. |
* @return Current value of Secondary Context Register. |
*/ |
static inline uint64_t mmu_secondary_context_read(void) |
{ |
305,7 → 174,7 |
/** Write MMU Primary Context Register. |
* |
* @param v New value of Primary Context Register. |
* @param v New value of Primary Context Register. |
*/ |
static inline void mmu_secondary_context_write(uint64_t v) |
{ |
313,18 → 182,15 |
flush_pipeline(); |
} |
#if defined (US) |
/** Read IMMU TLB Data Access Register. |
* |
* @param entry TLB Entry index. |
* @param entry TLB Entry index. |
* |
* @return Current value of specified IMMU TLB Data Access |
* Register. |
* @return Current value of specified IMMU TLB Data Access Register. |
*/ |
static inline uint64_t itlb_data_access_read(size_t entry) |
static inline uint64_t itlb_data_access_read(index_t entry) |
{ |
itlb_data_access_addr_t reg; |
tlb_data_access_addr_t reg; |
reg.value = 0; |
reg.tlb_entry = entry; |
333,12 → 199,12 |
/** Write IMMU TLB Data Access Register. |
* |
* @param entry TLB Entry index. |
* @param value Value to be written. |
* @param entry TLB Entry index. |
* @param value Value to be written. |
*/ |
static inline void itlb_data_access_write(size_t entry, uint64_t value) |
static inline void itlb_data_access_write(index_t entry, uint64_t value) |
{ |
itlb_data_access_addr_t reg; |
tlb_data_access_addr_t reg; |
reg.value = 0; |
reg.tlb_entry = entry; |
348,14 → 214,13 |
/** Read DMMU TLB Data Access Register. |
* |
* @param entry TLB Entry index. |
* @param entry TLB Entry index. |
* |
* @return Current value of specified DMMU TLB Data Access |
* Register. |
* @return Current value of specified DMMU TLB Data Access Register. |
*/ |
static inline uint64_t dtlb_data_access_read(size_t entry) |
static inline uint64_t dtlb_data_access_read(index_t entry) |
{ |
dtlb_data_access_addr_t reg; |
tlb_data_access_addr_t reg; |
reg.value = 0; |
reg.tlb_entry = entry; |
364,12 → 229,12 |
/** Write DMMU TLB Data Access Register. |
* |
* @param entry TLB Entry index. |
* @param value Value to be written. |
* @param entry TLB Entry index. |
* @param value Value to be written. |
*/ |
static inline void dtlb_data_access_write(size_t entry, uint64_t value) |
static inline void dtlb_data_access_write(index_t entry, uint64_t value) |
{ |
dtlb_data_access_addr_t reg; |
tlb_data_access_addr_t reg; |
reg.value = 0; |
reg.tlb_entry = entry; |
379,13 → 244,13 |
/** Read IMMU TLB Tag Read Register. |
* |
* @param entry TLB Entry index. |
* @param entry TLB Entry index. |
* |
* @return Current value of specified IMMU TLB Tag Read Register. |
* @return Current value of specified IMMU TLB Tag Read Register. |
*/ |
static inline uint64_t itlb_tag_read_read(size_t entry) |
static inline uint64_t itlb_tag_read_read(index_t entry) |
{ |
itlb_tag_read_addr_t tag; |
tlb_tag_read_addr_t tag; |
tag.value = 0; |
tag.tlb_entry = entry; |
394,13 → 259,13 |
/** Read DMMU TLB Tag Read Register. |
* |
* @param entry TLB Entry index. |
* @param entry TLB Entry index. |
* |
* @return Current value of specified DMMU TLB Tag Read Register. |
* @return Current value of specified DMMU TLB Tag Read Register. |
*/ |
static inline uint64_t dtlb_tag_read_read(size_t entry) |
static inline uint64_t dtlb_tag_read_read(index_t entry) |
{ |
dtlb_tag_read_addr_t tag; |
tlb_tag_read_addr_t tag; |
tag.value = 0; |
tag.tlb_entry = entry; |
407,120 → 272,9 |
return asi_u64_read(ASI_DTLB_TAG_READ_REG, tag.value); |
} |
#elif defined (US3) |
/** Read IMMU TLB Data Access Register. |
* |
* @param tlb TLB number (one of TLB_ISMALL or TLB_IBIG) |
* @param entry TLB Entry index. |
* |
* @return Current value of specified IMMU TLB Data Access |
* Register. |
*/ |
static inline uint64_t itlb_data_access_read(int tlb, size_t entry) |
{ |
itlb_data_access_addr_t reg; |
reg.value = 0; |
reg.tlb_number = tlb; |
reg.local_tlb_entry = entry; |
return asi_u64_read(ASI_ITLB_DATA_ACCESS_REG, reg.value); |
} |
/** Write IMMU TLB Data Access Register. |
* @param tlb TLB number (one of TLB_ISMALL or TLB_IBIG) |
* @param entry TLB Entry index. |
* @param value Value to be written. |
*/ |
static inline void itlb_data_access_write(int tlb, size_t entry, |
uint64_t value) |
{ |
itlb_data_access_addr_t reg; |
reg.value = 0; |
reg.tlb_number = tlb; |
reg.local_tlb_entry = entry; |
asi_u64_write(ASI_ITLB_DATA_ACCESS_REG, reg.value, value); |
flush_pipeline(); |
} |
/** Read DMMU TLB Data Access Register. |
* |
* @param tlb TLB number (one of TLB_DSMALL, TLB_DBIG, TLB_DBIG) |
* @param entry TLB Entry index. |
* |
* @return Current value of specified DMMU TLB Data Access |
* Register. |
*/ |
static inline uint64_t dtlb_data_access_read(int tlb, size_t entry) |
{ |
dtlb_data_access_addr_t reg; |
reg.value = 0; |
reg.tlb_number = tlb; |
reg.local_tlb_entry = entry; |
return asi_u64_read(ASI_DTLB_DATA_ACCESS_REG, reg.value); |
} |
/** Write DMMU TLB Data Access Register. |
* |
* @param tlb TLB number (one of TLB_DSMALL, TLB_DBIG_0, TLB_DBIG_1) |
* @param entry TLB Entry index. |
* @param value Value to be written. |
*/ |
static inline void dtlb_data_access_write(int tlb, size_t entry, |
uint64_t value) |
{ |
dtlb_data_access_addr_t reg; |
reg.value = 0; |
reg.tlb_number = tlb; |
reg.local_tlb_entry = entry; |
asi_u64_write(ASI_DTLB_DATA_ACCESS_REG, reg.value, value); |
membar(); |
} |
/** Read IMMU TLB Tag Read Register. |
* |
* @param tlb TLB number (one of TLB_ISMALL or TLB_IBIG) |
* @param entry TLB Entry index. |
* |
* @return Current value of specified IMMU TLB Tag Read Register. |
*/ |
static inline uint64_t itlb_tag_read_read(int tlb, size_t entry) |
{ |
itlb_tag_read_addr_t tag; |
tag.value = 0; |
tag.tlb_number = tlb; |
tag.local_tlb_entry = entry; |
return asi_u64_read(ASI_ITLB_TAG_READ_REG, tag.value); |
} |
/** Read DMMU TLB Tag Read Register. |
* |
* @param tlb TLB number (one of TLB_DSMALL, TLB_DBIG_0, TLB_DBIG_1) |
* @param entry TLB Entry index. |
* |
* @return Current value of specified DMMU TLB Tag Read Register. |
*/ |
static inline uint64_t dtlb_tag_read_read(int tlb, size_t entry) |
{ |
dtlb_tag_read_addr_t tag; |
tag.value = 0; |
tag.tlb_number = tlb; |
tag.local_tlb_entry = entry; |
return asi_u64_read(ASI_DTLB_TAG_READ_REG, tag.value); |
} |
#endif |
/** Write IMMU TLB Tag Access Register. |
* |
* @param v Value to be written. |
* @param v Value to be written. |
*/ |
static inline void itlb_tag_access_write(uint64_t v) |
{ |
530,7 → 284,7 |
/** Read IMMU TLB Tag Access Register. |
* |
* @return Current value of IMMU TLB Tag Access Register. |
* @return Current value of IMMU TLB Tag Access Register. |
*/ |
static inline uint64_t itlb_tag_access_read(void) |
{ |
539,7 → 293,7 |
/** Write DMMU TLB Tag Access Register. |
* |
* @param v Value to be written. |
* @param v Value to be written. |
*/ |
static inline void dtlb_tag_access_write(uint64_t v) |
{ |
549,7 → 303,7 |
/** Read DMMU TLB Tag Access Register. |
* |
* @return Current value of DMMU TLB Tag Access Register. |
* @return Current value of DMMU TLB Tag Access Register. |
*/ |
static inline uint64_t dtlb_tag_access_read(void) |
{ |
559,7 → 313,7 |
/** Write IMMU TLB Data in Register. |
* |
* @param v Value to be written. |
* @param v Value to be written. |
*/ |
static inline void itlb_data_in_write(uint64_t v) |
{ |
569,7 → 323,7 |
/** Write DMMU TLB Data in Register. |
* |
* @param v Value to be written. |
* @param v Value to be written. |
*/ |
static inline void dtlb_data_in_write(uint64_t v) |
{ |
579,7 → 333,7 |
/** Read ITLB Synchronous Fault Status Register. |
* |
* @return Current content of I-SFSR register. |
* @return Current content of I-SFSR register. |
*/ |
static inline uint64_t itlb_sfsr_read(void) |
{ |
588,7 → 342,7 |
/** Write ITLB Synchronous Fault Status Register. |
* |
* @param v New value of I-SFSR register. |
* @param v New value of I-SFSR register. |
*/ |
static inline void itlb_sfsr_write(uint64_t v) |
{ |
598,7 → 352,7 |
/** Read DTLB Synchronous Fault Status Register. |
* |
* @return Current content of D-SFSR register. |
* @return Current content of D-SFSR register. |
*/ |
static inline uint64_t dtlb_sfsr_read(void) |
{ |
607,7 → 361,7 |
/** Write DTLB Synchronous Fault Status Register. |
* |
* @param v New value of D-SFSR register. |
* @param v New value of D-SFSR register. |
*/ |
static inline void dtlb_sfsr_write(uint64_t v) |
{ |
617,7 → 371,7 |
/** Read DTLB Synchronous Fault Address Register. |
* |
* @return Current content of D-SFAR register. |
* @return Current content of D-SFAR register. |
*/ |
static inline uint64_t dtlb_sfar_read(void) |
{ |
626,11 → 380,10 |
/** Perform IMMU TLB Demap Operation. |
* |
* @param type Selects between context and page demap (and entire MMU |
* demap on US3). |
* @param type Selects between context and page demap. |
* @param context_encoding Specifies which Context register has Context ID for |
* demap. |
* @param page Address which is on the page to be demapped. |
* demap. |
* @param page Address which is on the page to be demapped. |
*/ |
static inline void itlb_demap(int type, int context_encoding, uintptr_t page) |
{ |
644,19 → 397,18 |
da.context = context_encoding; |
da.vpn = pg.vpn; |
/* da.value is the address within the ASI */ |
asi_u64_write(ASI_IMMU_DEMAP, da.value, 0); |
asi_u64_write(ASI_IMMU_DEMAP, da.value, 0); /* da.value is the |
* address within the |
* ASI */ |
flush_pipeline(); |
} |
/** Perform DMMU TLB Demap Operation. |
* |
* @param type Selects between context and page demap (and entire MMU |
* demap on US3). |
* @param type Selects between context and page demap. |
* @param context_encoding Specifies which Context register has Context ID for |
* demap. |
* @param page Address which is on the page to be demapped. |
* demap. |
* @param page Address which is on the page to be demapped. |
*/ |
static inline void dtlb_demap(int type, int context_encoding, uintptr_t page) |
{ |
670,17 → 422,17 |
da.context = context_encoding; |
da.vpn = pg.vpn; |
/* da.value is the address within the ASI */ |
asi_u64_write(ASI_DMMU_DEMAP, da.value, 0); |
asi_u64_write(ASI_DMMU_DEMAP, da.value, 0); /* da.value is the |
* address within the |
* ASI */ |
membar(); |
} |
extern void fast_instruction_access_mmu_miss(unative_t, istate_t *); |
extern void fast_data_access_mmu_miss(tlb_tag_access_reg_t, istate_t *); |
extern void fast_data_access_protection(tlb_tag_access_reg_t , istate_t *); |
extern void fast_instruction_access_mmu_miss(unative_t unused, istate_t *istate); |
extern void fast_data_access_mmu_miss(tlb_tag_access_reg_t tag, istate_t *istate); |
extern void fast_data_access_protection(tlb_tag_access_reg_t tag , istate_t *istate); |
extern void dtlb_insert_mapping(uintptr_t, uintptr_t, int, bool, bool); |
extern void dtlb_insert_mapping(uintptr_t page, uintptr_t frame, int pagesize, bool locked, bool cacheable); |
extern void dump_sfsr_and_sfar(void); |
/branches/arm/kernel/arch/sparc64/include/mm/cache_spec.h |
---|
38,20 → 38,19 |
/* |
* The following macros are valid for the following processors: |
* |
* UltraSPARC, UltraSPARC II, UltraSPARC IIi, UltraSPARC III, |
* UltraSPARC III+, UltraSPARC IV, UltraSPARC IV+ |
* UltraSPARC, UltraSPARC II, UltraSPARC IIi |
* |
* Should we support other UltraSPARC processors, we need to make sure that |
* the macros are defined correctly for them. |
*/ |
#if defined (US) |
#define DCACHE_SIZE (16 * 1024) |
#elif defined (US3) |
#define DCACHE_SIZE (64 * 1024) |
#endif |
#define DCACHE_LINE_SIZE 32 |
#define ICACHE_SIZE (16 * 1024) |
#define ICACHE_WAYS 2 |
#define ICACHE_LINE_SIZE 32 |
#endif |
/** @} |
/branches/arm/kernel/arch/sparc64/include/mm/frame.h |
---|
59,13 → 59,8 |
union frame_address { |
uintptr_t address; |
struct { |
#if defined (US) |
unsigned : 23; |
uint64_t pfn : 28; /**< Physical Frame Number. */ |
#elif defined (US3) |
unsigned : 21; |
uint64_t pfn : 30; /**< Physical Frame Number. */ |
#endif |
unsigned offset : 13; /**< Offset. */ |
} __attribute__ ((packed)); |
}; |
73,8 → 68,6 |
typedef union frame_address frame_address_t; |
extern uintptr_t last_frame; |
extern uintptr_t end_of_identity; |
extern void frame_arch_init(void); |
#define physmem_print() |
/branches/arm/kernel/arch/sparc64/include/mm/cache.h |
---|
38,6 → 38,15 |
#include <mm/page.h> |
#include <mm/frame.h> |
#define dcache_flush_page(p) \ |
dcache_flush_color(PAGE_COLOR((p))) |
#define dcache_flush_frame(p, f) \ |
dcache_flush_tag(PAGE_COLOR((p)), ADDR2PFN((f))); |
extern void dcache_flush(void); |
extern void dcache_flush_color(int c); |
extern void dcache_flush_tag(int c, pfn_t tag); |
#endif |
/** @} |
/branches/arm/kernel/arch/sparc64/include/mm/tsb.h |
---|
107,62 → 107,13 |
asi_u64_write(ASI_DMMU, VA_DMMU_TSB_BASE, v); |
} |
#if defined (US3) |
/** Write DTSB Primary Extension register. |
* |
* @param v New content of the DTSB Primary Extension register. |
*/ |
static inline void dtsb_primary_extension_write(uint64_t v) |
{ |
asi_u64_write(ASI_DMMU, VA_DMMU_PRIMARY_EXTENSION, v); |
} |
/** Write DTSB Secondary Extension register. |
* |
* @param v New content of the DTSB Secondary Extension register. |
*/ |
static inline void dtsb_secondary_extension_write(uint64_t v) |
{ |
asi_u64_write(ASI_DMMU, VA_DMMU_SECONDARY_EXTENSION, v); |
} |
/** Write DTSB Nucleus Extension register. |
* |
* @param v New content of the DTSB Nucleus Extension register. |
*/ |
static inline void dtsb_nucleus_extension_write(uint64_t v) |
{ |
asi_u64_write(ASI_DMMU, VA_DMMU_NUCLEUS_EXTENSION, v); |
} |
/** Write ITSB Primary Extension register. |
* |
* @param v New content of the ITSB Primary Extension register. |
*/ |
static inline void itsb_primary_extension_write(uint64_t v) |
{ |
asi_u64_write(ASI_IMMU, VA_IMMU_PRIMARY_EXTENSION, v); |
} |
/** Write ITSB Nucleus Extension register. |
* |
* @param v New content of the ITSB Nucleus Extension register. |
*/ |
static inline void itsb_nucleus_extension_write(uint64_t v) |
{ |
asi_u64_write(ASI_IMMU, VA_IMMU_NUCLEUS_EXTENSION, v); |
} |
#endif |
/* Forward declarations. */ |
struct as; |
struct pte; |
extern void tsb_invalidate(struct as *as, uintptr_t page, size_t pages); |
extern void itsb_pte_copy(struct pte *t, size_t index); |
extern void dtsb_pte_copy(struct pte *t, size_t index, bool ro); |
extern void tsb_invalidate(struct as *as, uintptr_t page, count_t pages); |
extern void itsb_pte_copy(struct pte *t, index_t index); |
extern void dtsb_pte_copy(struct pte *t, index_t index, bool ro); |
#endif /* !def __ASM__ */ |
/branches/arm/kernel/arch/sparc64/include/mm/mmu.h |
---|
35,10 → 35,8 |
#ifndef KERN_sparc64_MMU_H_ |
#define KERN_sparc64_MMU_H_ |
#if defined(US) |
/* LSU Control Register ASI. */ |
#define ASI_LSU_CONTROL_REG 0x45 /**< Load/Store Unit Control Register. */ |
#endif |
/* I-MMU ASIs. */ |
#define ASI_IMMU 0x50 |
54,12 → 52,7 |
#define VA_IMMU_SFSR 0x18 /**< IMMU sync fault status register. */ |
#define VA_IMMU_TSB_BASE 0x28 /**< IMMU TSB base register. */ |
#define VA_IMMU_TAG_ACCESS 0x30 /**< IMMU TLB tag access register. */ |
#if defined (US3) |
#define VA_IMMU_PRIMARY_EXTENSION 0x48 /**< IMMU TSB primary extension register */ |
#define VA_IMMU_NUCLEUS_EXTENSION 0x58 /**< IMMU TSB nucleus extension register */ |
#endif |
/* D-MMU ASIs. */ |
#define ASI_DMMU 0x58 |
#define ASI_DMMU_TSB_8KB_PTR_REG 0x59 |
80,11 → 73,6 |
#define VA_DMMU_TAG_ACCESS 0x30 /**< DMMU TLB tag access register. */ |
#define VA_DMMU_VA_WATCHPOINT_REG 0x38 /**< DMMU VA data watchpoint register. */ |
#define VA_DMMU_PA_WATCHPOINT_REG 0x40 /**< DMMU PA data watchpoint register. */ |
#if defined (US3) |
#define VA_DMMU_PRIMARY_EXTENSION 0x48 /**< DMMU TSB primary extension register */ |
#define VA_DMMU_SECONDARY_EXTENSION 0x50 /**< DMMU TSB secondary extension register */ |
#define VA_DMMU_NUCLEUS_EXTENSION 0x58 /**< DMMU TSB nucleus extension register */ |
#endif |
#ifndef __ASM__ |
92,7 → 80,6 |
#include <arch/barrier.h> |
#include <arch/types.h> |
#if defined(US) |
/** LSU Control Register. */ |
typedef union { |
uint64_t value; |
113,7 → 100,6 |
} __attribute__ ((packed)); |
} lsu_cr_reg_t; |
#endif /* US */ |
#endif /* !def __ASM__ */ |
/branches/arm/kernel/arch/sparc64/include/mm/tte.h |
---|
50,7 → 50,6 |
#include <arch/types.h> |
/* TTE tag's VA_tag field contains bits <63:VA_TAG_PAGE_SHIFT> of the VA */ |
#define VA_TAG_PAGE_SHIFT 22 |
/** Translation Table Entry - Tag. */ |
76,13 → 75,8 |
unsigned nfo : 1; /**< No-Fault-Only. */ |
unsigned ie : 1; /**< Invert Endianness. */ |
unsigned soft2 : 9; /**< Software defined field. */ |
#if defined (US) |
unsigned diag : 9; /**< Diagnostic data. */ |
unsigned pfn : 28; /**< Physical Address bits, bits 40:13. */ |
#elif defined (US3) |
unsigned : 7; /**< Reserved. */ |
unsigned pfn : 30; /**< Physical Address bits, bits 42:13 */ |
#endif |
unsigned soft : 6; /**< Software defined field. */ |
unsigned l : 1; /**< Lock. */ |
unsigned cp : 1; /**< Cacheable in physically indexed cache. */ |
/branches/arm/kernel/arch/sparc64/include/barrier.h |
---|
82,8 → 82,6 |
asm volatile ("membar #Sync\n"); |
} |
#if defined (US) |
#define smc_coherence(a) \ |
{ \ |
write_barrier(); \ |
99,22 → 97,6 |
flush((void *)(a) + i); \ |
} |
#elif defined (US3) |
#define smc_coherence(a) \ |
{ \ |
write_barrier(); \ |
flush_pipeline(); \ |
} |
#define smc_coherence_block(a, l) \ |
{ \ |
write_barrier(); \ |
flush_pipeline(); \ |
} |
#endif /* defined(US3) */ |
#endif |
/** @} |
/branches/arm/kernel/arch/sparc64/include/memstr.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64 |
/** @addtogroup sparc64 |
* @{ |
*/ |
/** @file |
/branches/arm/kernel/arch/sparc64/include/asm.h |
---|
42,56 → 42,7 |
#include <arch/register.h> |
#include <config.h> |
#include <arch/stack.h> |
#include <arch/barrier.h> |
static inline void pio_write_8(ioport8_t *port, uint8_t v) |
{ |
*port = v; |
memory_barrier(); |
} |
static inline void pio_write_16(ioport16_t *port, uint16_t v) |
{ |
*port = v; |
memory_barrier(); |
} |
static inline void pio_write_32(ioport32_t *port, uint32_t v) |
{ |
*port = v; |
memory_barrier(); |
} |
static inline uint8_t pio_read_8(ioport8_t *port) |
{ |
uint8_t rv; |
rv = *port; |
memory_barrier(); |
return rv; |
} |
static inline uint16_t pio_read_16(ioport16_t *port) |
{ |
uint16_t rv; |
rv = *port; |
memory_barrier(); |
return rv; |
} |
static inline uint32_t pio_read_32(ioport32_t *port) |
{ |
uint32_t rv; |
rv = *port; |
memory_barrier(); |
return rv; |
} |
/** Read Processor State register. |
* |
* @return Value of PSTATE register. |
136,28 → 87,6 |
asm volatile ("wr %0, %1, %%tick_cmpr\n" : : "r" (v), "i" (0)); |
} |
/** Read STICK_compare Register. |
* |
* @return Value of STICK_compare register. |
*/ |
static inline uint64_t stick_compare_read(void) |
{ |
uint64_t v; |
asm volatile ("rd %%asr25, %0\n" : "=r" (v)); |
return v; |
} |
/** Write STICK_compare Register. |
* |
* @param v New value of STICK_comapre register. |
*/ |
static inline void stick_compare_write(uint64_t v) |
{ |
asm volatile ("wr %0, %1, %%asr25\n" : : "r" (v), "i" (0)); |
} |
/** Read TICK Register. |
* |
* @return Value of TICK register. |
429,6 → 358,15 |
asm volatile ("wrpr %g0, %g0, %tl\n"); |
} |
/** Read UPA_CONFIG register. |
* |
* @return Value of the UPA_CONFIG register. |
*/ |
static inline uint64_t upa_config_read(void) |
{ |
return asi_u64_read(ASI_UPA_CONFIG, 0); |
} |
extern void cpu_halt(void); |
extern void cpu_sleep(void); |
extern void asm_delay_loop(const uint32_t usec); |
/branches/arm/kernel/arch/sparc64/include/cpu.h |
---|
35,6 → 35,15 |
#ifndef KERN_sparc64_CPU_H_ |
#define KERN_sparc64_CPU_H_ |
#include <arch/types.h> |
#include <typedefs.h> |
#include <arch/register.h> |
#include <arch/asm.h> |
#ifdef CONFIG_SMP |
#include <arch/mm/cache.h> |
#endif |
#define MANUF_FUJITSU 0x04 |
#define MANUF_ULTRASPARC 0x17 /**< UltraSPARC I, UltraSPARC II */ |
#define MANUF_SUN 0x3e |
43,29 → 52,14 |
#define IMPL_ULTRASPARCII 0x11 |
#define IMPL_ULTRASPARCII_I 0x12 |
#define IMPL_ULTRASPARCII_E 0x13 |
#define IMPL_ULTRASPARCIII 0x14 |
#define IMPL_ULTRASPARCIII_PLUS 0x15 |
#define IMPL_ULTRASPARCIII_I 0x16 |
#define IMPL_ULTRASPARCIV 0x18 |
#define IMPL_ULTRASPARCIII 0x15 |
#define IMPL_ULTRASPARCIV_PLUS 0x19 |
#define IMPL_SPARC64V 0x5 |
#ifndef __ASM__ |
#include <arch/types.h> |
#include <typedefs.h> |
#include <arch/register.h> |
#include <arch/regdef.h> |
#include <arch/asm.h> |
#ifdef CONFIG_SMP |
#include <arch/mm/cache.h> |
#endif |
typedef struct { |
uint32_t mid; /**< Processor ID as read from |
UPA_CONFIG/FIREPLANE_CONFIG. */ |
UPA_CONFIG. */ |
ver_reg_t ver; |
uint32_t clock_frequency; /**< Processor frequency in Hz. */ |
uint64_t next_tick_cmpr; /**< Next clock interrupt should be |
72,28 → 66,8 |
generated when the TICK register |
matches this value. */ |
} cpu_arch_t; |
/** |
* Reads the module ID (agent ID/CPUID) of the current CPU. |
*/ |
static inline uint32_t read_mid(void) |
{ |
uint64_t icbus_config = asi_u64_read(ASI_ICBUS_CONFIG, 0); |
icbus_config = icbus_config >> ICBUS_CONFIG_MID_SHIFT; |
#if defined (US) |
return icbus_config & 0x1f; |
#elif defined (US3) |
if (((ver_reg_t) ver_read()).impl == IMPL_ULTRASPARCIII_I) |
return icbus_config & 0x1f; |
else |
return icbus_config & 0x3ff; |
#endif |
} |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/sparc64/include/types.h |
---|
46,6 → 46,8 |
typedef unsigned long uint64_t; |
typedef uint64_t size_t; |
typedef uint64_t count_t; |
typedef uint64_t index_t; |
typedef uint64_t uintptr_t; |
typedef uint64_t pfn_t; |
55,12 → 57,11 |
typedef uint64_t unative_t; |
typedef int64_t native_t; |
typedef struct { |
} fncptr_t; |
/**< Formats for uintptr_t, size_t */ |
/**< Formats for uintptr_t, size_t, count_t and index_t */ |
#define PRIp "llx" |
#define PRIs "llu" |
#define PRIc "llu" |
#define PRIi "llu" |
/**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */ |
#define PRId8 "d" |
/branches/arm/kernel/arch/sparc64/include/byteorder.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_sparc64_BYTEORDER_H_ |
#define KERN_sparc64_BYTEORDER_H_ |
#define ARCH_IS_BIG_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/sparc64/include/drivers/sgcn.h |
---|
File deleted |
/branches/arm/kernel/arch/sparc64/include/drivers/scr.h |
---|
42,14 → 42,12 |
SCR_UNKNOWN, |
SCR_ATYFB, |
SCR_FFB, |
SCR_CGSIX, |
SCR_XVR |
SCR_CGSIX |
} scr_type_t; |
extern scr_type_t scr_type; |
extern void scr_init(ofw_tree_node_t *node); |
extern void scr_redraw(void); |
#endif |
/branches/arm/kernel/arch/sparc64/include/drivers/z8530.h |
---|
0,0 → 1,140 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_sparc64_Z8530_H_ |
#define KERN_sparc64_Z8530_H_ |
#include <arch/types.h> |
#include <arch/drivers/kbd.h> |
#define Z8530_CHAN_A 4 |
#define Z8530_CHAN_B 0 |
#define WR0 0 |
#define WR1 1 |
#define WR2 2 |
#define WR3 3 |
#define WR4 4 |
#define WR5 5 |
#define WR6 6 |
#define WR7 7 |
#define WR8 8 |
#define WR9 9 |
#define WR10 10 |
#define WR11 11 |
#define WR12 12 |
#define WR13 13 |
#define WR14 14 |
#define WR15 15 |
#define RR0 0 |
#define RR1 1 |
#define RR2 2 |
#define RR3 3 |
#define RR8 8 |
#define RR10 10 |
#define RR12 12 |
#define RR13 13 |
#define RR14 14 |
#define RR15 15 |
/* Write Register 0 */ |
#define WR0_TX_IP_RST (0x5<<3) /** Reset pending TX interrupt. */ |
#define WR0_ERR_RST (0x6<<3) |
/* Write Register 1 */ |
#define WR1_RID (0x0<<3) /** Receive Interrupts Disabled. */ |
#define WR1_RIFCSC (0x1<<3) /** Receive Interrupt on First Character or Special Condition. */ |
#define WR1_IARCSC (0x2<<3) /** Interrupt on All Receive Characters or Special Conditions. */ |
#define WR1_RISC (0x3<<3) /** Receive Interrupt on Special Condition. */ |
#define WR1_PISC (0x1<<2) /** Parity Is Special Condition. */ |
/* Write Register 3 */ |
#define WR3_RX_ENABLE (0x1<<0) /** Rx Enable. */ |
#define WR3_RX8BITSCH (0x3<<6) /** 8-bits per character. */ |
/* Write Register 9 */ |
#define WR9_MIE (0x1<<3) /** Master Interrupt Enable. */ |
/* Read Register 0 */ |
#define RR0_RCA (0x1<<0) /** Receive Character Available. */ |
/** Structure representing the z8530 device. */ |
typedef struct { |
devno_t devno; |
volatile uint8_t *reg; /** Memory mapped registers of the z8530. */ |
} z8530_t; |
static inline void z8530_write(z8530_t *dev, index_t chan, uint8_t reg, uint8_t val) |
{ |
/* |
* Registers 8-15 will automatically issue the Point High |
* command as their bit 3 is 1. |
*/ |
dev->reg[WR0+chan] = reg; /* select register */ |
dev->reg[WR0+chan] = val; /* write value */ |
} |
static inline void z8530_write_a(z8530_t *dev, uint8_t reg, uint8_t val) |
{ |
z8530_write(dev, Z8530_CHAN_A, reg, val); |
} |
static inline void z8530_write_b(z8530_t *dev, uint8_t reg, uint8_t val) |
{ |
z8530_write(dev, Z8530_CHAN_B, reg, val); |
} |
static inline uint8_t z8530_read(z8530_t *dev, index_t chan, uint8_t reg) |
{ |
/* |
* Registers 8-15 will automatically issue the Point High |
* command as their bit 3 is 1. |
*/ |
dev->reg[WR0+chan] = reg; /* select register */ |
return dev->reg[WR0+chan]; |
} |
static inline uint8_t z8530_read_a(z8530_t *dev, uint8_t reg) |
{ |
return z8530_read(dev, Z8530_CHAN_A, reg); |
} |
static inline uint8_t z8530_read_b(z8530_t *dev, uint8_t reg) |
{ |
return z8530_read(dev, Z8530_CHAN_B, reg); |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/sparc64/include/drivers/pci.h |
---|
51,8 → 51,8 |
}; |
struct pci_operations { |
void (* enable_interrupt)(pci_t *, int); |
void (* clear_interrupt)(pci_t *, int); |
void (* enable_interrupt)(pci_t *pci, int inr); |
void (* clear_interrupt)(pci_t *pci, int inr); |
}; |
struct pci { |
61,9 → 61,9 |
volatile uint64_t *reg; /**< Registers including interrupt registers. */ |
}; |
extern pci_t *pci_init(ofw_tree_node_t *); |
extern void pci_enable_interrupt(pci_t *, int); |
extern void pci_clear_interrupt(void *, int); |
extern pci_t *pci_init(ofw_tree_node_t *node); |
extern void pci_enable_interrupt(pci_t *pci, int inr); |
extern void pci_clear_interrupt(pci_t *pci, int inr); |
#endif |
/branches/arm/kernel/arch/sparc64/include/drivers/fhc.h |
---|
44,9 → 44,9 |
extern fhc_t *central_fhc; |
extern fhc_t *fhc_init(ofw_tree_node_t *); |
extern void fhc_enable_interrupt(fhc_t *, int); |
extern void fhc_clear_interrupt(void *, int); |
extern fhc_t *fhc_init(ofw_tree_node_t *node); |
extern void fhc_enable_interrupt(fhc_t *fhc, int inr); |
extern void fhc_clear_interrupt(fhc_t *fhc, int inr); |
#endif |
/branches/arm/kernel/arch/sparc64/include/drivers/kbd.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64 |
/** @addtogroup sparc64 |
* @{ |
*/ |
/** @file |
38,6 → 38,14 |
#include <arch/types.h> |
#include <genarch/ofw/ofw_tree.h> |
typedef enum { |
KBD_UNKNOWN, |
KBD_Z8530, |
KBD_NS16550 |
} kbd_type_t; |
extern kbd_type_t kbd_type; |
extern void kbd_init(ofw_tree_node_t *node); |
#endif |
/branches/arm/kernel/arch/sparc64/include/drivers/ns16550.h |
---|
0,0 → 1,102 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_sparc64_NS16550_H_ |
#define KERN_sparc64_NS16550_H_ |
#include <arch/types.h> |
#include <arch/drivers/kbd.h> |
/* NS16550 registers */ |
#define RBR_REG 0 /** Receiver Buffer Register. */ |
#define IER_REG 1 /** Interrupt Enable Register. */ |
#define IIR_REG 2 /** Interrupt Ident Register (read). */ |
#define FCR_REG 2 /** FIFO control register (write). */ |
#define LCR_REG 3 /** Line Control register. */ |
#define LSR_REG 5 /** Line Status Register. */ |
#define IER_ERBFI 0x01 /** Enable Receive Buffer Full Interrupt. */ |
#define LCR_DLAB 0x80 /** Divisor Latch Access bit. */ |
/** Structure representing the ns16550 device. */ |
typedef struct { |
devno_t devno; |
volatile uint8_t *reg; /** Memory mapped registers of the ns16550. */ |
} ns16550_t; |
static inline uint8_t ns16550_rbr_read(ns16550_t *dev) |
{ |
return dev->reg[RBR_REG]; |
} |
static inline uint8_t ns16550_ier_read(ns16550_t *dev) |
{ |
return dev->reg[IER_REG]; |
} |
static inline void ns16550_ier_write(ns16550_t *dev, uint8_t v) |
{ |
dev->reg[IER_REG] = v; |
} |
static inline uint8_t ns16550_iir_read(ns16550_t *dev) |
{ |
return dev->reg[IIR_REG]; |
} |
static inline void ns16550_fcr_write(ns16550_t *dev, uint8_t v) |
{ |
dev->reg[FCR_REG] = v; |
} |
static inline uint8_t ns16550_lcr_read(ns16550_t *dev) |
{ |
return dev->reg[LCR_REG]; |
} |
static inline void ns16550_lcr_write(ns16550_t *dev, uint8_t v) |
{ |
dev->reg[LCR_REG] = v; |
} |
static inline uint8_t ns16550_lsr_read(ns16550_t *dev) |
{ |
return dev->reg[LSR_REG]; |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/sparc64/include/boot/boot.h |
---|
48,12 → 48,9 |
#define TASKMAP_MAX_RECORDS 32 |
#define MEMMAP_MAX_RECORDS 32 |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
typedef struct { |
void * addr; |
uint32_t size; |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} utask_t; |
typedef struct { |
/branches/arm/kernel/arch/sparc64/include/fpu_context.h |
---|
37,6 → 37,7 |
#include <arch/types.h> |
#define ARCH_HAS_FPU |
#define FPU_CONTEXT_ALIGN 8 |
typedef struct { |
/branches/arm/kernel/arch/sparc64/include/context.h |
---|
39,7 → 39,7 |
#include <arch/types.h> |
#include <align.h> |
#define SP_DELTA (STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE) |
#define SP_DELTA STACK_WINDOW_SAVE_AREA_SIZE |
#ifdef context_set |
#undef context_set |
/branches/arm/kernel/arch/sparc64/include/regdef.h |
---|
55,11 → 55,8 |
#define WSTATE_NORMAL(n) (n) |
#define WSTATE_OTHER(n) ((n) << 3) |
/* |
* The following definitions concern the UPA_CONFIG register on US and the |
* FIREPLANE_CONFIG register on US3. |
*/ |
#define ICBUS_CONFIG_MID_SHIFT 17 |
#define UPA_CONFIG_MID_SHIFT 17 |
#define UPA_CONFIG_MID_MASK 0x1f |
#endif |
/branches/arm/kernel/arch/sparc64/include/arch.h |
---|
41,16 → 41,10 |
#define ASI_AIUS 0x11 /** Access to secondary context with user privileges. */ |
#define ASI_NUCLEUS_QUAD_LDD 0x24 /** ASI for 16-byte atomic loads. */ |
#define ASI_DCACHE_TAG 0x47 /** ASI D-Cache Tag. */ |
#define ASI_ICBUS_CONFIG 0x4a /** ASI of the UPA_CONFIG/FIREPLANE_CONFIG register. */ |
#define ASI_UPA_CONFIG 0x4a /** ASI of the UPA_CONFIG register. */ |
#define NWINDOWS 8 /** Number of register window sets. */ |
#ifndef __ASM__ |
extern void arch_pre_main(void); |
#endif /* __ASM__ */ |
#endif |
/** @} |
/branches/arm/kernel/arch/sparc64/include/register.h |
---|
117,6 → 117,23 |
}; |
typedef union fprs_reg fprs_reg_t; |
/** UPA_CONFIG register. |
* |
* Note that format of this register differs significantly from |
* processor version to version. The format defined here |
* is the common subset for all supported processor versions. |
*/ |
union upa_config { |
uint64_t value; |
struct { |
uint64_t : 34; |
unsigned pcon : 8; /**< Processor configuration. */ |
unsigned mid : 5; /**< Module (processor) ID register. */ |
unsigned pcap : 17; /**< Processor capabilities. */ |
} __attribute__ ((packed)); |
}; |
typedef union upa_config upa_config_t; |
#endif |
/** @} |
/branches/arm/kernel/arch/sparc64/src/trap/trap_table.S |
---|
341,7 → 341,7 |
.org trap_table + (TT_TRAP_INSTRUCTION_0+\cur)*ENTRY_SIZE |
.global trap_instruction_\cur\()_tl0 |
trap_instruction_\cur\()_tl0: |
ba %xcc, trap_instruction_handler |
ba trap_instruction_handler |
mov \cur, %g2 |
.endr |
478,9 → 478,9 |
*/ |
rdpr %tl, %g3 |
cmp %g3, 1 |
be %xcc, 1f |
be 1f |
nop |
0: ba %xcc, 0b ! this is for debugging, if we ever get here |
0: ba 0b ! this is for debugging, if we ever get here |
nop ! it will be easy to find |
1: |
499,7 → 499,7 |
wrpr %g4, 0, %cwp ! resynchronize CWP |
andcc %g3, TSTATE_PRIV_BIT, %g0 ! if this trap came from the privileged mode... |
bnz %xcc, 0f ! ...skip setting of kernel stack and primary context |
bnz 0f ! ...skip setting of kernel stack and primary context |
nop |
.endif |
545,7 → 545,7 |
flush %l0 |
.if NOT(\is_syscall) |
ba %xcc, 1f |
ba 1f |
nop |
0: |
save %sp, -PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE, %sp |
606,10 → 606,10 |
add %sp, PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE + STACK_BIAS + SAVED_TNPC, %o1 |
.else |
/* |
* Call the higher-level syscall handler and enable interrupts. |
* Call the higher-level syscall handler. |
*/ |
call syscall_handler |
wrpr %g0, PSTATE_PRIV_BIT | PSTATE_PEF_BIT | PSTATE_IE_BIT, %pstate |
nop |
mov %o0, %i0 ! copy the value returned by the syscall |
.endif |
672,7 → 672,7 |
and %l0, NWINDOWS - 1, %l0 ! %l0 mod NWINDOWS |
rdpr %cwp, %l1 |
cmp %l0, %l1 |
bz %xcc, 0f ! CWP is ok |
bz 0f ! CWP is ok |
nop |
/* |
712,7 → 712,7 |
.if NOT(\is_syscall) |
rdpr %tstate, %g1 |
andcc %g1, TSTATE_PRIV_BIT, %g0 ! if we are not returning to userspace..., |
bnz %xcc, 1f ! ...skip restoring userspace windows |
bnz 1f ! ...skip restoring userspace windows |
nop |
.endif |
748,8 → 748,9 |
* Fill all windows stored in the buffer. |
*/ |
clr %g4 |
0: andcc %g7, UWB_ALIGNMENT - 1, %g0 ! alignment check |
bz %xcc, 0f ! %g7 is UWB_ALIGNMENT-aligned, no more windows to refill |
set PAGE_SIZE - 1, %g5 |
0: andcc %g7, %g5, %g0 ! PAGE_SIZE alignment check |
bz 0f ! %g7 is page-aligned, no more windows to refill |
nop |
add %g7, -STACK_WINDOW_SAVE_AREA_SIZE, %g7 |
774,7 → 775,7 |
and %g3, NWINDOWS - 1, %g3 |
wrpr %g3, 0, %cwp ! switch to the preceeding window |
ba %xcc, 0b |
ba 0b |
inc %g4 |
0: |
785,7 → 786,7 |
wrpr %g1, 0, %cwp |
add %g4, %g2, %g2 |
cmp %g2, NWINDOWS - 2 |
bg %xcc, 2f ! fix the CANRESTORE=NWINDOWS-1 anomaly |
bg 2f ! fix the CANRESTORE=NWINDOWS-1 anomaly |
mov NWINDOWS - 2, %g1 ! use dealy slot for both cases |
sub %g1, %g2, %g1 |
/branches/arm/kernel/arch/sparc64/src/trap/exception.c |
---|
40,67 → 40,62 |
#include <arch/asm.h> |
#include <arch/register.h> |
#include <debug.h> |
#include <symtab.h> |
#include <print.h> |
#include <symtab.h> |
void dump_istate(istate_t *istate) |
{ |
char *tpcs, *tnpcs; |
tpcs = symtab_fmt_name_lookup(istate->tpc); |
tnpcs = symtab_fmt_name_lookup(istate->tnpc); |
printf("TSTATE=%#" PRIx64 "\n", istate->tstate); |
printf("TPC=%#" PRIx64 " (%s)\n", istate->tpc, tpcs); |
printf("TNPC=%#" PRIx64 " (%s)\n", istate->tnpc, tnpcs); |
printf("TPC=%#" PRIx64 " (%s)\n", istate->tpc, get_symtab_entry(istate->tpc)); |
printf("TNPC=%#" PRIx64 " (%s)\n", istate->tnpc, get_symtab_entry(istate->tnpc)); |
} |
/** Handle instruction_access_exception. (0x8) */ |
void instruction_access_exception(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle instruction_access_error. (0xa) */ |
void instruction_access_error(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle illegal_instruction. (0x10) */ |
void illegal_instruction(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle privileged_opcode. (0x11) */ |
void privileged_opcode(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle unimplemented_LDD. (0x12) */ |
void unimplemented_LDD(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle unimplemented_STD. (0x13) */ |
void unimplemented_STD(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle fp_disabled. (0x20) */ |
118,9 → 113,9 |
#ifdef CONFIG_FPU_LAZY |
scheduler_fpu_lazy_request(); |
#else |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
#endif |
} |
127,98 → 122,98 |
/** Handle fp_exception_ieee_754. (0x21) */ |
void fp_exception_ieee_754(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle fp_exception_other. (0x22) */ |
void fp_exception_other(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle tag_overflow. (0x23) */ |
void tag_overflow(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle division_by_zero. (0x28) */ |
void division_by_zero(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle data_access_exception. (0x30) */ |
void data_access_exception(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
dump_sfsr_and_sfar(); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle data_access_error. (0x32) */ |
void data_access_error(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle mem_address_not_aligned. (0x34) */ |
void mem_address_not_aligned(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle LDDF_mem_address_not_aligned. (0x35) */ |
void LDDF_mem_address_not_aligned(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle STDF_mem_address_not_aligned. (0x36) */ |
void STDF_mem_address_not_aligned(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle privileged_action. (0x37) */ |
void privileged_action(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle LDQF_mem_address_not_aligned. (0x38) */ |
void LDQF_mem_address_not_aligned(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Handle STQF_mem_address_not_aligned. (0x39) */ |
void STQF_mem_address_not_aligned(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "%s.", __func__); |
fault_if_from_uspace(istate, "%s\n", __func__); |
dump_istate(istate); |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** @} |
/branches/arm/kernel/arch/sparc64/src/trap/interrupt.c |
---|
67,19 → 67,11 |
*/ |
void interrupt(int n, istate_t *istate) |
{ |
uint64_t status; |
uint64_t intrcv; |
uint64_t data0; |
status = asi_u64_read(ASI_INTR_DISPATCH_STATUS, 0); |
if (status & (!INTR_DISPATCH_STATUS_BUSY)) |
panic("Interrupt Dispatch Status busy bit not set."); |
intrcv = asi_u64_read(ASI_INTR_RECEIVE, 0); |
#if defined (US) |
data0 = asi_u64_read(ASI_INTR_R, ASI_UDB_INTR_R_DATA_0); |
#elif defined (US3) |
data0 = asi_u64_read(ASI_INTR_R, VA_INTR_R_DATA_0); |
#endif |
data0 = asi_u64_read(ASI_UDB_INTR_R, ASI_UDB_INTR_R_DATA_0); |
irq_t *irq = irq_dispatch_and_lock(data0); |
if (irq) { |
86,13 → 78,7 |
/* |
* The IRQ handler was found. |
*/ |
irq->handler(irq); |
/* |
* See if there is a clear-interrupt-routine and call it. |
*/ |
if (irq->cir) { |
irq->cir(irq->cir_arg, irq->inr); |
} |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else if (data0 > config.base) { |
/* |
112,7 → 98,7 |
*/ |
#ifdef CONFIG_DEBUG |
printf("cpu%u: spurious interrupt (intrcv=%#" PRIx64 |
", data0=%#" PRIx64 ")\n", CPU->id, intrcv, data0); |
", data0=%#" PRIx64 ")\n", CPU->id, intrcv, data0); |
#endif |
} |
/branches/arm/kernel/arch/sparc64/src/asm.S |
---|
225,15 → 225,10 |
.global memsetb |
memsetb: |
ba %xcc, _memsetb |
b _memsetb |
nop |
.global memsetw |
memsetw: |
ba %xcc, _memsetw |
nop |
.macro WRITE_ALTERNATE_REGISTER reg, bit |
rdpr %pstate, %g1 ! save PSTATE.PEF |
wrpr %g0, (\bit | PSTATE_PRIV_BIT), %pstate |
277,7 → 272,7 |
*/ |
.global switch_to_userspace |
switch_to_userspace: |
save %o1, -(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp |
save %o1, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
flushw |
wrpr %g0, 0, %cleanwin ! avoid information leak |
/branches/arm/kernel/arch/sparc64/src/mm/cache.S |
---|
47,3 → 47,45 |
retl |
! beware SF Erratum #51, do not put the MEMBAR here |
nop |
/** Flush only D-cache lines of one virtual color. |
* |
* @param o0 Virtual color to be flushed. |
*/ |
.global dcache_flush_color |
dcache_flush_color: |
mov (DCACHE_SIZE / DCACHE_LINE_SIZE) / 2, %g1 |
set DCACHE_SIZE / 2, %g2 |
sllx %g2, %o0, %g2 |
sub %g2, DCACHE_LINE_SIZE, %g2 |
0: stxa %g0, [%g2] ASI_DCACHE_TAG |
membar #Sync |
subcc %g1, 1, %g1 |
bnz,pt %xcc, 0b |
sub %g2, DCACHE_LINE_SIZE, %g2 |
retl |
nop |
/** Flush only D-cache lines of one virtual color and one tag. |
* |
* @param o0 Virtual color to lookup the tag. |
* @param o1 Tag of the cachelines to be flushed. |
*/ |
.global dcache_flush_tag |
dcache_flush_tag: |
mov (DCACHE_SIZE / DCACHE_LINE_SIZE) / 2, %g1 |
set DCACHE_SIZE / 2, %g2 |
sllx %g2, %o0, %g2 |
sub %g2, DCACHE_LINE_SIZE, %g2 |
0: ldxa [%g2] ASI_DCACHE_TAG, %g3 |
srlx %g3, DCACHE_TAG_SHIFT, %g3 |
cmp %g3, %o1 |
bnz 1f |
nop |
stxa %g0, [%g2] ASI_DCACHE_TAG |
membar #Sync |
1: subcc %g1, 1, %g1 |
bnz,pt %xcc, 0b |
sub %g2, DCACHE_LINE_SIZE, %g2 |
retl |
nop |
/branches/arm/kernel/arch/sparc64/src/mm/as.c |
---|
89,7 → 89,7 |
* The count must be calculated with respect to the emualted 16K page |
* size. |
*/ |
size_t cnt = ((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * |
count_t cnt = ((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * |
sizeof(tsb_entry_t)) >> FRAME_WIDTH; |
frame_free(KA2PA((uintptr_t) as->arch.itsb)); |
return cnt; |
101,7 → 101,7 |
int as_create_arch(as_t *as, int flags) |
{ |
#ifdef CONFIG_TSB |
tsb_invalidate(as, 0, (size_t) -1); |
tsb_invalidate(as, 0, (count_t) -1); |
#endif |
return 0; |
} |
164,25 → 164,7 |
itsb_base_write(tsb_base.value); |
tsb_base.base = ((uintptr_t) as->arch.dtsb) >> MMU_PAGE_WIDTH; |
dtsb_base_write(tsb_base.value); |
#if defined (US3) |
/* |
* Clear the extension registers. |
* In HelenOS, primary and secondary context registers contain |
* equal values and kernel misses (context 0, ie. the nucleus context) |
* are excluded from the TSB miss handler, so it makes no sense |
* to have separate TSBs for primary, secondary and nucleus contexts. |
* Clearing the extension registers will ensure that the value of the |
* TSB Base register will be used as an address of TSB, making the code |
* compatible with the US port. |
*/ |
itsb_primary_extension_write(0); |
itsb_nucleus_extension_write(0); |
dtsb_primary_extension_write(0); |
dtsb_secondary_extension_write(0); |
dtsb_nucleus_extension_write(0); |
#endif |
#endif |
} |
/** Perform sparc64-specific tasks when an address space is removed from the |
/branches/arm/kernel/arch/sparc64/src/mm/tlb.c |
---|
54,13 → 54,14 |
#include <arch/mm/tsb.h> |
#endif |
static void dtlb_pte_copy(pte_t *, size_t, bool); |
static void itlb_pte_copy(pte_t *, size_t); |
static void do_fast_instruction_access_mmu_miss_fault(istate_t *, const char *); |
static void do_fast_data_access_mmu_miss_fault(istate_t *, tlb_tag_access_reg_t, |
const char *); |
static void do_fast_data_access_protection_fault(istate_t *, |
tlb_tag_access_reg_t, const char *); |
static void dtlb_pte_copy(pte_t *t, index_t index, bool ro); |
static void itlb_pte_copy(pte_t *t, index_t index); |
static void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, |
const char *str); |
static void do_fast_data_access_mmu_miss_fault(istate_t *istate, |
tlb_tag_access_reg_t tag, const char *str); |
static void do_fast_data_access_protection_fault(istate_t *istate, |
tlb_tag_access_reg_t tag, const char *str); |
char *context_encoding[] = { |
"Primary", |
85,11 → 86,11 |
/** Insert privileged mapping into DMMU TLB. |
* |
* @param page Virtual page address. |
* @param frame Physical frame address. |
* @param pagesize Page size. |
* @param locked True for permanent mappings, false otherwise. |
* @param cacheable True if the mapping is cacheable, false otherwise. |
* @param page Virtual page address. |
* @param frame Physical frame address. |
* @param pagesize Page size. |
* @param locked True for permanent mappings, false otherwise. |
* @param cacheable True if the mapping is cacheable, false otherwise. |
*/ |
void dtlb_insert_mapping(uintptr_t page, uintptr_t frame, int pagesize, |
bool locked, bool cacheable) |
102,7 → 103,7 |
pg.address = page; |
fr.address = frame; |
tag.context = ASID_KERNEL; |
tag.value = ASID_KERNEL; |
tag.vpn = pg.vpn; |
dtlb_tag_access_write(tag.value); |
125,12 → 126,12 |
/** Copy PTE to TLB. |
* |
* @param t Page Table Entry to be copied. |
* @param index Zero if lower 8K-subpage, one if higher 8K-subpage. |
* @param ro If true, the entry will be created read-only, regardless |
* of its w field. |
* @param t Page Table Entry to be copied. |
* @param index Zero if lower 8K-subpage, one if higher 8K-subpage. |
* @param ro If true, the entry will be created read-only, regardless of its |
* w field. |
*/ |
void dtlb_pte_copy(pte_t *t, size_t index, bool ro) |
void dtlb_pte_copy(pte_t *t, index_t index, bool ro) |
{ |
tlb_tag_access_reg_t tag; |
tlb_data_t data; |
164,10 → 165,10 |
/** Copy PTE to ITLB. |
* |
* @param t Page Table Entry to be copied. |
* @param index Zero if lower 8K-subpage, one if higher 8K-subpage. |
* @param t Page Table Entry to be copied. |
* @param index Zero if lower 8K-subpage, one if higher 8K-subpage. |
*/ |
void itlb_pte_copy(pte_t *t, size_t index) |
void itlb_pte_copy(pte_t *t, index_t index) |
{ |
tlb_tag_access_reg_t tag; |
tlb_data_t data; |
199,12 → 200,12 |
/** ITLB miss handler. */ |
void fast_instruction_access_mmu_miss(unative_t unused, istate_t *istate) |
{ |
uintptr_t page_16k = ALIGN_DOWN(istate->tpc, PAGE_SIZE); |
size_t index = (istate->tpc >> MMU_PAGE_WIDTH) % MMU_PAGES_PER_PAGE; |
uintptr_t va = ALIGN_DOWN(istate->tpc, PAGE_SIZE); |
index_t index = (istate->tpc >> MMU_PAGE_WIDTH) % MMU_PAGES_PER_PAGE; |
pte_t *t; |
page_table_lock(AS, true); |
t = page_mapping_find(AS, page_16k); |
t = page_mapping_find(AS, va); |
if (t && PTE_EXECUTABLE(t)) { |
/* |
* The mapping was found in the software page hash table. |
222,8 → 223,7 |
* handler. |
*/ |
page_table_unlock(AS, true); |
if (as_page_fault(page_16k, PF_ACCESS_EXEC, istate) == |
AS_PF_FAULT) { |
if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
do_fast_instruction_access_mmu_miss_fault(istate, |
__func__); |
} |
235,21 → 235,18 |
* Note that some faults (e.g. kernel faults) were already resolved by the |
* low-level, assembly language part of the fast_data_access_mmu_miss handler. |
* |
* @param tag Content of the TLB Tag Access register as it existed |
* when the trap happened. This is to prevent confusion |
* created by clobbered Tag Access register during a nested |
* DTLB miss. |
* @param istate Interrupted state saved on the stack. |
* @param tag Content of the TLB Tag Access register as it existed when the |
* trap happened. This is to prevent confusion created by clobbered |
* Tag Access register during a nested DTLB miss. |
* @param istate Interrupted state saved on the stack. |
*/ |
void fast_data_access_mmu_miss(tlb_tag_access_reg_t tag, istate_t *istate) |
{ |
uintptr_t page_8k; |
uintptr_t page_16k; |
size_t index; |
uintptr_t va; |
index_t index; |
pte_t *t; |
page_8k = (uint64_t) tag.vpn << MMU_PAGE_WIDTH; |
page_16k = ALIGN_DOWN(page_8k, PAGE_SIZE); |
va = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE); |
index = tag.vpn % MMU_PAGES_PER_PAGE; |
if (tag.context == ASID_KERNEL) { |
257,15 → 254,6 |
/* NULL access in kernel */ |
do_fast_data_access_mmu_miss_fault(istate, tag, |
__func__); |
} else if (page_8k >= end_of_identity) { |
/* |
* The kernel is accessing the I/O space. |
* We still do identity mapping for I/O, |
* but without caching. |
*/ |
dtlb_insert_mapping(page_8k, KA2PA(page_8k), |
PAGESIZE_8K, false, false); |
return; |
} |
do_fast_data_access_mmu_miss_fault(istate, tag, "Unexpected " |
"kernel page fault."); |
272,7 → 260,7 |
} |
page_table_lock(AS, true); |
t = page_mapping_find(AS, page_16k); |
t = page_mapping_find(AS, va); |
if (t) { |
/* |
* The mapping was found in the software page hash table. |
290,8 → 278,7 |
* handler. |
*/ |
page_table_unlock(AS, true); |
if (as_page_fault(page_16k, PF_ACCESS_READ, istate) == |
AS_PF_FAULT) { |
if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
do_fast_data_access_mmu_miss_fault(istate, tag, |
__func__); |
} |
300,23 → 287,22 |
/** DTLB protection fault handler. |
* |
* @param tag Content of the TLB Tag Access register as it existed |
* when the trap happened. This is to prevent confusion |
* created by clobbered Tag Access register during a nested |
* DTLB miss. |
* @param istate Interrupted state saved on the stack. |
* @param tag Content of the TLB Tag Access register as it existed when the |
* trap happened. This is to prevent confusion created by clobbered |
* Tag Access register during a nested DTLB miss. |
* @param istate Interrupted state saved on the stack. |
*/ |
void fast_data_access_protection(tlb_tag_access_reg_t tag, istate_t *istate) |
{ |
uintptr_t page_16k; |
size_t index; |
uintptr_t va; |
index_t index; |
pte_t *t; |
page_16k = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE); |
va = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE); |
index = tag.vpn % MMU_PAGES_PER_PAGE; /* 16K-page emulation */ |
page_table_lock(AS, true); |
t = page_mapping_find(AS, page_16k); |
t = page_mapping_find(AS, va); |
if (t && PTE_WRITABLE(t)) { |
/* |
* The mapping was found in the software page hash table and is |
326,7 → 312,7 |
t->a = true; |
t->d = true; |
dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY, |
page_16k + index * MMU_PAGE_SIZE); |
va + index * MMU_PAGE_SIZE); |
dtlb_pte_copy(t, index, false); |
#ifdef CONFIG_TSB |
dtsb_pte_copy(t, index, false); |
338,8 → 324,7 |
* handler. |
*/ |
page_table_unlock(AS, true); |
if (as_page_fault(page_16k, PF_ACCESS_WRITE, istate) == |
AS_PF_FAULT) { |
if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) { |
do_fast_data_access_protection_fault(istate, tag, |
__func__); |
} |
346,26 → 331,6 |
} |
} |
/** Print TLB entry (for debugging purposes). |
* |
* The diag field has been left out in order to make this function more generic |
* (there is no diag field in US3 architeture). |
* |
* @param i TLB entry number |
* @param t TLB entry tag |
* @param d TLB entry data |
*/ |
static void print_tlb_entry(int i, tlb_tag_read_reg_t t, tlb_data_t d) |
{ |
printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, " |
"ie=%d, soft2=%#x, pfn=%#x, soft=%#x, l=%d, " |
"cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn, |
t.context, d.v, d.size, d.nfo, d.ie, d.soft2, |
d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g); |
} |
#if defined (US) |
/** Print contents of both TLBs. */ |
void tlb_print(void) |
{ |
377,7 → 342,12 |
for (i = 0; i < ITLB_ENTRY_COUNT; i++) { |
d.value = itlb_data_access_read(i); |
t.value = itlb_tag_read_read(i); |
print_tlb_entry(i, t, d); |
printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, " |
"ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, " |
"cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn, |
t.context, d.v, d.size, d.nfo, d.ie, d.soft2, d.diag, |
d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g); |
} |
printf("D-TLB contents:\n"); |
384,63 → 354,22 |
for (i = 0; i < DTLB_ENTRY_COUNT; i++) { |
d.value = dtlb_data_access_read(i); |
t.value = dtlb_tag_read_read(i); |
print_tlb_entry(i, t, d); |
printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, " |
"ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, " |
"cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn, |
t.context, d.v, d.size, d.nfo, d.ie, d.soft2, d.diag, |
d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g); |
} |
} |
#elif defined (US3) |
/** Print contents of all TLBs. */ |
void tlb_print(void) |
{ |
int i; |
tlb_data_t d; |
tlb_tag_read_reg_t t; |
printf("TLB_ISMALL contents:\n"); |
for (i = 0; i < tlb_ismall_size(); i++) { |
d.value = dtlb_data_access_read(TLB_ISMALL, i); |
t.value = dtlb_tag_read_read(TLB_ISMALL, i); |
print_tlb_entry(i, t, d); |
} |
printf("TLB_IBIG contents:\n"); |
for (i = 0; i < tlb_ibig_size(); i++) { |
d.value = dtlb_data_access_read(TLB_IBIG, i); |
t.value = dtlb_tag_read_read(TLB_IBIG, i); |
print_tlb_entry(i, t, d); |
} |
printf("TLB_DSMALL contents:\n"); |
for (i = 0; i < tlb_dsmall_size(); i++) { |
d.value = dtlb_data_access_read(TLB_DSMALL, i); |
t.value = dtlb_tag_read_read(TLB_DSMALL, i); |
print_tlb_entry(i, t, d); |
} |
printf("TLB_DBIG_1 contents:\n"); |
for (i = 0; i < tlb_dbig_size(); i++) { |
d.value = dtlb_data_access_read(TLB_DBIG_0, i); |
t.value = dtlb_tag_read_read(TLB_DBIG_0, i); |
print_tlb_entry(i, t, d); |
} |
printf("TLB_DBIG_2 contents:\n"); |
for (i = 0; i < tlb_dbig_size(); i++) { |
d.value = dtlb_data_access_read(TLB_DBIG_1, i); |
t.value = dtlb_tag_read_read(TLB_DBIG_1, i); |
print_tlb_entry(i, t, d); |
} |
} |
#endif |
void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, |
const char *str) |
{ |
fault_if_from_uspace(istate, "%s.", str); |
fault_if_from_uspace(istate, "%s\n", str); |
dump_istate(istate); |
panic("%s.", str); |
panic("%s\n", str); |
} |
void do_fast_data_access_mmu_miss_fault(istate_t *istate, |
450,12 → 379,12 |
va = tag.vpn << MMU_PAGE_WIDTH; |
if (tag.context) { |
fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str, va, |
fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va, |
tag.context); |
} |
dump_istate(istate); |
printf("Faulting page: %p, ASID=%d.\n", va, tag.context); |
panic("%s.", str); |
printf("Faulting page: %p, ASID=%d\n", va, tag.context); |
panic("%s\n", str); |
} |
void do_fast_data_access_protection_fault(istate_t *istate, |
466,12 → 395,12 |
va = tag.vpn << MMU_PAGE_WIDTH; |
if (tag.context) { |
fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str, va, |
fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va, |
tag.context); |
} |
printf("Faulting page: %p, ASID=%d\n", va, tag.context); |
dump_istate(istate); |
panic("%s.", str); |
panic("%s\n", str); |
} |
void dump_sfsr_and_sfar(void) |
482,39 → 411,30 |
sfsr.value = dtlb_sfsr_read(); |
sfar = dtlb_sfar_read(); |
#if defined (US) |
printf("DTLB SFSR: asi=%#x, ft=%#x, e=%d, ct=%d, pr=%d, w=%d, ow=%d, " |
"fv=%d\n", sfsr.asi, sfsr.ft, sfsr.e, sfsr.ct, sfsr.pr, sfsr.w, |
sfsr.ow, sfsr.fv); |
#elif defined (US3) |
printf("DTLB SFSR: nf=%d, asi=%#x, tm=%d, ft=%#x, e=%d, ct=%d, pr=%d, " |
"w=%d, ow=%d, fv=%d\n", sfsr.nf, sfsr.asi, sfsr.tm, sfsr.ft, |
sfsr.e, sfsr.ct, sfsr.pr, sfsr.w, sfsr.ow, sfsr.fv); |
#endif |
printf("DTLB SFAR: address=%p\n", sfar); |
dtlb_sfsr_write(0); |
} |
#if defined (US) |
/** Invalidate all unlocked ITLB and DTLB entries. */ |
void tlb_invalidate_all(void) |
{ |
int i; |
tlb_data_t d; |
tlb_tag_read_reg_t t; |
/* |
* Walk all ITLB and DTLB entries and remove all unlocked mappings. |
* |
* The kernel doesn't use global mappings so any locked global mappings |
* found must have been created by someone else. Their only purpose now |
* found must have been created by someone else. Their only purpose now |
* is to collide with proper mappings. Invalidate immediately. It should |
* be safe to invalidate them as late as now. |
*/ |
tlb_data_t d; |
tlb_tag_read_reg_t t; |
for (i = 0; i < ITLB_ENTRY_COUNT; i++) { |
d.value = itlb_data_access_read(i); |
if (!d.l || d.g) { |
524,7 → 444,7 |
itlb_data_access_write(i, d.value); |
} |
} |
for (i = 0; i < DTLB_ENTRY_COUNT; i++) { |
d.value = dtlb_data_access_read(i); |
if (!d.l || d.g) { |
534,20 → 454,9 |
dtlb_data_access_write(i, d.value); |
} |
} |
} |
#elif defined (US3) |
/** Invalidate all unlocked ITLB and DTLB entries. */ |
void tlb_invalidate_all(void) |
{ |
itlb_demap(TLB_DEMAP_ALL, 0, 0); |
dtlb_demap(TLB_DEMAP_ALL, 0, 0); |
} |
#endif |
/** Invalidate all ITLB and DTLB entries that belong to specified ASID |
* (Context). |
* |
575,11 → 484,11 |
/** Invalidate all ITLB and DTLB entries for specified page range in specified |
* address space. |
* |
* @param asid Address Space ID. |
* @param page First page which to sweep out from ITLB and DTLB. |
* @param cnt Number of ITLB and DTLB entries to invalidate. |
* @param asid Address Space ID. |
* @param page First page which to sweep out from ITLB and DTLB. |
* @param cnt Number of ITLB and DTLB entries to invalidate. |
*/ |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt) |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
{ |
unsigned int i; |
tlb_context_reg_t pc_save, ctx; |
/branches/arm/kernel/arch/sparc64/src/mm/frame.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64mm |
/** @addtogroup sparc64mm |
* @{ |
*/ |
/** @file |
79,8 → 79,7 |
*/ |
frame_mark_unavailable(ADDR2PFN(KA2PA(PFN2ADDR(0))), 1); |
} |
end_of_identity = PA2KA(last_frame); |
} |
/** @} |
/branches/arm/kernel/arch/sparc64/src/mm/page.c |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2009 Jakub Jermar |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64mm |
/** @addtogroup sparc64mm |
* @{ |
*/ |
/** @file |
42,27 → 42,126 |
#include <align.h> |
#include <config.h> |
#ifdef CONFIG_SMP |
/** Entries locked in DTLB of BSP. |
* |
* Application processors need to have the same locked entries in their DTLBs as |
* the bootstrap processor. |
*/ |
static struct { |
uintptr_t virt_page; |
uintptr_t phys_page; |
int pagesize_code; |
} bsp_locked_dtlb_entry[DTLB_ENTRY_COUNT]; |
/** Number of entries in bsp_locked_dtlb_entry array. */ |
static count_t bsp_locked_dtlb_entries = 0; |
#endif /* CONFIG_SMP */ |
/** Perform sparc64 specific initialization of paging. */ |
void page_arch_init(void) |
{ |
if (config.cpu_active == 1) |
if (config.cpu_active == 1) { |
page_mapping_operations = &ht_mapping_operations; |
} else { |
#ifdef CONFIG_SMP |
unsigned int i; |
/* |
* Copy locked DTLB entries from the BSP. |
*/ |
for (i = 0; i < bsp_locked_dtlb_entries; i++) { |
dtlb_insert_mapping(bsp_locked_dtlb_entry[i].virt_page, |
bsp_locked_dtlb_entry[i].phys_page, |
bsp_locked_dtlb_entry[i].pagesize_code, true, |
false); |
} |
#endif |
} |
} |
/** Map memory-mapped device into virtual memory. |
* |
* We are currently using identity mapping for mapping device registers. |
* So far, only DTLB is used to map devices into memory. Chances are that there |
* will be only a limited amount of devices that the kernel itself needs to |
* lock in DTLB. |
* |
* @param physaddr Physical address of the page where the device is |
* located. |
* @param size Size of the device's registers. |
* @param physaddr Physical address of the page where the device is located. |
* Must be at least page-aligned. |
* @param size Size of the device's registers. Must not exceed 4M and must |
* include extra space caused by the alignment. |
* |
* @return Virtual address of the page where the device is mapped. |
* |
*/ |
uintptr_t hw_map(uintptr_t physaddr, size_t size) |
{ |
return PA2KA(physaddr); |
unsigned int order; |
unsigned int i; |
ASSERT(config.cpu_active == 1); |
struct { |
int pagesize_code; |
size_t increment; |
count_t count; |
} sizemap[] = { |
{ PAGESIZE_8K, 0, 1 }, /* 8K */ |
{ PAGESIZE_8K, MMU_PAGE_SIZE, 2 }, /* 16K */ |
{ PAGESIZE_8K, MMU_PAGE_SIZE, 4 }, /* 32K */ |
{ PAGESIZE_64K, 0, 1}, /* 64K */ |
{ PAGESIZE_64K, 8 * MMU_PAGE_SIZE, 2 }, /* 128K */ |
{ PAGESIZE_64K, 8 * MMU_PAGE_SIZE, 4 }, /* 256K */ |
{ PAGESIZE_512K, 0, 1 }, /* 512K */ |
{ PAGESIZE_512K, 64 * MMU_PAGE_SIZE, 2 }, /* 1M */ |
{ PAGESIZE_512K, 64 * MMU_PAGE_SIZE, 4 }, /* 2M */ |
{ PAGESIZE_4M, 0, 1 }, /* 4M */ |
{ PAGESIZE_4M, 512 * MMU_PAGE_SIZE, 2 } /* 8M */ |
}; |
ASSERT(ALIGN_UP(physaddr, MMU_PAGE_SIZE) == physaddr); |
ASSERT(size <= 8 * 1024 * 1024); |
if (size <= MMU_FRAME_SIZE) |
order = 0; |
else |
order = (fnzb64(size - 1) + 1) - MMU_FRAME_WIDTH; |
/* |
* Use virtual addresses that are beyond the limit of physical memory. |
* Thus, the physical address space will not be wasted by holes created |
* by frame_alloc(). |
*/ |
ASSERT(PA2KA(last_frame)); |
uintptr_t virtaddr = ALIGN_UP(PA2KA(last_frame), |
1 << (order + FRAME_WIDTH)); |
last_frame = ALIGN_UP(KA2PA(virtaddr) + size, |
1 << (order + FRAME_WIDTH)); |
for (i = 0; i < sizemap[order].count; i++) { |
/* |
* First, insert the mapping into DTLB. |
*/ |
dtlb_insert_mapping(virtaddr + i * sizemap[order].increment, |
physaddr + i * sizemap[order].increment, |
sizemap[order].pagesize_code, true, false); |
#ifdef CONFIG_SMP |
/* |
* Second, save the information about the mapping for APs. |
*/ |
bsp_locked_dtlb_entry[bsp_locked_dtlb_entries].virt_page = |
virtaddr + i * sizemap[order].increment; |
bsp_locked_dtlb_entry[bsp_locked_dtlb_entries].phys_page = |
physaddr + i * sizemap[order].increment; |
bsp_locked_dtlb_entry[bsp_locked_dtlb_entries].pagesize_code = |
sizemap[order].pagesize_code; |
bsp_locked_dtlb_entries++; |
#endif |
} |
return virtaddr; |
} |
/** @} |
/branches/arm/kernel/arch/sparc64/src/mm/tsb.c |
---|
50,14 → 50,13 |
* |
* @param as Address space. |
* @param page First page to invalidate in TSB. |
* @param pages Number of pages to invalidate. Value of (size_t) -1 means the |
* @param pages Number of pages to invalidate. Value of (count_t) -1 means the |
* whole TSB. |
*/ |
void tsb_invalidate(as_t *as, uintptr_t page, size_t pages) |
void tsb_invalidate(as_t *as, uintptr_t page, count_t pages) |
{ |
size_t i0; |
size_t i; |
size_t cnt; |
index_t i0, i; |
count_t cnt; |
ASSERT(as->arch.itsb && as->arch.dtsb); |
64,7 → 63,7 |
i0 = (page >> MMU_PAGE_WIDTH) & TSB_INDEX_MASK; |
ASSERT(i0 < ITSB_ENTRY_COUNT && i0 < DTSB_ENTRY_COUNT); |
if (pages == (size_t) -1 || (pages * 2) > ITSB_ENTRY_COUNT) |
if (pages == (count_t) -1 || (pages * 2) > ITSB_ENTRY_COUNT) |
cnt = ITSB_ENTRY_COUNT; |
else |
cnt = pages * 2; |
82,11 → 81,11 |
* @param t Software PTE. |
* @param index Zero if lower 8K-subpage, one if higher 8K subpage. |
*/ |
void itsb_pte_copy(pte_t *t, size_t index) |
void itsb_pte_copy(pte_t *t, index_t index) |
{ |
as_t *as; |
tsb_entry_t *tsb; |
size_t entry; |
index_t entry; |
ASSERT(index <= 1); |
113,9 → 112,9 |
tsb->data.value = 0; |
tsb->data.size = PAGESIZE_8K; |
tsb->data.pfn = (t->frame >> MMU_FRAME_WIDTH) + index; |
tsb->data.cp = t->c; /* cp as cache in phys.-idxed, c as cacheable */ |
tsb->data.p = t->k; /* p as privileged, k as kernel */ |
tsb->data.v = t->p; /* v as valid, p as present */ |
tsb->data.cp = t->c; |
tsb->data.p = t->k; /* p as privileged */ |
tsb->data.v = t->p; |
write_barrier(); |
128,11 → 127,11 |
* @param index Zero if lower 8K-subpage, one if higher 8K-subpage. |
* @param ro If true, the mapping is copied read-only. |
*/ |
void dtsb_pte_copy(pte_t *t, size_t index, bool ro) |
void dtsb_pte_copy(pte_t *t, index_t index, bool ro) |
{ |
as_t *as; |
tsb_entry_t *tsb; |
size_t entry; |
index_t entry; |
ASSERT(index <= 1); |
174,4 → 173,3 |
/** @} |
*/ |
/branches/arm/kernel/arch/sparc64/src/smp/smp.c |
---|
35,7 → 35,6 |
#include <smp/smp.h> |
#include <genarch/ofw/ofw_tree.h> |
#include <cpu.h> |
#include <arch/cpu_family.h> |
#include <arch/cpu.h> |
#include <arch.h> |
#include <config.h> |
44,7 → 43,6 |
#include <synch/synch.h> |
#include <synch/waitq.h> |
#include <print.h> |
#include <arch/cpu_node.h> |
/** |
* This global variable is used to pick-up application processors |
61,57 → 59,17 |
void smp_init(void) |
{ |
ofw_tree_node_t *node; |
size_t cnt = 0; |
count_t cnt = 0; |
if (is_us() || is_us_iii()) { |
node = ofw_tree_find_child_by_device_type(cpus_parent(), "cpu"); |
while (node) { |
cnt++; |
node = ofw_tree_find_peer_by_device_type(node, "cpu"); |
} |
} else if (is_us_iv()) { |
node = ofw_tree_find_child(cpus_parent(), "cmp"); |
while (node) { |
cnt += 2; |
node = ofw_tree_find_peer_by_name(node, "cmp"); |
} |
node = ofw_tree_find_child_by_device_type(ofw_tree_lookup("/"), "cpu"); |
while (node) { |
cnt++; |
node = ofw_tree_find_peer_by_device_type(node, "cpu"); |
} |
config.cpu_count = max(1, cnt); |
} |
/** |
* Wakes up the CPU which is represented by the "node" OFW tree node. |
* If "node" represents the current CPU, calling the function has |
* no effect. |
*/ |
static void wakeup_cpu(ofw_tree_node_t *node) |
{ |
uint32_t mid; |
ofw_tree_property_t *prop; |
/* 'upa-portid' for US, 'portid' for US-III, 'cpuid' for US-IV */ |
prop = ofw_tree_getprop(node, "upa-portid"); |
if ((!prop) || (!prop->value)) |
prop = ofw_tree_getprop(node, "portid"); |
if ((!prop) || (!prop->value)) |
prop = ofw_tree_getprop(node, "cpuid"); |
if (!prop || prop->value == NULL) |
return; |
mid = *((uint32_t *) prop->value); |
if (CPU->arch.mid == mid) |
return; |
waking_up_mid = mid; |
if (waitq_sleep_timeout(&ap_completion_wq, 1000000, SYNCH_FLAGS_NONE) == |
ESYNCH_TIMEOUT) |
printf("%s: waiting for processor (mid = %" PRIu32 |
") timed out\n", __func__, mid); |
} |
/** Wake application processors up. */ |
void kmp(void *arg) |
{ |
118,18 → 76,31 |
ofw_tree_node_t *node; |
int i; |
if (is_us() || is_us_iii()) { |
node = ofw_tree_find_child_by_device_type(cpus_parent(), "cpu"); |
for (i = 0; node; |
node = ofw_tree_find_peer_by_device_type(node, "cpu"), i++) |
wakeup_cpu(node); |
} else if (is_us_iv()) { |
node = ofw_tree_find_child(cpus_parent(), "cmp"); |
while (node) { |
wakeup_cpu(ofw_tree_find_child(node, "cpu@0")); |
wakeup_cpu(ofw_tree_find_child(node, "cpu@1")); |
node = ofw_tree_find_peer_by_name(node, "cmp"); |
node = ofw_tree_find_child_by_device_type(ofw_tree_lookup("/"), "cpu"); |
for (i = 0; node; node = ofw_tree_find_peer_by_device_type(node, "cpu"), i++) { |
uint32_t mid; |
ofw_tree_property_t *prop; |
prop = ofw_tree_getprop(node, "upa-portid"); |
if (!prop || !prop->value) |
continue; |
mid = *((uint32_t *) prop->value); |
if (CPU->arch.mid == mid) { |
/* |
* Skip the current CPU. |
*/ |
continue; |
} |
/* |
* Processor with ID == mid can proceed with its initialization. |
*/ |
waking_up_mid = mid; |
if (waitq_sleep_timeout(&ap_completion_wq, 1000000, SYNCH_FLAGS_NONE) == ESYNCH_TIMEOUT) |
printf("%s: waiting for processor (mid = %" PRIu32 ") timed out\n", |
__func__, mid); |
} |
} |
/branches/arm/kernel/arch/sparc64/src/smp/ipi.c |
---|
46,33 → 46,6 |
#include <time/delay.h> |
#include <panic.h> |
/** Set the contents of the outgoing interrupt vector data. |
* |
* The first data item (data 0) will be set to the value of func, the |
* rest of the vector will contain zeros. |
* |
* This is a helper function used from within the cross_call function. |
* |
* @param func value the first data item of the vector will be set to |
*/ |
static inline void set_intr_w_data(void (* func)(void)) |
{ |
#if defined (US) |
asi_u64_write(ASI_INTR_W, ASI_UDB_INTR_W_DATA_0, (uintptr_t) func); |
asi_u64_write(ASI_INTR_W, ASI_UDB_INTR_W_DATA_1, 0); |
asi_u64_write(ASI_INTR_W, ASI_UDB_INTR_W_DATA_2, 0); |
#elif defined (US3) |
asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_0, (uintptr_t) func); |
asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_1, 0); |
asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_2, 0); |
asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_3, 0); |
asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_4, 0); |
asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_5, 0); |
asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_6, 0); |
asi_u64_write(ASI_INTR_W, VA_INTR_W_DATA_7, 0); |
#endif |
} |
/** Invoke function on another processor. |
* |
* Currently, only functions without arguments are supported. |
98,15 → 71,16 |
status = asi_u64_read(ASI_INTR_DISPATCH_STATUS, 0); |
if (status & INTR_DISPATCH_STATUS_BUSY) |
panic("Interrupt Dispatch Status busy bit set."); |
panic("Interrupt Dispatch Status busy bit set\n"); |
ASSERT(!(pstate_read() & PSTATE_IE_BIT)); |
do { |
set_intr_w_data(func); |
asi_u64_write(ASI_INTR_W, |
asi_u64_write(ASI_UDB_INTR_W, ASI_UDB_INTR_W_DATA_0, |
(uintptr_t) func); |
asi_u64_write(ASI_UDB_INTR_W, ASI_UDB_INTR_W_DATA_1, 0); |
asi_u64_write(ASI_UDB_INTR_W, ASI_UDB_INTR_W_DATA_2, 0); |
asi_u64_write(ASI_UDB_INTR_W, |
(mid << INTR_VEC_DISPATCH_MID_SHIFT) | |
VA_INTR_W_DISPATCH, 0); |
ASI_UDB_INTR_W_DISPATCH, 0); |
membar(); |
151,7 → 125,7 |
func = tlb_shootdown_ipi_recv; |
break; |
default: |
panic("Unknown IPI (%d).", ipi); |
panic("Unknown IPI (%d).\n", ipi); |
break; |
} |
/branches/arm/kernel/arch/sparc64/src/cpu/cpu.c |
---|
32,46 → 32,12 |
/** @file |
*/ |
#include <arch/cpu_family.h> |
#include <cpu.h> |
#include <arch.h> |
#include <genarch/ofw/ofw_tree.h> |
#include <arch/drivers/tick.h> |
#include <print.h> |
#include <arch/cpu_node.h> |
/** |
* Finds out the clock frequency of the current CPU. |
* |
* @param node node representing the current CPU in the OFW tree |
* @return clock frequency if "node" is the current CPU and no error |
* occurs, -1 if "node" is not the current CPU or on error |
*/ |
static int find_cpu_frequency(ofw_tree_node_t *node) |
{ |
ofw_tree_property_t *prop; |
uint32_t mid; |
/* 'upa-portid' for US, 'portid' for US-III, 'cpuid' for US-IV */ |
prop = ofw_tree_getprop(node, "upa-portid"); |
if ((!prop) || (!prop->value)) |
prop = ofw_tree_getprop(node, "portid"); |
if ((!prop) || (!prop->value)) |
prop = ofw_tree_getprop(node, "cpuid"); |
if (prop && prop->value) { |
mid = *((uint32_t *) prop->value); |
if (mid == CPU->arch.mid) { |
prop = ofw_tree_getprop(node, "clock-frequency"); |
if (prop && prop->value) { |
return *((uint32_t *) prop->value); |
} |
} |
} |
return -1; |
} |
/** Perform sparc64 specific initialization of the processor structure for the |
* current processor. |
*/ |
78,37 → 44,34 |
void cpu_arch_init(void) |
{ |
ofw_tree_node_t *node; |
uint32_t mid; |
uint32_t clock_frequency = 0; |
upa_config_t upa_config; |
CPU->arch.mid = read_mid(); |
upa_config.value = upa_config_read(); |
CPU->arch.mid = upa_config.mid; |
/* |
* Detect processor frequency. |
*/ |
if (is_us() || is_us_iii()) { |
node = ofw_tree_find_child_by_device_type(cpus_parent(), "cpu"); |
while (node) { |
int f = find_cpu_frequency(node); |
if (f != -1) |
clock_frequency = (uint32_t) f; |
node = ofw_tree_find_peer_by_device_type(node, "cpu"); |
node = ofw_tree_find_child_by_device_type(ofw_tree_lookup("/"), "cpu"); |
while (node) { |
ofw_tree_property_t *prop; |
prop = ofw_tree_getprop(node, "upa-portid"); |
if (prop && prop->value) { |
mid = *((uint32_t *) prop->value); |
if (mid == CPU->arch.mid) { |
prop = ofw_tree_getprop(node, |
"clock-frequency"); |
if (prop && prop->value) |
clock_frequency = *((uint32_t *) |
prop->value); |
} |
} |
} else if (is_us_iv()) { |
node = ofw_tree_find_child(cpus_parent(), "cmp"); |
while (node) { |
int f; |
f = find_cpu_frequency( |
ofw_tree_find_child(node, "cpu@0")); |
if (f != -1) |
clock_frequency = (uint32_t) f; |
f = find_cpu_frequency( |
ofw_tree_find_child(node, "cpu@1")); |
if (f != -1) |
clock_frequency = (uint32_t) f; |
node = ofw_tree_find_peer_by_name(node, "cmp"); |
} |
node = ofw_tree_find_peer_by_device_type(node, "cpu"); |
} |
CPU->arch.clock_frequency = clock_frequency; |
tick_init(); |
} |
161,15 → 124,6 |
case IMPL_ULTRASPARCIII: |
impl = "UltraSPARC III"; |
break; |
case IMPL_ULTRASPARCIII_PLUS: |
impl = "UltraSPARC III+"; |
break; |
case IMPL_ULTRASPARCIII_I: |
impl = "UltraSPARC IIIi"; |
break; |
case IMPL_ULTRASPARCIV: |
impl = "UltraSPARC IV"; |
break; |
case IMPL_ULTRASPARCIV_PLUS: |
impl = "UltraSPARC IV+"; |
break; |
/branches/arm/kernel/arch/sparc64/src/drivers/sgcn.c |
---|
File deleted |
/branches/arm/kernel/arch/sparc64/src/drivers/scr.c |
---|
37,7 → 37,7 |
#include <genarch/fb/fb.h> |
#include <genarch/fb/visuals.h> |
#include <arch/types.h> |
#include <string.h> |
#include <func.h> |
#include <align.h> |
#include <print.h> |
55,30 → 55,23 |
void scr_init(ofw_tree_node_t *node) |
{ |
ofw_tree_property_t *prop; |
ofw_pci_reg_t *pci_reg; |
ofw_pci_reg_t pci_abs_reg; |
ofw_upa_reg_t *upa_reg; |
ofw_sbus_reg_t *sbus_reg; |
const char *name; |
name = ofw_tree_node_name(node); |
if (str_cmp(name, "SUNW,m64B") == 0) |
if (strcmp(name, "SUNW,m64B") == 0) |
scr_type = SCR_ATYFB; |
else if (str_cmp(name, "SUNW,XVR-100") == 0) |
scr_type = SCR_XVR; |
else if (str_cmp(name, "SUNW,ffb") == 0) |
else if (strcmp(name, "SUNW,ffb") == 0) |
scr_type = SCR_FFB; |
else if (str_cmp(name, "cgsix") == 0) |
else if (strcmp(name, "cgsix") == 0) |
scr_type = SCR_CGSIX; |
if (scr_type == SCR_UNKNOWN) { |
printf("Unknown screen device.\n"); |
printf("Unknown keyboard device.\n"); |
return; |
} |
uintptr_t fb_addr; |
unsigned int fb_offset = 0; |
uint32_t fb_width = 0; |
uint32_t fb_height = 0; |
uint32_t fb_depth = 0; |
104,7 → 97,7 |
prop = ofw_tree_getprop(node, "reg"); |
if (!prop) |
panic("Cannot find 'reg' property."); |
panic("Can't find \"reg\" property.\n"); |
switch (scr_type) { |
case SCR_ATYFB: |
113,15 → 106,15 |
return; |
} |
pci_reg = &((ofw_pci_reg_t *) prop->value)[1]; |
ofw_pci_reg_t *fb_reg = &((ofw_pci_reg_t *) prop->value)[1]; |
ofw_pci_reg_t abs_reg; |
if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) { |
if (!ofw_pci_reg_absolutize(node, fb_reg, &abs_reg)) { |
printf("Failed to absolutize fb register.\n"); |
return; |
} |
if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, |
&fb_addr)) { |
if (!ofw_pci_apply_ranges(node->parent, &abs_reg , &fb_addr)) { |
printf("Failed to determine screen address.\n"); |
return; |
} |
149,56 → 142,12 |
} |
break; |
case SCR_XVR: |
if (prop->size / sizeof(ofw_pci_reg_t) < 2) { |
printf("Too few screen registers.\n"); |
return; |
} |
pci_reg = &((ofw_pci_reg_t *) prop->value)[1]; |
if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) { |
printf("Failed to absolutize fb register.\n"); |
return; |
} |
if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, |
&fb_addr)) { |
printf("Failed to determine screen address.\n"); |
return; |
} |
fb_offset = 4 * 0x2000; |
switch (fb_depth) { |
case 8: |
fb_scanline = fb_linebytes * (fb_depth >> 3); |
visual = VISUAL_INDIRECT_8; |
break; |
case 16: |
fb_scanline = fb_linebytes * (fb_depth >> 3); |
visual = VISUAL_RGB_5_6_5; |
break; |
case 24: |
fb_scanline = fb_linebytes * 4; |
visual = VISUAL_RGB_8_8_8_0; |
break; |
case 32: |
fb_scanline = fb_linebytes * (fb_depth >> 3); |
visual = VISUAL_RGB_0_8_8_8; |
break; |
default: |
printf("Unsupported bits per pixel.\n"); |
return; |
} |
break; |
case SCR_FFB: |
fb_scanline = 8192; |
visual = VISUAL_BGR_0_8_8_8; |
upa_reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP]; |
if (!ofw_upa_apply_ranges(node->parent, upa_reg, &fb_addr)) { |
ofw_upa_reg_t *reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP]; |
if (!ofw_upa_apply_ranges(node->parent, reg, &fb_addr)) { |
printf("Failed to determine screen address.\n"); |
return; |
} |
215,8 → 164,8 |
return; |
} |
sbus_reg = &((ofw_sbus_reg_t *) prop->value)[0]; |
if (!ofw_sbus_apply_ranges(node->parent, sbus_reg, &fb_addr)) { |
ofw_sbus_reg_t *cg6_reg = &((ofw_sbus_reg_t *) prop->value)[0]; |
if (!ofw_sbus_apply_ranges(node->parent, cg6_reg, &fb_addr)) { |
printf("Failed to determine screen address.\n"); |
return; |
} |
223,24 → 172,11 |
break; |
default: |
panic("Unexpected type."); |
panic("Unexpected type.\n"); |
} |
fb_properties_t props = { |
.addr = fb_addr, |
.offset = fb_offset, |
.x = fb_width, |
.y = fb_height, |
.scan = fb_scanline, |
.visual = visual, |
}; |
fb_init(&props); |
fb_init(fb_addr, fb_width, fb_height, fb_scanline, visual); |
} |
void scr_redraw(void) |
{ |
fb_redraw(); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/sparc64/src/drivers/tick.c |
---|
45,12 → 45,11 |
#define TICK_RESTART_TIME 50 /* Worst case estimate. */ |
/** Initialize tick and stick interrupt. */ |
/** Initialize tick interrupt. */ |
void tick_init(void) |
{ |
/* initialize TICK interrupt */ |
tick_compare_reg_t compare; |
interrupt_register(14, "tick_int", tick_interrupt); |
compare.int_dis = false; |
compare.tick_cmpr = CPU->arch.clock_frequency / HZ; |
57,21 → 56,6 |
CPU->arch.next_tick_cmpr = compare.tick_cmpr; |
tick_compare_write(compare.value); |
tick_write(0); |
#if defined (US3) |
/* disable STICK interrupts and clear any pending ones */ |
tick_compare_reg_t stick_compare; |
softint_reg_t clear; |
stick_compare.value = stick_compare_read(); |
stick_compare.int_dis = true; |
stick_compare.tick_cmpr = 0; |
stick_compare_write(stick_compare.value); |
clear.value = 0; |
clear.stick_int = 1; |
clear_softint_write(clear.value); |
#endif |
} |
/** Process tick interrupt. |
83,7 → 67,7 |
{ |
softint_reg_t softint, clear; |
uint64_t drift; |
softint.value = softint_read(); |
/* |
/branches/arm/kernel/arch/sparc64/src/drivers/fhc.c |
---|
45,7 → 45,6 |
#include <mm/slab.h> |
#include <arch/types.h> |
#include <genarch/ofw/ofw_tree.h> |
#include <sysinfo/sysinfo.h> |
fhc_t *central_fhc = NULL; |
71,7 → 70,7 |
if (!prop || !prop->value) |
return NULL; |
size_t regs = prop->size / sizeof(ofw_central_reg_t); |
count_t regs = prop->size / sizeof(ofw_central_reg_t); |
if (regs + 1 < UART_IMAP_REG) |
return NULL; |
87,13 → 86,6 |
fhc->uart_imap = (uint32_t *) hw_map(paddr, reg->size); |
/* |
* Set sysinfo data needed by the uspace FHC driver. |
*/ |
sysinfo_set_item_val("fhc.uart.size", NULL, reg->size); |
sysinfo_set_item_val("fhc.uart.physical", NULL, paddr); |
sysinfo_set_item_val("kbd.cir.fhc", NULL, 1); |
return fhc; |
} |
104,14 → 96,13 |
fhc->uart_imap[FHC_UART_IMAP] |= IMAP_V_MASK; |
break; |
default: |
panic("Unexpected INR (%d).", inr); |
panic("Unexpected INR (%d)\n", inr); |
break; |
} |
} |
void fhc_clear_interrupt(void *fhcp, int inr) |
void fhc_clear_interrupt(fhc_t *fhc, int inr) |
{ |
fhc_t *fhc = (fhc_t *)fhcp; |
ASSERT(fhc->uart_imap); |
switch (inr) { |
119,7 → 110,7 |
fhc->uart_imap[FHC_UART_ICLR] = 0; |
break; |
default: |
panic("Unexpected INR (%d).", inr); |
panic("Unexpected INR (%d)\n", inr); |
break; |
} |
} |
/branches/arm/kernel/arch/sparc64/src/drivers/kbd.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64 |
/** @addtogroup sparc64 |
* @{ |
*/ |
/** @file |
34,160 → 34,99 |
#include <arch/drivers/kbd.h> |
#include <genarch/ofw/ofw_tree.h> |
#ifdef CONFIG_SUN_KBD |
#include <genarch/kbrd/kbrd.h> |
#endif |
#ifdef CONFIG_Z8530 |
#include <genarch/drivers/z8530/z8530.h> |
#include <genarch/kbd/z8530.h> |
#endif |
#ifdef CONFIG_NS16550 |
#include <genarch/drivers/ns16550/ns16550.h> |
#include <genarch/kbd/ns16550.h> |
#endif |
#include <console/console.h> |
#include <ddi/device.h> |
#include <ddi/irq.h> |
#include <arch/mm/page.h> |
#include <arch/types.h> |
#include <align.h> |
#include <string.h> |
#include <func.h> |
#include <print.h> |
#include <sysinfo/sysinfo.h> |
#ifdef CONFIG_SUN_KBD |
kbd_type_t kbd_type = KBD_UNKNOWN; |
#ifdef CONFIG_Z8530 |
static bool kbd_z8530_init(ofw_tree_node_t *node) |
/** Initialize keyboard. |
* |
* Traverse OpenFirmware device tree in order to find necessary |
* info about the keyboard device. |
* |
* @param node Keyboard device node. |
*/ |
void kbd_init(ofw_tree_node_t *node) |
{ |
const char *name = ofw_tree_node_name(node); |
size_t offset; |
uintptr_t aligned_addr; |
ofw_tree_property_t *prop; |
const char *name; |
if (str_cmp(name, "zs") != 0) |
return false; |
name = ofw_tree_node_name(node); |
/* |
* Read 'interrupts' property. |
* Determine keyboard serial controller type. |
*/ |
ofw_tree_property_t *prop = ofw_tree_getprop(node, "interrupts"); |
if ((!prop) || (!prop->value)) { |
printf("z8530: Unable to find interrupts property\n"); |
return false; |
} |
if (strcmp(name, "zs") == 0) |
kbd_type = KBD_Z8530; |
else if (strcmp(name, "su") == 0) |
kbd_type = KBD_NS16550; |
uint32_t interrupts = *((uint32_t *) prop->value); |
/* |
* Read 'reg' property. |
*/ |
prop = ofw_tree_getprop(node, "reg"); |
if ((!prop) || (!prop->value)) { |
printf("z8530: Unable to find reg property\n"); |
return false; |
if (kbd_type == KBD_UNKNOWN) { |
printf("Unknown keyboard device.\n"); |
return; |
} |
size_t size = ((ofw_fhc_reg_t *) prop->value)->size; |
uintptr_t pa; |
if (!ofw_fhc_apply_ranges(node->parent, |
((ofw_fhc_reg_t *) prop->value), &pa)) { |
printf("z8530: Failed to determine address\n"); |
return false; |
} |
inr_t inr; |
cir_t cir; |
void *cir_arg; |
if (!ofw_fhc_map_interrupt(node->parent, |
((ofw_fhc_reg_t *) prop->value), interrupts, &inr, &cir, |
&cir_arg)) { |
printf("z8530: Failed to determine interrupt\n"); |
return false; |
} |
/* |
* We need to pass aligned address to hw_map(). |
* However, the physical keyboard address can |
* be pretty much unaligned, depending on the |
* underlying controller. |
* Read 'interrupts' property. |
*/ |
uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE); |
size_t offset = pa - aligned_addr; |
z8530_t *z8530 = (z8530_t *) |
(hw_map(aligned_addr, offset + size) + offset); |
z8530_instance_t *z8530_instance = z8530_init(z8530, inr, cir, cir_arg); |
if (z8530_instance) { |
kbrd_instance_t *kbrd_instance = kbrd_init(); |
if (kbrd_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *kbrd = kbrd_wire(kbrd_instance, sink); |
z8530_wire(z8530_instance, kbrd); |
} |
} |
/* |
* This is the necessary evil until the userspace drivers are |
* entirely self-sufficient. |
*/ |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.inr", NULL, inr); |
sysinfo_set_item_val("kbd.address.kernel", NULL, |
(uintptr_t) z8530); |
sysinfo_set_item_val("kbd.address.physical", NULL, pa); |
sysinfo_set_item_val("kbd.type.z8530", NULL, true); |
return true; |
} |
uint32_t interrupts; |
prop = ofw_tree_getprop(node, "interrupts"); |
if (!prop || !prop->value) |
panic("Can't find \"interrupts\" property.\n"); |
interrupts = *((uint32_t *) prop->value); |
#endif /* CONFIG_Z8530 */ |
#ifdef CONFIG_NS16550 |
static bool kbd_ns16550_init(ofw_tree_node_t *node) |
{ |
const char *name = ofw_tree_node_name(node); |
if (str_cmp(name, "su") != 0) |
return false; |
/* |
* Read 'interrupts' property. |
*/ |
ofw_tree_property_t *prop = ofw_tree_getprop(node, "interrupts"); |
if ((!prop) || (!prop->value)) { |
printf("ns16550: Unable to find interrupts property\n"); |
return false; |
} |
uint32_t interrupts = *((uint32_t *) prop->value); |
/* |
* Read 'reg' property. |
*/ |
prop = ofw_tree_getprop(node, "reg"); |
if ((!prop) || (!prop->value)) { |
printf("ns16550: Unable to find reg property\n"); |
return false; |
} |
if (!prop || !prop->value) |
panic("Can't find \"reg\" property.\n"); |
size_t size = ((ofw_ebus_reg_t *) prop->value)->size; |
uintptr_t pa; |
if (!ofw_ebus_apply_ranges(node->parent, |
((ofw_ebus_reg_t *) prop->value), &pa)) { |
printf("ns16550: Failed to determine address\n"); |
return false; |
} |
size_t size; |
inr_t inr; |
devno_t devno = device_assign_devno(); |
inr_t inr; |
cir_t cir; |
void *cir_arg; |
if (!ofw_ebus_map_interrupt(node->parent, |
((ofw_ebus_reg_t *) prop->value), interrupts, &inr, &cir, |
&cir_arg)) { |
printf("ns16550: Failed to determine interrupt\n"); |
return false; |
switch (kbd_type) { |
case KBD_Z8530: |
size = ((ofw_fhc_reg_t *) prop->value)->size; |
if (!ofw_fhc_apply_ranges(node->parent, ((ofw_fhc_reg_t *) prop->value) , &pa)) { |
printf("Failed to determine keyboard address.\n"); |
return; |
} |
if (!ofw_fhc_map_interrupt(node->parent, ((ofw_fhc_reg_t *) prop->value), interrupts, &inr)) { |
printf("Failed to determine keyboard interrupt.\n"); |
return; |
} |
break; |
case KBD_NS16550: |
size = ((ofw_ebus_reg_t *) prop->value)->size; |
if (!ofw_ebus_apply_ranges(node->parent, ((ofw_ebus_reg_t *) prop->value) , &pa)) { |
printf("Failed to determine keyboard address.\n"); |
return; |
} |
if (!ofw_ebus_map_interrupt(node->parent, ((ofw_ebus_reg_t *) prop->value), interrupts, &inr)) { |
printf("Failed to determine keyboard interrupt.\n"); |
return; |
}; |
break; |
default: |
panic("Unexpected type.\n"); |
} |
/* |
196,58 → 135,25 |
* be pretty much unaligned, depending on the |
* underlying controller. |
*/ |
uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE); |
size_t offset = pa - aligned_addr; |
ns16550_t *ns16550 = (ns16550_t *) |
(hw_map(aligned_addr, offset + size) + offset); |
ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, inr, cir, cir_arg); |
if (ns16550_instance) { |
kbrd_instance_t *kbrd_instance = kbrd_init(); |
if (kbrd_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *kbrd = kbrd_wire(kbrd_instance, sink); |
ns16550_wire(ns16550_instance, kbrd); |
} |
} |
/* |
* This is the necessary evil until the userspace drivers are |
* entirely self-sufficient. |
*/ |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.inr", NULL, inr); |
sysinfo_set_item_val("kbd.address.kernel", NULL, |
(uintptr_t) ns16550); |
sysinfo_set_item_val("kbd.address.physical", NULL, pa); |
sysinfo_set_item_val("kbd.type.ns16550", NULL, true); |
return true; |
} |
aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE); |
offset = pa - aligned_addr; |
uintptr_t vaddr = hw_map(aligned_addr, offset + size) + offset; |
#endif /* CONFIG_NS16550 */ |
/** Initialize keyboard. |
* |
* Traverse OpenFirmware device tree in order to find necessary |
* info about the keyboard device. |
* |
* @param node Keyboard device node. |
* |
*/ |
void kbd_init(ofw_tree_node_t *node) |
{ |
switch (kbd_type) { |
#ifdef CONFIG_Z8530 |
kbd_z8530_init(node); |
case KBD_Z8530: |
z8530_init(devno, inr, vaddr); |
break; |
#endif |
#ifdef CONFIG_NS16550 |
kbd_ns16550_init(node); |
case KBD_NS16550: |
ns16550_init(devno, inr, vaddr); |
break; |
#endif |
default: |
printf("Kernel is not compiled with the necessary keyboard driver this machine requires.\n"); |
} |
} |
#endif /* CONFIG_SUN_KBD */ |
/** @} |
*/ |
/branches/arm/kernel/arch/sparc64/src/drivers/pci.c |
---|
42,41 → 42,43 |
#include <arch/types.h> |
#include <debug.h> |
#include <print.h> |
#include <string.h> |
#include <func.h> |
#include <arch/asm.h> |
#include <sysinfo/sysinfo.h> |
#define SABRE_INTERNAL_REG 0 |
#define PSYCHO_INTERNAL_REG 2 |
#define PCI_SABRE_REGS_REG 0 |
#define OBIO_IMR_BASE 0x200 |
#define OBIO_IMR(ino) (OBIO_IMR_BASE + ((ino) & INO_MASK)) |
#define PCI_SABRE_IMAP_BASE 0x200 |
#define PCI_SABRE_ICLR_BASE 0x300 |
#define OBIO_CIR_BASE 0x300 |
#define OBIO_CIR(ino) (OBIO_CIR_BASE + ((ino) & INO_MASK)) |
#define PCI_PSYCHO_REGS_REG 2 |
static void obio_enable_interrupt(pci_t *, int); |
static void obio_clear_interrupt(pci_t *, int); |
#define PCI_PSYCHO_IMAP_BASE 0x200 |
#define PCI_PSYCHO_ICLR_BASE 0x300 |
static pci_t *pci_sabre_init(ofw_tree_node_t *); |
static pci_t *pci_psycho_init(ofw_tree_node_t *); |
static pci_t *pci_sabre_init(ofw_tree_node_t *node); |
static void pci_sabre_enable_interrupt(pci_t *pci, int inr); |
static void pci_sabre_clear_interrupt(pci_t *pci, int inr); |
static pci_t *pci_psycho_init(ofw_tree_node_t *node); |
static void pci_psycho_enable_interrupt(pci_t *pci, int inr); |
static void pci_psycho_clear_interrupt(pci_t *pci, int inr); |
/** PCI operations for Sabre model. */ |
static pci_operations_t pci_sabre_ops = { |
.enable_interrupt = obio_enable_interrupt, |
.clear_interrupt = obio_clear_interrupt |
.enable_interrupt = pci_sabre_enable_interrupt, |
.clear_interrupt = pci_sabre_clear_interrupt |
}; |
/** PCI operations for Psycho model. */ |
static pci_operations_t pci_psycho_ops = { |
.enable_interrupt = obio_enable_interrupt, |
.clear_interrupt = obio_clear_interrupt |
.enable_interrupt = pci_psycho_enable_interrupt, |
.clear_interrupt = pci_psycho_clear_interrupt |
}; |
/** Initialize PCI controller (model Sabre). |
* |
* @param node OpenFirmware device tree node of the Sabre. |
* @param node OpenFirmware device tree node of the Sabre. |
* |
* @return Address of the initialized PCI structure. |
* @return Address of the initialized PCI structure. |
*/ |
pci_t *pci_sabre_init(ofw_tree_node_t *node) |
{ |
91,14 → 93,13 |
return NULL; |
ofw_upa_reg_t *reg = prop->value; |
size_t regs = prop->size / sizeof(ofw_upa_reg_t); |
count_t regs = prop->size / sizeof(ofw_upa_reg_t); |
if (regs < SABRE_INTERNAL_REG + 1) |
if (regs < PCI_SABRE_REGS_REG + 1) |
return NULL; |
uintptr_t paddr; |
if (!ofw_upa_apply_ranges(node->parent, ®[SABRE_INTERNAL_REG], |
&paddr)) |
if (!ofw_upa_apply_ranges(node->parent, ®[PCI_SABRE_REGS_REG], &paddr)) |
return NULL; |
pci = (pci_t *) malloc(sizeof(pci_t), FRAME_ATOMIC); |
107,14 → 108,8 |
pci->model = PCI_SABRE; |
pci->op = &pci_sabre_ops; |
pci->reg = (uint64_t *) hw_map(paddr, reg[SABRE_INTERNAL_REG].size); |
pci->reg = (uint64_t *) hw_map(paddr, reg[PCI_SABRE_REGS_REG].size); |
/* |
* Set sysinfo data needed by the uspace OBIO driver. |
*/ |
sysinfo_set_item_val("obio.base.physical", NULL, paddr); |
sysinfo_set_item_val("kbd.cir.obio", NULL, 1); |
return pci; |
} |
121,9 → 116,9 |
/** Initialize the Psycho PCI controller. |
* |
* @param node OpenFirmware device tree node of the Psycho. |
* @param node OpenFirmware device tree node of the Psycho. |
* |
* @return Address of the initialized PCI structure. |
* @return Address of the initialized PCI structure. |
*/ |
pci_t *pci_psycho_init(ofw_tree_node_t *node) |
{ |
138,14 → 133,13 |
return NULL; |
ofw_upa_reg_t *reg = prop->value; |
size_t regs = prop->size / sizeof(ofw_upa_reg_t); |
count_t regs = prop->size / sizeof(ofw_upa_reg_t); |
if (regs < PSYCHO_INTERNAL_REG + 1) |
if (regs < PCI_PSYCHO_REGS_REG + 1) |
return NULL; |
uintptr_t paddr; |
if (!ofw_upa_apply_ranges(node->parent, ®[PSYCHO_INTERNAL_REG], |
&paddr)) |
if (!ofw_upa_apply_ranges(node->parent, ®[PCI_PSYCHO_REGS_REG], &paddr)) |
return NULL; |
pci = (pci_t *) malloc(sizeof(pci_t), FRAME_ATOMIC); |
154,27 → 148,31 |
pci->model = PCI_PSYCHO; |
pci->op = &pci_psycho_ops; |
pci->reg = (uint64_t *) hw_map(paddr, reg[PSYCHO_INTERNAL_REG].size); |
pci->reg = (uint64_t *) hw_map(paddr, reg[PCI_PSYCHO_REGS_REG].size); |
/* |
* Set sysinfo data needed by the uspace OBIO driver. |
*/ |
sysinfo_set_item_val("obio.base.physical", NULL, paddr); |
sysinfo_set_item_val("kbd.cir.obio", NULL, 1); |
return pci; |
} |
void obio_enable_interrupt(pci_t *pci, int inr) |
void pci_sabre_enable_interrupt(pci_t *pci, int inr) |
{ |
pci->reg[OBIO_IMR(inr & INO_MASK)] |= IMAP_V_MASK; |
pci->reg[PCI_SABRE_IMAP_BASE + (inr & INO_MASK)] |= IMAP_V_MASK; |
} |
void obio_clear_interrupt(pci_t *pci, int inr) |
void pci_sabre_clear_interrupt(pci_t *pci, int inr) |
{ |
pci->reg[OBIO_CIR(inr & INO_MASK)] = 0; /* set IDLE */ |
pci->reg[PCI_SABRE_ICLR_BASE + (inr & INO_MASK)] = 0; |
} |
void pci_psycho_enable_interrupt(pci_t *pci, int inr) |
{ |
pci->reg[PCI_PSYCHO_IMAP_BASE + (inr & INO_MASK)] |= IMAP_V_MASK; |
} |
void pci_psycho_clear_interrupt(pci_t *pci, int inr) |
{ |
pci->reg[PCI_PSYCHO_ICLR_BASE + (inr & INO_MASK)] = 0; |
} |
/** Initialize PCI controller. */ |
pci_t *pci_init(ofw_tree_node_t *node) |
{ |
183,7 → 181,7 |
/* |
* First, verify this is a PCI node. |
*/ |
ASSERT(str_cmp(ofw_tree_node_name(node), "pci") == 0); |
ASSERT(strcmp(ofw_tree_node_name(node), "pci") == 0); |
/* |
* Determine PCI controller model. |
192,13 → 190,13 |
if (!prop || !prop->value) |
return NULL; |
if (str_cmp(prop->value, "SUNW,sabre") == 0) { |
if (strcmp(prop->value, "SUNW,sabre") == 0) { |
/* |
* PCI controller Sabre. |
* This model is found on UltraSPARC IIi based machines. |
*/ |
return pci_sabre_init(node); |
} else if (str_cmp(prop->value, "SUNW,psycho") == 0) { |
} else if (strcmp(prop->value, "SUNW,psycho") == 0) { |
/* |
* PCI controller Psycho. |
* Used on UltraSPARC II based processors, for instance, |
217,14 → 215,14 |
void pci_enable_interrupt(pci_t *pci, int inr) |
{ |
ASSERT(pci->model); |
ASSERT(pci->op && pci->op->enable_interrupt); |
pci->op->enable_interrupt(pci, inr); |
} |
void pci_clear_interrupt(void *pcip, int inr) |
void pci_clear_interrupt(pci_t *pci, int inr) |
{ |
pci_t *pci = (pci_t *)pcip; |
ASSERT(pci->model); |
ASSERT(pci->op && pci->op->clear_interrupt); |
pci->op->clear_interrupt(pci, inr); |
} |
/branches/arm/kernel/arch/sparc64/src/proc/thread.c |
---|
34,8 → 34,9 |
#include <proc/thread.h> |
#include <arch/proc/thread.h> |
#include <mm/slab.h> |
#include <arch/trap/regwin.h> |
#include <mm/frame.h> |
#include <mm/page.h> |
#include <arch/mm/page.h> |
#include <align.h> |
void thr_constructor_arch(thread_t *t) |
49,12 → 50,12 |
void thr_destructor_arch(thread_t *t) |
{ |
if (t->arch.uspace_window_buffer) { |
uintptr_t uw_buf = (uintptr_t) t->arch.uspace_window_buffer; |
/* |
* Mind the possible alignment of the userspace window buffer |
* belonging to a killed thread. |
*/ |
free((uint8_t *) ALIGN_DOWN(uw_buf, UWB_ALIGNMENT)); |
frame_free(KA2PA(ALIGN_DOWN((uintptr_t) |
t->arch.uspace_window_buffer, PAGE_SIZE))); |
} |
} |
66,7 → 67,7 |
* The thread needs userspace window buffer and the object |
* returned from the slab allocator doesn't have any. |
*/ |
t->arch.uspace_window_buffer = malloc(UWB_ASIZE, 0); |
t->arch.uspace_window_buffer = frame_alloc(ONE_FRAME, FRAME_KA); |
} else { |
uintptr_t uw_buf = (uintptr_t) t->arch.uspace_window_buffer; |
75,7 → 76,7 |
* belonging to a killed thread. |
*/ |
t->arch.uspace_window_buffer = (uint8_t *) ALIGN_DOWN(uw_buf, |
UWB_ASIZE); |
PAGE_SIZE); |
} |
} |
/branches/arm/kernel/arch/sparc64/src/sparc64.c |
---|
37,6 → 37,7 |
#include <config.h> |
#include <arch/trap/trap.h> |
#include <arch/console.h> |
#include <proc/thread.h> |
#include <console/console.h> |
#include <arch/boot/boot.h> |
#include <arch/arch.h> |
46,11 → 47,10 |
#include <genarch/ofw/ofw_tree.h> |
#include <userspace.h> |
#include <ddi/irq.h> |
#include <string.h> |
bootinfo_t bootinfo; |
/** Perform sparc64-specific initialization before main_bsp() is called. */ |
/** Perform sparc64 specific initialization before main_bsp() is called. */ |
void arch_pre_main(void) |
{ |
/* Copy init task info. */ |
61,8 → 61,6 |
for (i = 0; i < bootinfo.taskmap.count; i++) { |
init.tasks[i].addr = (uintptr_t) bootinfo.taskmap.tasks[i].addr; |
init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, |
bootinfo.taskmap.tasks[i].name); |
} |
/* Copy boot allocations info. */ |
88,6 → 86,8 |
* But we only create 128 buckets. |
*/ |
irq_init(1 << 11, 128); |
standalone_sparc64_console_init(); |
} |
} |
101,7 → 101,18 |
void arch_post_smp_init(void) |
{ |
standalone_sparc64_console_init(); |
static thread_t *t = NULL; |
if (!t) { |
/* |
* Create thread that polls keyboard. |
*/ |
t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); |
if (!t) |
panic("cannot create kkbdpoll\n"); |
thread_ready(t); |
} |
} |
/** Calibrate delay loop. |
150,19 → 161,5 |
while (1); |
} |
/** Construct function pointer |
* |
* @param fptr function pointer structure |
* @param addr function address |
* @param caller calling function address |
* |
* @return address of the function pointer |
* |
*/ |
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
{ |
return addr; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/sparc64/src/ddi/ddi.c |
---|
41,7 → 41,7 |
* Interrupts are disabled and task is locked. |
* |
* @param task Task. |
* @param ioaddr Starting I/O space address. |
* @param ioaddr Startign I/O space address. |
* @param size Size of the enabled I/O range. |
* |
* @return 0 on success or an error code from errno.h. |
/branches/arm/kernel/arch/sparc64/src/console.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup sparc64 |
/** @addtogroup sparc64 |
* @{ |
*/ |
/** @file |
37,8 → 37,14 |
#include <arch/drivers/scr.h> |
#include <arch/drivers/kbd.h> |
#include <arch/drivers/sgcn.h> |
#include <genarch/srln/srln.h> |
#ifdef CONFIG_Z8530 |
#include <genarch/kbd/z8530.h> |
#endif |
#ifdef CONFIG_NS16550 |
#include <genarch/kbd/ns16550.h> |
#endif |
#include <console/chardev.h> |
#include <console/console.h> |
#include <arch/asm.h> |
48,101 → 54,92 |
#include <genarch/ofw/ofw_tree.h> |
#include <arch.h> |
#include <panic.h> |
#include <string.h> |
#include <print.h> |
#define KEYBOARD_POLL_PAUSE 50000 /* 50ms */ |
/** |
* Initialize kernel console to use framebuffer and keyboard directly. |
* Called on UltraSPARC machines with standard keyboard and framebuffer. |
* |
* @param aliases the "/aliases" OBP node |
*/ |
static void standard_console_init(ofw_tree_node_t *aliases) |
/** Initialize kernel console to use framebuffer and keyboard directly. */ |
void standalone_sparc64_console_init(void) |
{ |
#ifdef CONFIG_FB |
ofw_tree_property_t *prop_scr = ofw_tree_getprop(aliases, "screen"); |
if (!prop_scr) |
panic("Cannot find property 'screen'."); |
if (!prop_scr->value) |
panic("Cannot find screen alias."); |
ofw_tree_node_t *screen = ofw_tree_lookup(prop_scr->value); |
stdin = NULL; |
ofw_tree_node_t *aliases; |
ofw_tree_property_t *prop; |
ofw_tree_node_t *screen; |
ofw_tree_node_t *keyboard; |
aliases = ofw_tree_lookup("/aliases"); |
if (!aliases) |
panic("Can't find /aliases.\n"); |
prop = ofw_tree_getprop(aliases, "screen"); |
if (!prop) |
panic("Can't find property \"screen\".\n"); |
if (!prop->value) |
panic("Can't find screen alias.\n"); |
screen = ofw_tree_lookup(prop->value); |
if (!screen) |
panic("Cannot find %s.", prop_scr->value); |
panic("Can't find %s\n", prop->value); |
scr_init(screen); |
#endif |
#ifdef CONFIG_SUN_KBD |
ofw_tree_property_t *prop_kbd = ofw_tree_getprop(aliases, "keyboard"); |
if (!prop_kbd) |
panic("Cannot find property 'keyboard'."); |
if (!prop_kbd->value) |
panic("Cannot find keyboard alias."); |
ofw_tree_node_t *keyboard = ofw_tree_lookup(prop_kbd->value); |
prop = ofw_tree_getprop(aliases, "keyboard"); |
if (!prop) |
panic("Can't find property \"keyboard\".\n"); |
if (!prop->value) |
panic("Can't find keyboard alias.\n"); |
keyboard = ofw_tree_lookup(prop->value); |
if (!keyboard) |
panic("Cannot find %s.", prop_kbd->value); |
panic("Can't find %s\n", prop->value); |
kbd_init(keyboard); |
#endif |
} |
/** Initilize I/O on the Serengeti machine. */ |
static void serengeti_init(void) |
/** Kernel thread for polling keyboard. |
* |
* @param arg Ignored. |
*/ |
void kkbdpoll(void *arg) |
{ |
#ifdef CONFIG_SGCN_KBD |
sgcn_instance_t *sgcn_instance = sgcnin_init(); |
if (sgcn_instance) { |
srln_instance_t *srln_instance = srln_init(); |
if (srln_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *srln = srln_wire(srln_instance, sink); |
sgcnin_wire(sgcn_instance, srln); |
} |
thread_detach(THREAD); |
#ifdef CONFIG_Z8530 |
if (kbd_type == KBD_Z8530) { |
/* |
* The z8530 driver is interrupt-driven. |
*/ |
return; |
} |
#endif |
#ifdef CONFIG_SGCN_PRN |
sgcnout_init(); |
while (1) { |
#ifdef CONFIG_NS16550 |
if (kbd_type == KBD_NS16550) |
ns16550_poll(); |
#endif |
} |
/** |
* Initialize input/output. Auto-detects the type of machine |
* and calls the appropriate I/O init routine. |
*/ |
void standalone_sparc64_console_init(void) |
{ |
ofw_tree_node_t *aliases; |
ofw_tree_property_t *prop; |
aliases = ofw_tree_lookup("/aliases"); |
if (!aliases) |
panic("Cannot find '/aliases'."); |
/* "def-cn" = "default console" */ |
prop = ofw_tree_getprop(aliases, "def-cn"); |
if ((!prop) || (!prop->value) || (str_cmp(prop->value, "/sgcn") != 0)) { |
standard_console_init(aliases); |
} else { |
serengeti_init(); |
thread_usleep(KEYBOARD_POLL_PAUSE); |
} |
} |
/** Acquire console back for kernel |
* |
*/ |
void arch_grab_console(void) |
{ |
#ifdef CONFIG_FB |
scr_redraw(); |
switch (kbd_type) { |
#ifdef CONFIG_Z8530 |
case KBD_Z8530: |
z8530_grab(); |
break; |
#endif |
#ifdef CONFIG_SGCN_KBD |
sgcn_grab(); |
#ifdef CONFIG_NS16550 |
case KBD_NS16550: |
ns16550_grab(); |
break; |
#endif |
default: |
break; |
} |
} |
/** Return console to userspace |
150,9 → 147,20 |
*/ |
void arch_release_console(void) |
{ |
#ifdef CONFIG_SGCN_KBD |
sgcn_release(); |
switch (kbd_type) { |
#ifdef CONFIG_Z8530 |
case KBD_Z8530: |
z8530_release(); |
break; |
#endif |
#ifdef CONFIG_NS16550 |
case KBD_NS16550: |
ns16550_release(); |
break; |
#endif |
default: |
break; |
} |
} |
/** @} |
/branches/arm/kernel/arch/sparc64/src/start.S |
---|
27,7 → 27,6 |
# |
#include <arch/arch.h> |
#include <arch/cpu.h> |
#include <arch/regdef.h> |
#include <arch/boot/boot.h> |
#include <arch/stack.h> |
48,16 → 47,6 |
#define BSP_FLAG 1 |
/* |
* 2^PHYSMEM_ADDR_SIZE is the size of the physical address space on |
* a given processor. |
*/ |
#if defined (US) |
#define PHYSMEM_ADDR_SIZE 41 |
#elif defined (US3) |
#define PHYSMEM_ADDR_SIZE 43 |
#endif |
/* |
* Here is where the kernel is passed control from the boot loader. |
* |
* The registers are expected to be in this state: |
78,13 → 67,11 |
and %o0, %l0, %l7 ! l7 <= bootstrap processor? |
andn %o0, %l0, %l6 ! l6 <= start of physical memory |
! Get bits (PHYSMEM_ADDR_SIZE - 1):13 of physmem_base. |
! Get bits 40:13 of physmem_base. |
srlx %l6, 13, %l5 |
sllx %l5, 13 + (63 - 40), %l5 |
srlx %l5, 63 - 40, %l5 ! l5 <= physmem_base[40:13] |
! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13] |
sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5 |
srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 |
/* |
* Setup basic runtime environment. |
*/ |
96,8 → 83,6 |
! consistent |
wrpr %g0, NWINDOWS - 1, %cleanwin ! prevent needless clean_window |
! traps for kernel |
wrpr %g0, 0, %wstate ! use default spill/fill trap |
wrpr %g0, 0, %tl ! TL = 0, primary context |
! register is used |
259,8 → 244,7 |
/* |
* Precompute kernel 8K TLB data template. |
* %l5 contains starting physical address |
* bits [(PHYSMEM_ADDR_SIZE - 1):13] |
* %l5 contains starting physical address bits [40:13] |
*/ |
sethi %hi(kernel_8k_tlb_data_template), %l4 |
ldx [%l4 + %lo(kernel_8k_tlb_data_template)], %l3 |
294,36 → 278,19 |
/* Not reached. */ |
0: |
ba %xcc, 0b |
ba 0b |
nop |
1: |
#ifdef CONFIG_SMP |
/* |
* Determine the width of the MID and save its mask to %g3. The width |
* is |
* * 5 for US and US-IIIi, |
* * 10 for US3 except US-IIIi. |
*/ |
#if defined(US) |
mov 0x1f, %g3 |
#elif defined(US3) |
mov 0x3ff, %g3 |
rdpr %ver, %g2 |
sllx %g2, 16, %g2 |
srlx %g2, 48, %g2 |
cmp %g2, IMPL_ULTRASPARCIII_I |
move %xcc, 0x1f, %g3 |
#endif |
/* |
* Read MID from the processor. |
*/ |
ldxa [%g0] ASI_ICBUS_CONFIG, %g1 |
srlx %g1, ICBUS_CONFIG_MID_SHIFT, %g1 |
and %g1, %g3, %g1 |
1: |
ldxa [%g0] ASI_UPA_CONFIG, %g1 |
srlx %g1, UPA_CONFIG_MID_SHIFT, %g1 |
and %g1, UPA_CONFIG_MID_MASK, %g1 |
#ifdef CONFIG_SMP |
/* |
* Active loop for APs until the BSP picks them up. A processor cannot |
* leave the loop until the global variable 'waking_up_mid' equals its |
333,7 → 300,7 |
2: |
ldx [%g2], %g3 |
cmp %g3, %g1 |
bne %xcc, 2b |
bne 2b |
nop |
/* |
352,7 → 319,7 |
#endif |
0: |
ba %xcc, 0b |
ba 0b |
nop |
381,31 → 348,10 |
.quad 0 |
/* |
* The fast_data_access_mmu_miss_data_hi label and the end_of_identity and |
* kernel_8k_tlb_data_template variables are meant to stay together, |
* aligned on 16B boundary. |
* This variable is used by the fast_data_MMU_miss trap handler. In runtime, it |
* is further modified to reflect the starting address of physical memory. |
*/ |
.global fast_data_access_mmu_miss_data_hi |
.global end_of_identity |
.global kernel_8k_tlb_data_template |
.align 16 |
/* |
* This label is used by the fast_data_access_MMU_miss trap handler. |
*/ |
fast_data_access_mmu_miss_data_hi: |
/* |
* This variable is used by the fast_data_access_MMU_miss trap handler. |
* In runtime, it is modified to contain the address of the end of physical |
* memory. |
*/ |
end_of_identity: |
.quad -1 |
/* |
* This variable is used by the fast_data_access_MMU_miss trap handler. |
* In runtime, it is further modified to reflect the starting address of |
* physical memory. |
*/ |
kernel_8k_tlb_data_template: |
#ifdef CONFIG_VIRT_IDX_DCACHE |
.quad ((1 << TTE_V_SHIFT) | (PAGESIZE_8K << TTE_SIZE_SHIFT) | TTE_CP | \ |
/branches/arm/kernel/arch/sparc64/src/dummy.s |
---|
42,5 → 42,5 |
.global cpu_halt |
cpu_halt: |
ba %xcc, cpu_halt |
b cpu_halt |
nop |
/branches/arm/kernel/arch/sparc64/Makefile.inc |
---|
29,6 → 29,10 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf64-sparc |
BFD_ARCH = sparc |
BFD = binary |
40,58 → 44,82 |
LFLAGS += -no-check-sections -N |
BITS = 64 |
ENDIANESS = BE |
DEFS += -D__64_BITS__ |
ifeq ($(PROCESSOR),us) |
DEFS += -DUS |
endif |
## Own configuration directives |
# |
ifeq ($(PROCESSOR),us3) |
DEFS += -DUS3 |
## Compile with page hash table support. |
# |
CONFIG_PAGE_HT = y |
DEFS += -DCONFIG_PAGE_HT |
## Compile with support for address space identifiers. |
# |
CONFIG_ASID = y |
CONFIG_ASID_FIFO = y |
## Compile with support for framebuffer. |
# |
CONFIG_FB = y |
## Compile with support for Sun keyboard. |
# |
CONFIG_SUN_KBD = y |
## Compile with support for OpenFirmware device tree. |
# |
CONFIG_OFW_TREE = y |
ifeq ($(CONFIG_SMP),y) |
DEFS += -DCONFIG_SMP |
endif |
ARCH_SOURCES = \ |
arch/$(KARCH)/src/cpu/cpu.c \ |
arch/$(KARCH)/src/asm.S \ |
arch/$(KARCH)/src/panic.S \ |
arch/$(KARCH)/src/console.c \ |
arch/$(KARCH)/src/context.S \ |
arch/$(KARCH)/src/fpu_context.c \ |
arch/$(KARCH)/src/dummy.s \ |
arch/$(KARCH)/src/mm/as.c \ |
arch/$(KARCH)/src/mm/cache.S \ |
arch/$(KARCH)/src/mm/frame.c \ |
arch/$(KARCH)/src/mm/page.c \ |
arch/$(KARCH)/src/mm/tlb.c \ |
arch/$(KARCH)/src/sparc64.c \ |
arch/$(KARCH)/src/start.S \ |
arch/$(KARCH)/src/proc/scheduler.c \ |
arch/$(KARCH)/src/proc/thread.c \ |
arch/$(KARCH)/src/trap/mmu.S \ |
arch/$(KARCH)/src/trap/trap_table.S \ |
arch/$(KARCH)/src/trap/trap.c \ |
arch/$(KARCH)/src/trap/exception.c \ |
arch/$(KARCH)/src/trap/interrupt.c \ |
arch/$(KARCH)/src/ddi/ddi.c \ |
arch/$(KARCH)/src/drivers/tick.c \ |
arch/$(KARCH)/src/drivers/kbd.c \ |
arch/$(KARCH)/src/drivers/sgcn.c \ |
arch/$(KARCH)/src/drivers/pci.c \ |
arch/$(KARCH)/src/drivers/fhc.c |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/asm.S \ |
arch/$(ARCH)/src/panic.S \ |
arch/$(ARCH)/src/console.c \ |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/fpu_context.c \ |
arch/$(ARCH)/src/dummy.s \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/mm/cache.S \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/sparc64.c \ |
arch/$(ARCH)/src/start.S \ |
arch/$(ARCH)/src/proc/scheduler.c \ |
arch/$(ARCH)/src/proc/thread.c \ |
arch/$(ARCH)/src/trap/mmu.S \ |
arch/$(ARCH)/src/trap/trap_table.S \ |
arch/$(ARCH)/src/trap/trap.c \ |
arch/$(ARCH)/src/trap/exception.c \ |
arch/$(ARCH)/src/trap/interrupt.c \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/drivers/tick.c \ |
arch/$(ARCH)/src/drivers/kbd.c \ |
arch/$(ARCH)/src/drivers/scr.c \ |
arch/$(ARCH)/src/drivers/pci.c |
ifeq ($(CONFIG_FB),y) |
ARCH_SOURCES += \ |
arch/$(KARCH)/src/drivers/scr.c |
endif |
ifeq ($(CONFIG_SMP),y) |
ARCH_SOURCES += \ |
arch/$(KARCH)/src/smp/ipi.c \ |
arch/$(KARCH)/src/smp/smp.c |
ARCH_SOURCES += \ |
arch/$(ARCH)/src/smp/ipi.c \ |
arch/$(ARCH)/src/smp/smp.c |
endif |
ifeq ($(CONFIG_TSB),y) |
ARCH_SOURCES += \ |
arch/$(KARCH)/src/mm/tsb.c |
ARCH_SOURCES += \ |
arch/$(ARCH)/src/mm/tsb.c |
endif |
ifdef CONFIG_Z8530 |
ARCH_SOURCES += \ |
arch/$(ARCH)/src/drivers/fhc.c |
endif |
/branches/arm/kernel/arch/sparc64/_link.ld.in |
---|
1,8 → 1,8 |
/** SPARC64 linker script |
* |
* It is ELF format, but its only section looks like this: |
* kernel text |
* kernel data |
* kernel text |
* kernel data |
* |
*/ |
11,7 → 11,7 |
ENTRY(kernel_image_start) |
SECTIONS { |
.image VMA: AT (LMA) { |
.image VMA: AT (LMA) { |
ktext_start = .; |
*(K_TEXT_START) |
*(.text); |
21,23 → 21,23 |
*(K_DATA_START) |
*(.rodata); |
*(.rodata.*); |
*(.data); /* initialized data */ |
*(.data); /* initialized data */ |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
. = ALIGN(8); |
hardcoded_ktext_size = .; |
QUAD(ktext_end - ktext_start); |
QUAD(ktext_end - ktext_start); |
hardcoded_kdata_size = .; |
QUAD(kdata_end - kdata_start); |
hardcoded_load_address = .; |
QUAD(VMA); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
symbol_table = .; |
*(symtab.*); /* Symbol table, must be LAST symbol!*/ |
*(symtab.*); /* Symbol table, must be LAST symbol!*/ |
kdata_end = .; |
} |
44,5 → 44,5 |
/DISCARD/ : { |
*(*); |
} |
} |
/branches/arm/kernel/arch/ppc32/include/asm/regname.h |
---|
211,9 → 211,6 |
#define dbat2l 541 |
#define dbat3u 542 |
#define dbat3l 543 |
#define tlbmiss 980 |
#define ptehi 981 |
#define ptelo 982 |
#define hid0 1008 |
/* MSR bits */ |
223,7 → 220,6 |
#define msr_ee (1 << 15) |
/* HID0 bits */ |
#define hid0_sten (1 << 24) |
#define hid0_ice (1 << 15) |
#define hid0_dce (1 << 14) |
#define hid0_icfi (1 << 11) |
/branches/arm/kernel/arch/ppc32/include/exception.h |
---|
75,7 → 75,6 |
uint32_t lr; |
uint32_t ctr; |
uint32_t xer; |
uint32_t dar; |
uint32_t r12; |
uint32_t sp; |
} istate_t; |
/branches/arm/kernel/arch/ppc32/include/mm/page.h |
---|
102,25 → 102,25 |
/* Get PTE flags accessors for each level. */ |
#define GET_PTL1_FLAGS_ARCH(ptl0, i) \ |
get_pt_flags((pte_t *) (ptl0), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl0), (index_t) (i)) |
#define GET_PTL2_FLAGS_ARCH(ptl1, i) \ |
PAGE_PRESENT |
#define GET_PTL3_FLAGS_ARCH(ptl2, i) \ |
PAGE_PRESENT |
#define GET_FRAME_FLAGS_ARCH(ptl3, i) \ |
get_pt_flags((pte_t *) (ptl3), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl3), (index_t) (i)) |
/* Set PTE flags accessors for each level. */ |
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ |
set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x)) |
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ |
set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x)) |
/* Macros for querying the last-level PTEs. */ |
#define PTE_VALID_ARCH(pte) (*((uint32_t *) (pte)) != 0) |
#define PTE_PRESENT_ARCH(pte) ((pte)->present != 0) |
#define PTE_PRESENT_ARCH(pte) ((pte)->p != 0) |
#define PTE_GET_FRAME_ARCH(pte) ((pte)->pfn << 12) |
#define PTE_WRITABLE_ARCH(pte) 1 |
#define PTE_EXECUTABLE_ARCH(pte) 1 |
130,26 → 130,25 |
#include <mm/mm.h> |
#include <arch/interrupt.h> |
static inline int get_pt_flags(pte_t *pt, size_t i) |
static inline int get_pt_flags(pte_t *pt, index_t i) |
{ |
pte_t *p = &pt[i]; |
return (((!p->page_cache_disable) << PAGE_CACHEABLE_SHIFT) | |
((!p->present) << PAGE_PRESENT_SHIFT) | |
return ((1 << PAGE_CACHEABLE_SHIFT) | |
((!p->p) << PAGE_PRESENT_SHIFT) | |
(1 << PAGE_USER_SHIFT) | |
(1 << PAGE_READ_SHIFT) | |
(1 << PAGE_WRITE_SHIFT) | |
(1 << PAGE_EXEC_SHIFT) | |
(p->global << PAGE_GLOBAL_SHIFT)); |
(p->g << PAGE_GLOBAL_SHIFT)); |
} |
static inline void set_pt_flags(pte_t *pt, size_t i, int flags) |
static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
{ |
pte_t *p = &pt[i]; |
p->page_cache_disable = !(flags & PAGE_CACHEABLE); |
p->present = !(flags & PAGE_NOT_PRESENT); |
p->global = (flags & PAGE_GLOBAL) != 0; |
p->p = !(flags & PAGE_NOT_PRESENT); |
p->g = (flags & PAGE_GLOBAL) != 0; |
p->valid = 1; |
} |
/branches/arm/kernel/arch/ppc32/include/mm/tlb.h |
---|
39,11 → 39,6 |
#include <arch/types.h> |
#include <typedefs.h> |
#define WIMG_GUARDED 0x01 |
#define WIMG_COHERENT 0x02 |
#define WIMG_NO_CACHE 0x04 |
#define WIMG_WRITETHRU 0x08 |
typedef struct { |
unsigned v : 1; /**< Valid */ |
unsigned vsid : 24; /**< Virtual Segment ID */ |
58,27 → 53,9 |
unsigned pp : 2; /**< Page protection */ |
} phte_t; |
typedef struct { |
unsigned v : 1; |
unsigned vsid : 24; |
unsigned reserved0 : 1; |
unsigned api : 6; |
} ptehi_t; |
typedef struct { |
unsigned rpn : 20; |
unsigned xpn : 3; |
unsigned reserved0 : 1; |
unsigned c : 1; |
unsigned wimg : 4; |
unsigned x : 1; |
unsigned pp : 2; |
} ptelo_t; |
extern void pht_refill(int n, istate_t *istate); |
extern bool pht_real_refill(int n, istate_t *istate) __attribute__ ((section("K_UNMAPPED_TEXT_START"))); |
extern void pht_init(void); |
extern void pht_refill(int n, istate_t *istate); |
extern bool pht_refill_real(int n, istate_t *istate) __attribute__ ((section("K_UNMAPPED_TEXT_START"))); |
extern void tlb_refill_real(int n, uint32_t tlbmiss, ptehi_t ptehi, ptelo_t ptelo, istate_t *istate) __attribute__ ((section("K_UNMAPPED_TEXT_START"))); |
#endif |
/branches/arm/kernel/arch/ppc32/include/mm/frame.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32mm |
/** @addtogroup ppc32mm |
* @{ |
*/ |
/** @file |
35,13 → 35,13 |
#ifndef KERN_ppc32_FRAME_H_ |
#define KERN_ppc32_FRAME_H_ |
#define FRAME_WIDTH 12 /* 4K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#define FRAME_WIDTH 12 /* 4K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#ifdef KERNEL |
#ifndef __ASM__ |
#include <arch/types.h> |
#include <arch/types.h> |
extern uintptr_t last_frame; |
/branches/arm/kernel/arch/ppc32/include/barrier.h |
---|
55,7 → 55,6 |
"dcbst 0, %0\n" |
"sync\n" |
"icbi 0, %0\n" |
"sync\n" |
"isync\n" |
:: "r" (addr) |
); |
77,10 → 76,7 |
asm volatile ("icbi 0, %0\n" :: "r" (addr + i)); |
} |
asm volatile ( |
"sync\n" |
"isync\n" |
); |
asm volatile ("isync"); |
} |
#endif |
/branches/arm/kernel/arch/ppc32/include/boot/boot.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32 |
/** @addtogroup ppc32 |
* @{ |
*/ |
/** @file |
35,24 → 35,21 |
#ifndef KERN_ppc32_BOOT_H_ |
#define KERN_ppc32_BOOT_H_ |
#define BOOT_OFFSET 0x8000 |
#define BOOT_OFFSET 0x8000 |
/* Temporary stack size for boot process */ |
#define TEMP_STACK_SIZE 0x1000 |
#define TEMP_STACK_SIZE 0x1000 |
#define TASKMAP_MAX_RECORDS 32 |
#define MEMMAP_MAX_RECORDS 32 |
#define TASKMAP_MAX_RECORDS 32 |
#define MEMMAP_MAX_RECORDS 32 |
#ifndef __ASM__ |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
#include <arch/types.h> |
typedef struct { |
uintptr_t addr; |
uint32_t size; |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} utask_t; |
typedef struct { |
82,13 → 79,13 |
typedef struct { |
uintptr_t addr; |
unsigned int size; |
} macio_t; |
} keyboard_t; |
typedef struct { |
memmap_t memmap; |
taskmap_t taskmap; |
screen_t screen; |
macio_t macio; |
keyboard_t keyboard; |
} bootinfo_t; |
extern bootinfo_t bootinfo; |
/branches/arm/kernel/arch/ppc32/include/drivers/cuda.h |
---|
0,0 → 1,49 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc32_CUDA_H_ |
#define KERN_ppc32_CUDA_H_ |
#include <arch/types.h> |
#include <typedefs.h> |
extern void cuda_init(devno_t devno, uintptr_t base, size_t size); |
extern int cuda_get_scancode(void); |
extern void cuda_grab(void); |
extern void cuda_release(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc32/include/drivers/pic.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32 |
/** @addtogroup ppc32 |
* @{ |
*/ |
/** @file |
36,7 → 36,6 |
#define KERN_ppc32_PIC_H_ |
#include <arch/types.h> |
#include <ddi/irq.h> |
#define PIC_PENDING_LOW 8 |
#define PIC_PENDING_HIGH 4 |
45,11 → 44,11 |
#define PIC_ACK_LOW 10 |
#define PIC_ACK_HIGH 6 |
extern void pic_init(uintptr_t base, size_t size, cir_t *cir, void **cir_arg); |
extern void pic_enable_interrupt(inr_t intnum); |
extern void pic_disable_interrupt(inr_t intnum); |
extern void pic_ack_interrupt(void *arg, inr_t intnum); |
extern int pic_get_pending(void); |
void pic_init(uintptr_t base, size_t size); |
void pic_enable_interrupt(int intnum); |
void pic_disable_interrupt(int intnum); |
void pic_ack_interrupt(int intnum); |
int pic_get_pending(void); |
#endif |
/branches/arm/kernel/arch/ppc32/include/types.h |
---|
46,6 → 46,8 |
typedef unsigned long long uint64_t; |
typedef uint32_t size_t; |
typedef uint32_t count_t; |
typedef uint32_t index_t; |
typedef uint32_t uintptr_t; |
typedef uint32_t pfn_t; |
55,12 → 57,11 |
typedef uint32_t unative_t; |
typedef int32_t native_t; |
typedef struct { |
} fncptr_t; |
/**< Formats for uintptr_t, size_t */ |
/**< Formats for uintptr_t, size_t, count_t and index_t */ |
#define PRIp "x" |
#define PRIs "u" |
#define PRIc "u" |
#define PRIi "u" |
/**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */ |
#define PRId8 "d" |
83,13 → 84,11 |
/** Page Table Entry. */ |
typedef struct { |
unsigned present : 1; /**< Present bit. */ |
unsigned page_write_through : 1; /**< Write thought caching. */ |
unsigned page_cache_disable : 1; /**< No caching. */ |
unsigned accessed : 1; /**< Accessed bit. */ |
unsigned global : 1; /**< Global bit. */ |
unsigned valid : 1; /**< Valid content even if not present. */ |
unsigned pfn : 20; /**< Physical frame number. */ |
unsigned p : 1; /**< Present bit. */ |
unsigned a : 1; /**< Accessed bit. */ |
unsigned g : 1; /**< Global bit. */ |
unsigned valid : 1; /**< Valid content even if not present. */ |
unsigned pfn : 20; /**< Physical frame number. */ |
} pte_t; |
#endif |
/branches/arm/kernel/arch/ppc32/include/byteorder.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc32_BYTEORDER_H_ |
#define KERN_ppc32_BYTEORDER_H_ |
#define ARCH_IS_BIG_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc32/include/arch.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32 |
/** @addtogroup ppc32 |
* @{ |
*/ |
/** @file |
35,7 → 35,7 |
#ifndef KERN_ppc32_ARCH_H_ |
#define KERN_ppc32_ARCH_H_ |
extern void arch_pre_main(void); |
#include <arch/drivers/cuda.h> |
#endif |
/branches/arm/kernel/arch/ppc32/include/asm.h |
---|
36,7 → 36,6 |
#define KERN_ppc32_ASM_H_ |
#include <arch/types.h> |
#include <typedefs.h> |
#include <config.h> |
/** Enable interrupts. |
150,36 → 149,6 |
extern void userspace_asm(uintptr_t uspace_uarg, uintptr_t stack, uintptr_t entry); |
static inline void pio_write_8(ioport8_t *port, uint8_t v) |
{ |
*port = v; |
} |
static inline void pio_write_16(ioport16_t *port, uint16_t v) |
{ |
*port = v; |
} |
static inline void pio_write_32(ioport32_t *port, uint32_t v) |
{ |
*port = v; |
} |
static inline uint8_t pio_read_8(ioport8_t *port) |
{ |
return *port; |
} |
static inline uint16_t pio_read_16(ioport16_t *port) |
{ |
return *port; |
} |
static inline uint32_t pio_read_32(ioport32_t *port) |
{ |
return *port; |
} |
#endif |
/** @} |
/branches/arm/kernel/arch/ppc32/Makefile.inc |
---|
29,6 → 29,10 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf32-powerpc |
BFD_ARCH = powerpc:common |
BFD = binary |
39,24 → 43,46 |
AFLAGS += -a32 |
LFLAGS += -no-check-sections -N |
BITS = 32 |
ENDIANESS = BE |
DEFS += -D__32_BITS__ |
## Own configuration directives |
# |
CONFIG_FB = y |
## Compile with hierarchical page tables support. |
# |
CONFIG_PAGE_PT = y |
DEFS += -DCONFIG_PAGE_PT |
## Compile with support for address space identifiers. |
# |
CONFIG_ASID = y |
CONFIG_ASID_FIFO = y |
## Compile with support for software integer division. |
# |
CONFIG_SOFTINT = y |
ARCH_SOURCES = \ |
arch/$(KARCH)/src/context.S \ |
arch/$(KARCH)/src/debug/panic.s \ |
arch/$(KARCH)/src/fpu_context.S \ |
arch/$(KARCH)/src/boot/boot.S \ |
arch/$(KARCH)/src/ppc32.c \ |
arch/$(KARCH)/src/dummy.s \ |
arch/$(KARCH)/src/exception.S \ |
arch/$(KARCH)/src/interrupt.c \ |
arch/$(KARCH)/src/asm.S \ |
arch/$(KARCH)/src/cpu/cpu.c \ |
arch/$(KARCH)/src/proc/scheduler.c \ |
arch/$(KARCH)/src/ddi/ddi.c \ |
arch/$(KARCH)/src/mm/as.c \ |
arch/$(KARCH)/src/mm/frame.c \ |
arch/$(KARCH)/src/mm/page.c \ |
arch/$(KARCH)/src/mm/tlb.c \ |
arch/$(KARCH)/src/drivers/pic.c |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/debug/panic.s \ |
arch/$(ARCH)/src/fpu_context.S \ |
arch/$(ARCH)/src/boot/boot.S \ |
arch/$(ARCH)/src/ppc32.c \ |
arch/$(ARCH)/src/dummy.s \ |
arch/$(ARCH)/src/exception.S \ |
arch/$(ARCH)/src/interrupt.c \ |
arch/$(ARCH)/src/asm.S \ |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/proc/scheduler.c \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/drivers/cuda.c \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/drivers/pic.c |
/branches/arm/kernel/arch/ppc32/src/asm.S |
---|
34,7 → 34,6 |
.global iret |
.global iret_syscall |
.global memsetb |
.global memsetw |
.global memcpy |
.global memcpy_from_uspace |
.global memcpy_to_uspace |
67,9 → 66,9 |
mr sp, r4 |
# %r6 is defined to hold pcb_ptr - set it to 0 |
# %r3 is defined to hold pcb_ptr - set it to 0 |
xor r6, r6, r6 |
xor r3, r3, r3 |
# jump to userspace |
132,8 → 131,8 |
lwz r12, 148(sp) |
mtxer r12 |
lwz r12, 156(sp) |
lwz sp, 160(sp) |
lwz r12, 152(sp) |
lwz sp, 156(sp) |
rfi |
198,17 → 197,14 |
lwz r12, 148(sp) |
mtxer r12 |
lwz r12, 156(sp) |
lwz sp, 160(sp) |
lwz r12, 152(sp) |
lwz sp, 156(sp) |
rfi |
memsetb: |
b _memsetb |
memsetw: |
b _memsetw |
memcpy: |
memcpy_from_uspace: |
memcpy_to_uspace: |
/branches/arm/kernel/arch/ppc32/src/mm/tlb.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32mm |
/** @addtogroup ppc32mm |
* @{ |
*/ |
/** @file |
35,22 → 35,12 |
#include <mm/tlb.h> |
#include <arch/mm/tlb.h> |
#include <arch/interrupt.h> |
#include <interrupt.h> |
#include <mm/as.h> |
#include <arch.h> |
#include <print.h> |
#include <macros.h> |
#include <symtab.h> |
static unsigned int seed = 10; |
static unsigned int seed_real __attribute__ ((section("K_UNMAPPED_DATA_START"))) = 42; |
#define TLB_FLUSH \ |
"tlbie %0\n" \ |
"addi %0, %0, 0x1000\n" |
/** Try to find PTE for faulting address |
* |
* Try to find PTE for faulting address. |
75,7 → 65,7 |
* Check if the mapping exists in page tables. |
*/ |
pte_t *pte = page_mapping_find(as, badvaddr); |
if ((pte) && (pte->present)) { |
if ((pte) && (pte->p)) { |
/* |
* Mapping found in page tables. |
* Immediately succeed. |
97,7 → 87,7 |
*/ |
page_table_lock(as, lock); |
pte = page_mapping_find(as, badvaddr); |
ASSERT((pte) && (pte->present)); |
ASSERT((pte) && (pte->p)); |
*pfrc = 0; |
return pte; |
case AS_PF_DEFER: |
106,10 → 96,11 |
return NULL; |
case AS_PF_FAULT: |
page_table_lock(as, lock); |
printf("Page fault.\n"); |
*pfrc = rc; |
return NULL; |
default: |
panic("Unexpected rc (%d).", rc); |
panic("unexpected rc (%d)\n", rc); |
} |
} |
} |
117,20 → 108,21 |
static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate) |
{ |
char *symbol; |
char *sym2; |
char *symbol = ""; |
char *sym2 = ""; |
symbol = symtab_fmt_name_lookup(istate->pc); |
sym2 = symtab_fmt_name_lookup(istate->lr); |
fault_if_from_uspace(istate, |
"PHT Refill Exception on %p.", badvaddr); |
panic("%p: PHT Refill Exception at %p (%s<-%s).", badvaddr, |
char *s = get_symtab_entry(istate->pc); |
if (s) |
symbol = s; |
s = get_symtab_entry(istate->lr); |
if (s) |
sym2 = s; |
panic("%p: PHT Refill Exception at %p (%s<-%s)\n", badvaddr, |
istate->pc, symbol, sym2); |
} |
static void pht_insert(const uintptr_t vaddr, const pte_t *pte) |
static void pht_insert(const uintptr_t vaddr, const pfn_t pfn) |
{ |
uint32_t page = (vaddr >> 12) & 0xffff; |
uint32_t api = (vaddr >> 22) & 0x3f; |
156,12 → 148,11 |
uint32_t i; |
bool found = false; |
/* Find colliding PTE in PTEG */ |
/* Find unused or colliding |
PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if ((phte[base + i].v) |
&& (phte[base + i].vsid == vsid) |
&& (phte[base + i].api == api) |
&& (phte[base + i].h == 0)) { |
if ((!phte[base + i].v) || ((phte[base + i].vsid == vsid) && |
(phte[base + i].api == api))) { |
found = true; |
break; |
} |
168,25 → 159,86 |
} |
if (!found) { |
/* Find unused PTE in PTEG */ |
/* Secondary hash (not) */ |
uint32_t base2 = (~hash & 0x3ff) << 3; |
/* Find unused or colliding |
PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if (!phte[base + i].v) { |
if ((!phte[base2 + i].v) || |
((phte[base2 + i].vsid == vsid) && |
(phte[base2 + i].api == api))) { |
found = true; |
base = base2; |
h = 1; |
break; |
} |
} |
if (!found) { |
// TODO: A/C precedence groups |
i = page % 8; |
} |
} |
phte[base + i].v = 1; |
phte[base + i].vsid = vsid; |
phte[base + i].h = h; |
phte[base + i].api = api; |
phte[base + i].rpn = pfn; |
phte[base + i].r = 0; |
phte[base + i].c = 0; |
phte[base + i].pp = 2; // FIXME |
} |
static void pht_real_insert(const uintptr_t vaddr, const pfn_t pfn) |
{ |
uint32_t page = (vaddr >> 12) & 0xffff; |
uint32_t api = (vaddr >> 22) & 0x3f; |
uint32_t vsid; |
asm volatile ( |
"mfsrin %0, %1\n" |
: "=r" (vsid) |
: "r" (vaddr) |
); |
uint32_t sdr1; |
asm volatile ( |
"mfsdr1 %0\n" |
: "=r" (sdr1) |
); |
phte_t *phte_physical = (phte_t *) (sdr1 & 0xffff0000); |
/* Primary hash (xor) */ |
uint32_t h = 0; |
uint32_t hash = vsid ^ page; |
uint32_t base = (hash & 0x3ff) << 3; |
uint32_t i; |
bool found = false; |
/* Find unused or colliding |
PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if ((!phte_physical[base + i].v) || |
((phte_physical[base + i].vsid == vsid) && |
(phte_physical[base + i].api == api))) { |
found = true; |
break; |
} |
} |
if (!found) { |
/* Secondary hash (not) */ |
uint32_t base2 = (~hash & 0x3ff) << 3; |
/* Find colliding PTE in PTEG */ |
/* Find unused or colliding |
PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if ((phte[base2 + i].v) |
&& (phte[base2 + i].vsid == vsid) |
&& (phte[base2 + i].api == api) |
&& (phte[base2 + i].h == 1)) { |
if ((!phte_physical[base2 + i].v) || |
((phte_physical[base2 + i].vsid == vsid) && |
(phte_physical[base2 + i].api == api))) { |
found = true; |
base = base2; |
h = 1; |
195,37 → 247,26 |
} |
if (!found) { |
/* Find unused PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if (!phte[base2 + i].v) { |
found = true; |
base = base2; |
h = 1; |
break; |
} |
} |
// TODO: A/C precedence groups |
i = page % 8; |
} |
if (!found) |
i = RANDI(seed) % 8; |
} |
phte[base + i].v = 1; |
phte[base + i].vsid = vsid; |
phte[base + i].h = h; |
phte[base + i].api = api; |
phte[base + i].rpn = pte->pfn; |
phte[base + i].r = 0; |
phte[base + i].c = 0; |
phte[base + i].wimg = (pte->page_cache_disable ? WIMG_NO_CACHE : 0); |
phte[base + i].pp = 2; // FIXME |
phte_physical[base + i].v = 1; |
phte_physical[base + i].vsid = vsid; |
phte_physical[base + i].h = h; |
phte_physical[base + i].api = api; |
phte_physical[base + i].rpn = pfn; |
phte_physical[base + i].r = 0; |
phte_physical[base + i].c = 0; |
phte_physical[base + i].pp = 2; // FIXME |
} |
/** Process Instruction/Data Storage Exception |
/** Process Instruction/Data Storage Interrupt |
* |
* @param n Exception vector number. |
* @param istate Interrupted register context. |
* @param n Interrupt vector number. |
* @param istate Interrupted register context. |
* |
*/ |
void pht_refill(int n, istate_t *istate) |
244,9 → 285,12 |
lock = true; |
} |
if (n == VECTOR_DATA_STORAGE) |
badvaddr = istate->dar; |
else |
if (n == VECTOR_DATA_STORAGE) { |
asm volatile ( |
"mfdar %0\n" |
: "=r" (badvaddr) |
); |
} else |
badvaddr = istate->pc; |
page_table_lock(as, lock); |
266,12 → 310,12 |
page_table_unlock(as, lock); |
return; |
default: |
panic("Unexpected pfrc (%d).", pfrc); |
panic("Unexpected pfrc (%d)\n", pfrc); |
} |
} |
pte->accessed = 1; /* Record access to PTE */ |
pht_insert(badvaddr, pte); |
pte->a = 1; /* Record access to PTE */ |
pht_insert(badvaddr, pte->pfn); |
page_table_unlock(as, lock); |
return; |
282,19 → 326,22 |
} |
/** Process Instruction/Data Storage Exception in Real Mode |
/** Process Instruction/Data Storage Interrupt in Real Mode |
* |
* @param n Exception vector number. |
* @param istate Interrupted register context. |
* @param n Interrupt vector number. |
* @param istate Interrupted register context. |
* |
*/ |
bool pht_refill_real(int n, istate_t *istate) |
bool pht_real_refill(int n, istate_t *istate) |
{ |
uintptr_t badvaddr; |
if (n == VECTOR_DATA_STORAGE) |
badvaddr = istate->dar; |
else |
if (n == VECTOR_DATA_STORAGE) { |
asm volatile ( |
"mfdar %0\n" |
: "=r" (badvaddr) |
); |
} else |
badvaddr = istate->pc; |
uint32_t physmem; |
303,140 → 350,15 |
: "=r" (physmem) |
); |
if ((badvaddr < PA2KA(0)) || (badvaddr >= PA2KA(physmem))) |
return false; |
uint32_t page = (badvaddr >> 12) & 0xffff; |
uint32_t api = (badvaddr >> 22) & 0x3f; |
uint32_t vsid; |
asm volatile ( |
"mfsrin %0, %1\n" |
: "=r" (vsid) |
: "r" (badvaddr) |
); |
uint32_t sdr1; |
asm volatile ( |
"mfsdr1 %0\n" |
: "=r" (sdr1) |
); |
phte_t *phte_real = (phte_t *) (sdr1 & 0xffff0000); |
/* Primary hash (xor) */ |
uint32_t h = 0; |
uint32_t hash = vsid ^ page; |
uint32_t base = (hash & 0x3ff) << 3; |
uint32_t i; |
bool found = false; |
/* Find colliding PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if ((phte_real[base + i].v) |
&& (phte_real[base + i].vsid == vsid) |
&& (phte_real[base + i].api == api) |
&& (phte_real[base + i].h == 0)) { |
found = true; |
break; |
} |
if ((badvaddr >= PA2KA(0)) && (badvaddr < PA2KA(physmem))) { |
pht_real_insert(badvaddr, KA2PA(badvaddr) >> 12); |
return true; |
} |
if (!found) { |
/* Find unused PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if (!phte_real[base + i].v) { |
found = true; |
break; |
} |
} |
} |
if (!found) { |
/* Secondary hash (not) */ |
uint32_t base2 = (~hash & 0x3ff) << 3; |
/* Find colliding PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if ((phte_real[base2 + i].v) |
&& (phte_real[base2 + i].vsid == vsid) |
&& (phte_real[base2 + i].api == api) |
&& (phte_real[base2 + i].h == 1)) { |
found = true; |
base = base2; |
h = 1; |
break; |
} |
} |
if (!found) { |
/* Find unused PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if (!phte_real[base2 + i].v) { |
found = true; |
base = base2; |
h = 1; |
break; |
} |
} |
} |
if (!found) { |
/* Use secondary hash to avoid collisions |
with usual PHT refill handler. */ |
i = RANDI(seed_real) % 8; |
base = base2; |
h = 1; |
} |
} |
phte_real[base + i].v = 1; |
phte_real[base + i].vsid = vsid; |
phte_real[base + i].h = h; |
phte_real[base + i].api = api; |
phte_real[base + i].rpn = KA2PA(badvaddr) >> 12; |
phte_real[base + i].r = 0; |
phte_real[base + i].c = 0; |
phte_real[base + i].wimg = 0; |
phte_real[base + i].pp = 2; // FIXME |
return true; |
return false; |
} |
/** Process ITLB/DTLB Miss Exception in Real Mode |
* |
* |
*/ |
void tlb_refill_real(int n, uint32_t tlbmiss, ptehi_t ptehi, ptelo_t ptelo, istate_t *istate) |
{ |
uint32_t badvaddr = tlbmiss & 0xfffffffc; |
uint32_t physmem; |
asm volatile ( |
"mfsprg3 %0\n" |
: "=r" (physmem) |
); |
if ((badvaddr < PA2KA(0)) || (badvaddr >= PA2KA(physmem))) |
return; // FIXME |
ptelo.rpn = KA2PA(badvaddr) >> 12; |
ptelo.wimg = 0; |
ptelo.pp = 2; // FIXME |
uint32_t index = 0; |
asm volatile ( |
"mtspr 981, %0\n" |
"mtspr 982, %1\n" |
"tlbld %2\n" |
"tlbli %2\n" |
: "=r" (index) |
: "r" (ptehi), |
"r" (ptelo) |
); |
} |
void tlb_arch_init(void) |
{ |
tlb_invalidate_all(); |
445,87 → 367,9 |
void tlb_invalidate_all(void) |
{ |
uint32_t index; |
asm volatile ( |
"li %0, 0\n" |
"sync\n" |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
TLB_FLUSH |
"eieio\n" |
"tlbia\n" |
"tlbsync\n" |
"sync\n" |
: "=r" (index) |
); |
} |
549,7 → 393,7 |
} |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt) |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
{ |
// TODO |
tlb_invalidate_all(); |
594,7 → 438,7 |
: "=r" (vsid) |
: "r" (sr << 28) |
); |
printf("sr[%02u]: vsid=%.*p (asid=%u)%s%s\n", sr, |
printf("vsid[%d]: VSID=%.*p (ASID=%d)%s%s\n", sr, |
sizeof(vsid) * 2, vsid & 0xffffff, (vsid & 0xffffff) >> 4, |
((vsid >> 30) & 1) ? " supervisor" : "", |
((vsid >> 29) & 1) ? " user" : ""); |
/branches/arm/kernel/arch/ppc32/src/mm/page.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32mm |
/** @addtogroup ppc32mm |
* @{ |
*/ |
/** @file |
49,7 → 49,7 |
{ |
if (last_frame + ALIGN_UP(size, PAGE_SIZE) > |
KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) |
panic("Unable to map physical memory %p (%" PRIs " bytes).", |
panic("Unable to map physical memory %p (%" PRIs " bytes)", |
physaddr, size) |
uintptr_t virtaddr = PA2KA(last_frame); |
/branches/arm/kernel/arch/ppc32/src/mm/frame.c |
---|
57,7 → 57,7 |
void frame_arch_init(void) |
{ |
pfn_t minconf = 2; |
size_t i; |
count_t i; |
pfn_t start, conf; |
size_t size; |
74,7 → 74,7 |
if (last_frame < ALIGN_UP(bootinfo.memmap.zones[i].start + bootinfo.memmap.zones[i].size, FRAME_SIZE)) |
last_frame = ALIGN_UP(bootinfo.memmap.zones[i].start + bootinfo.memmap.zones[i].size, FRAME_SIZE); |
} |
/* First is exception vector, second is 'implementation specific', |
third and fourth is reserved, other contain real mode code */ |
frame_mark_unavailable(0, 8); |
/branches/arm/kernel/arch/ppc32/src/interrupt.c |
---|
60,6 → 60,7 |
int inum; |
while ((inum = pic_get_pending()) != -1) { |
bool ack = false; |
irq_t *irq = irq_dispatch_and_lock(inum); |
if (irq) { |
/* |
68,17 → 69,11 |
if (irq->preack) { |
/* Acknowledge the interrupt before processing */ |
if (irq->cir) |
irq->cir(irq->cir_arg, irq->inr); |
pic_ack_interrupt(inum); |
ack = true; |
} |
irq->handler(irq); |
if (!irq->preack) { |
if (irq->cir) |
irq->cir(irq->cir_arg, irq->inr); |
} |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
/* |
88,6 → 83,9 |
printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, inum); |
#endif |
} |
if (!ack) |
pic_ack_interrupt(inum); |
} |
} |
94,8 → 92,8 |
static void exception_decrementer(int n, istate_t *istate) |
{ |
clock(); |
start_decrementer(); |
clock(); |
} |
/branches/arm/kernel/arch/ppc32/src/ppc32.c |
---|
35,8 → 35,7 |
#include <config.h> |
#include <arch.h> |
#include <arch/boot/boot.h> |
#include <genarch/drivers/via-cuda/cuda.h> |
#include <genarch/kbrd/kbrd.h> |
#include <arch/drivers/cuda.h> |
#include <arch/interrupt.h> |
#include <genarch/fb/fb.h> |
#include <genarch/fb/visuals.h> |
43,29 → 42,24 |
#include <userspace.h> |
#include <proc/uarg.h> |
#include <console/console.h> |
#include <ddi/device.h> |
#include <ddi/irq.h> |
#include <arch/drivers/pic.h> |
#include <align.h> |
#include <macros.h> |
#include <string.h> |
#define IRQ_COUNT 64 |
#define IRQ_CUDA 10 |
#define IRQ_COUNT 64 |
bootinfo_t bootinfo; |
/** Performs ppc32-specific initialization before main_bsp() is called. */ |
void arch_pre_main(void) |
{ |
/* Setup usermode */ |
init.cnt = bootinfo.taskmap.count; |
uint32_t i; |
for (i = 0; i < min3(bootinfo.taskmap.count, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) { |
for (i = 0; i < bootinfo.taskmap.count; i++) { |
init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr); |
init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, |
bootinfo.taskmap.tasks[i].name); |
} |
} |
81,43 → 75,36 |
void arch_post_mm_init(void) |
{ |
if (config.cpu_active == 1) { |
#ifdef CONFIG_FB |
/* Initialize framebuffer */ |
if (bootinfo.screen.addr) { |
unsigned int visual; |
switch (bootinfo.screen.bpp) { |
case 8: |
visual = VISUAL_INDIRECT_8; |
break; |
case 16: |
visual = VISUAL_RGB_5_5_5; |
break; |
case 24: |
visual = VISUAL_RGB_8_8_8; |
break; |
case 32: |
visual = VISUAL_RGB_0_8_8_8; |
break; |
default: |
panic("Unsupported bits per pixel."); |
} |
fb_properties_t prop = { |
.addr = bootinfo.screen.addr, |
.offset = 0, |
.x = bootinfo.screen.width, |
.y = bootinfo.screen.height, |
.scan = bootinfo.screen.scanline, |
.visual = visual, |
}; |
fb_init(&prop); |
unsigned int visual; |
switch (bootinfo.screen.bpp) { |
case 8: |
visual = VISUAL_INDIRECT_8; |
break; |
case 16: |
visual = VISUAL_RGB_5_5_5; |
break; |
case 24: |
visual = VISUAL_RGB_8_8_8; |
break; |
case 32: |
visual = VISUAL_RGB_0_8_8_8; |
break; |
default: |
panic("Unsupported bits per pixel"); |
} |
#endif |
fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual); |
/* Initialize IRQ routing */ |
irq_init(IRQ_COUNT, IRQ_COUNT); |
/* Initialize PIC */ |
pic_init(bootinfo.keyboard.addr, PAGE_SIZE); |
/* Initialize I/O controller */ |
cuda_init(device_assign_devno(), bootinfo.keyboard.addr + 0x16000, 2 * PAGE_SIZE); |
/* Merge all zones to 1 big zone */ |
zone_merge_all(); |
} |
133,35 → 120,6 |
void arch_post_smp_init(void) |
{ |
if (bootinfo.macio.addr) { |
/* Initialize PIC */ |
cir_t cir; |
void *cir_arg; |
pic_init(bootinfo.macio.addr, PAGE_SIZE, &cir, &cir_arg); |
#ifdef CONFIG_MAC_KBD |
uintptr_t pa = bootinfo.macio.addr + 0x16000; |
uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE); |
size_t offset = pa - aligned_addr; |
size_t size = 2 * PAGE_SIZE; |
cuda_t *cuda = (cuda_t *) |
(hw_map(aligned_addr, offset + size) + offset); |
/* Initialize I/O controller */ |
cuda_instance_t *cuda_instance = |
cuda_init(cuda, IRQ_CUDA, cir, cir_arg); |
if (cuda_instance) { |
kbrd_instance_t *kbrd_instance = kbrd_init(); |
if (kbrd_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *kbrd = kbrd_wire(kbrd_instance, sink); |
cuda_wire(cuda_instance, kbrd); |
pic_enable_interrupt(IRQ_CUDA); |
} |
} |
#endif |
} |
} |
void calibrate_delay_loop(void) |
170,13 → 128,11 |
void userspace(uspace_arg_t *kernel_uarg) |
{ |
userspace_asm((uintptr_t) kernel_uarg->uspace_uarg, |
(uintptr_t) kernel_uarg->uspace_stack + |
THREAD_STACK_SIZE - SP_DELTA, |
(uintptr_t) kernel_uarg->uspace_entry); |
userspace_asm((uintptr_t) kernel_uarg->uspace_uarg, (uintptr_t) kernel_uarg->uspace_stack + THREAD_STACK_SIZE - SP_DELTA, (uintptr_t) kernel_uarg->uspace_entry); |
/* Unreachable */ |
while (true); |
for (;;) |
; |
} |
/** Acquire console back for kernel |
184,9 → 140,7 |
*/ |
void arch_grab_console(void) |
{ |
#ifdef CONFIG_FB |
fb_redraw(); |
#endif |
cuda_grab(); |
} |
/** Return console to userspace |
194,27 → 148,8 |
*/ |
void arch_release_console(void) |
{ |
cuda_release(); |
} |
/** Construct function pointer |
* |
* @param fptr function pointer structure |
* @param addr function address |
* @param caller calling function address |
* |
* @return address of the function pointer |
* |
*/ |
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
{ |
return addr; |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc32/src/drivers/cuda.c |
---|
0,0 → 1,355 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32 |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/drivers/cuda.h> |
#include <ipc/irq.h> |
#include <arch/asm.h> |
#include <console/console.h> |
#include <console/chardev.h> |
#include <arch/drivers/pic.h> |
#include <sysinfo/sysinfo.h> |
#include <interrupt.h> |
#include <stdarg.h> |
#define CUDA_IRQ 10 |
#define SPECIAL '?' |
#define PACKET_ADB 0x00 |
#define PACKET_CUDA 0x01 |
#define CUDA_POWERDOWN 0x0a |
#define CUDA_RESET 0x11 |
#define RS 0x200 |
#define B (0 * RS) |
#define A (1 * RS) |
#define SR (10 * RS) |
#define ACR (11 * RS) |
#define SR_OUT 0x10 |
#define TACK 0x10 |
#define TIP 0x20 |
static volatile uint8_t *cuda = NULL; |
static irq_t cuda_irq; /**< Cuda's IRQ. */ |
static char lchars[0x80] = { |
'a', |
's', |
'd', |
'f', |
'h', |
'g', |
'z', |
'x', |
'c', |
'v', |
SPECIAL, |
'b', |
'q', |
'w', |
'e', |
'r', |
'y', |
't', |
'1', |
'2', |
'3', |
'4', |
'6', |
'5', |
'=', |
'9', |
'7', |
'-', |
'8', |
'0', |
']', |
'o', |
'u', |
'[', |
'i', |
'p', |
'\n', /* Enter */ |
'l', |
'j', |
'\'', |
'k', |
';', |
'\\', |
',', |
'/', |
'n', |
'm', |
'.', |
'\t', /* Tab */ |
' ', |
'`', |
'\b', /* Backspace */ |
SPECIAL, |
SPECIAL, /* Escape */ |
SPECIAL, /* Ctrl */ |
SPECIAL, /* Alt */ |
SPECIAL, /* Shift */ |
SPECIAL, /* Caps-Lock */ |
SPECIAL, /* RAlt */ |
SPECIAL, /* Left */ |
SPECIAL, /* Right */ |
SPECIAL, /* Down */ |
SPECIAL, /* Up */ |
SPECIAL, |
SPECIAL, |
'.', /* Keypad . */ |
SPECIAL, |
'*', /* Keypad * */ |
SPECIAL, |
'+', /* Keypad + */ |
SPECIAL, |
SPECIAL, /* NumLock */ |
SPECIAL, |
SPECIAL, |
SPECIAL, |
'/', /* Keypad / */ |
'\n', /* Keypad Enter */ |
SPECIAL, |
'-', /* Keypad - */ |
SPECIAL, |
SPECIAL, |
SPECIAL, |
'0', /* Keypad 0 */ |
'1', /* Keypad 1 */ |
'2', /* Keypad 2 */ |
'3', /* Keypad 3 */ |
'4', /* Keypad 4 */ |
'5', /* Keypad 5 */ |
'6', /* Keypad 6 */ |
'7', /* Keypad 7 */ |
SPECIAL, |
'8', /* Keypad 8 */ |
'9', /* Keypad 9 */ |
SPECIAL, |
SPECIAL, |
SPECIAL, |
SPECIAL, /* F5 */ |
SPECIAL, /* F6 */ |
SPECIAL, /* F7 */ |
SPECIAL, /* F3 */ |
SPECIAL, /* F8 */ |
SPECIAL, /* F9 */ |
SPECIAL, |
SPECIAL, /* F11 */ |
SPECIAL, |
SPECIAL, /* F13 */ |
SPECIAL, |
SPECIAL, /* ScrollLock */ |
SPECIAL, |
SPECIAL, /* F10 */ |
SPECIAL, |
SPECIAL, /* F12 */ |
SPECIAL, |
SPECIAL, /* Pause */ |
SPECIAL, /* Insert */ |
SPECIAL, /* Home */ |
SPECIAL, /* PageUp */ |
SPECIAL, /* Delete */ |
SPECIAL, /* F4 */ |
SPECIAL, /* End */ |
SPECIAL, /* F2 */ |
SPECIAL, /* PageDown */ |
SPECIAL /* F1 */ |
}; |
static void receive_packet(uint8_t *kind, index_t count, uint8_t data[]) |
{ |
cuda[B] = cuda[B] & ~TIP; |
*kind = cuda[SR]; |
index_t i; |
for (i = 0; i < count; i++) |
data[i] = cuda[SR]; |
cuda[B] = cuda[B] | TIP; |
} |
/* Called from getc(). */ |
static void cuda_resume(chardev_t *d) |
{ |
} |
/* Called from getc(). */ |
static void cuda_suspend(chardev_t *d) |
{ |
} |
static char key_read(chardev_t *d) |
{ |
char ch; |
ch = 0; |
return ch; |
} |
static chardev_t kbrd; |
static chardev_operations_t ops = { |
.suspend = cuda_suspend, |
.resume = cuda_resume, |
.read = key_read |
}; |
int cuda_get_scancode(void) |
{ |
uint8_t kind; |
uint8_t data[4]; |
receive_packet(&kind, 4, data); |
if ((kind == PACKET_ADB) && (data[0] == 0x40) && (data[1] == 0x2c)) |
return data[2]; |
return -1; |
} |
static void cuda_irq_handler(irq_t *irq, void *arg, ...) |
{ |
if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) |
ipc_irq_send_notif(irq); |
else { |
int scan_code = cuda_get_scancode(); |
if (scan_code != -1) { |
uint8_t scancode = (uint8_t) scan_code; |
if ((scancode & 0x80) != 0x80) |
chardev_push_character(&kbrd, lchars[scancode & 0x7f]); |
} |
} |
} |
static irq_ownership_t cuda_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
/** Initialize keyboard and service interrupts using kernel routine */ |
void cuda_grab(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&cuda_irq.lock); |
cuda_irq.notif_cfg.notify = false; |
spinlock_unlock(&cuda_irq.lock); |
interrupts_restore(ipl); |
} |
/** Resume the former interrupt vector */ |
void cuda_release(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&cuda_irq.lock); |
if (cuda_irq.notif_cfg.answerbox) |
cuda_irq.notif_cfg.notify = true; |
spinlock_unlock(&cuda_irq.unlock); |
interrupts_restore(ipl); |
} |
void cuda_init(devno_t devno, uintptr_t base, size_t size) |
{ |
cuda = (uint8_t *) hw_map(base, size); |
chardev_initialize("cuda_kbd", &kbrd, &ops); |
stdin = &kbrd; |
irq_initialize(&cuda_irq); |
cuda_irq.devno = devno; |
cuda_irq.inr = CUDA_IRQ; |
cuda_irq.claim = cuda_claim; |
cuda_irq.handler = cuda_irq_handler; |
irq_register(&cuda_irq); |
pic_enable_interrupt(CUDA_IRQ); |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.devno", NULL, devno); |
sysinfo_set_item_val("kbd.inr", NULL, CUDA_IRQ); |
sysinfo_set_item_val("kbd.address.virtual", NULL, base); |
} |
static void send_packet(const uint8_t kind, count_t count, ...) |
{ |
index_t i; |
va_list va; |
cuda[B] = cuda[B] | TIP; |
cuda[ACR] = cuda[ACR] | SR_OUT; |
cuda[SR] = kind; |
cuda[B] = cuda[B] & ~TIP; |
va_start(va, count); |
for (i = 0; i < count; i++) { |
cuda[ACR] = cuda[ACR] | SR_OUT; |
cuda[SR] = va_arg(va, int); |
cuda[B] = cuda[B] | TACK; |
} |
va_end(va); |
cuda[B] = cuda[B] | TIP; |
} |
void cpu_halt(void) { |
asm volatile ( |
"b 0\n" |
); |
} |
void arch_reboot(void) { |
send_packet(PACKET_CUDA, 1, CUDA_RESET); |
asm volatile ( |
"b 0\n" |
); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc32/src/drivers/pic.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc32 |
/** @addtogroup ppc32 |
* @{ |
*/ |
/** @file |
38,61 → 38,53 |
#include <byteorder.h> |
#include <bitops.h> |
static volatile uint32_t *pic = NULL; |
static volatile uint32_t *pic; |
void pic_init(uintptr_t base, size_t size, cir_t *cir, void **cir_arg) |
void pic_init(uintptr_t base, size_t size) |
{ |
pic = (uint32_t *) hw_map(base, size); |
*cir = pic_ack_interrupt; |
*cir_arg = NULL; |
} |
void pic_enable_interrupt(inr_t intnum) |
void pic_enable_interrupt(int intnum) |
{ |
if (pic) { |
if (intnum < 32) |
pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] | (1 << intnum); |
else |
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum - 32)); |
if (intnum < 32) { |
pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] | (1 << intnum); |
} else { |
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum - 32)); |
} |
} |
void pic_disable_interrupt(inr_t intnum) |
void pic_disable_interrupt(int intnum) |
{ |
if (pic) { |
if (intnum < 32) |
pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] & (~(1 << intnum)); |
else |
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum - 32))); |
if (intnum < 32) { |
pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] & (~(1 << intnum)); |
} else { |
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum - 32))); |
} |
} |
void pic_ack_interrupt(void *arg, inr_t intnum) |
void pic_ack_interrupt(int intnum) |
{ |
if (pic) { |
if (intnum < 32) |
pic[PIC_ACK_LOW] = 1 << intnum; |
else |
pic[PIC_ACK_HIGH] = 1 << (intnum - 32); |
} |
if (intnum < 32) |
pic[PIC_ACK_LOW] = 1 << intnum; |
else |
pic[PIC_ACK_HIGH] = 1 << (intnum - 32); |
} |
/** Return number of pending interrupt */ |
int pic_get_pending(void) |
{ |
if (pic) { |
int pending; |
pending = pic[PIC_PENDING_LOW]; |
if (pending) |
return fnzb32(pending); |
pending = pic[PIC_PENDING_HIGH]; |
if (pending) |
return fnzb32(pending) + 32; |
} |
int pending; |
pending = pic[PIC_PENDING_LOW]; |
if (pending) |
return fnzb32(pending); |
pending = pic[PIC_PENDING_HIGH]; |
if (pending) |
return fnzb32(pending) + 32; |
return -1; |
} |
/branches/arm/kernel/arch/ppc32/src/exception.S |
---|
60,7 → 60,7 |
2: |
subi sp, sp, 164 |
subi sp, sp, 160 |
stw r0, 8(sp) |
stw r2, 12(sp) |
stw r3, 16(sp) |
109,14 → 109,11 |
mfxer r12 |
stw r12, 148(sp) |
mfdar r12 |
mfsprg1 r12 |
stw r12, 152(sp) |
mfsprg1 r12 |
mfsprg2 r12 |
stw r12, 156(sp) |
mfsprg2 r12 |
stw r12, 160(sp) |
.endm |
.org 0x100 |
140,7 → 137,16 |
exc_data_storage: |
CONTEXT_STORE |
b data_storage |
li r3, 2 |
mr r4, sp |
addi r4, r4, 8 |
bl pht_real_refill |
cmpwi r3, 0 |
bne iret_real |
li r3, 2 |
b jump_to_kernel |
.org 0x400 |
.global exc_instruction_storage |
147,8 → 153,17 |
exc_instruction_storage: |
CONTEXT_STORE |
b instruction_storage |
li r3, 3 |
mr r4, sp |
addi r4, r4, 8 |
bl pht_real_refill |
cmpwi r3, 0 |
bne iret_real |
li r3, 3 |
b jump_to_kernel |
.org 0x500 |
.global exc_external |
exc_external: |
208,7 → 223,7 |
.org 0xc00 |
.global exc_syscall |
exc_syscall: |
CONTEXT_STORE |
CONTEXT_STORE |
b jump_to_kernel_syscall |
220,63 → 235,7 |
li r3, 12 |
b jump_to_kernel |
.org 0x1000 |
.global exc_itlb_miss |
exc_itlb_miss: |
CONTEXT_STORE |
b tlb_miss |
.org 0x1100 |
.global exc_dtlb_miss_load |
exc_dtlb_miss_load: |
CONTEXT_STORE |
b tlb_miss |
.org 0x1200 |
.global exc_dtlb_miss_store |
exc_dtlb_miss_store: |
CONTEXT_STORE |
b tlb_miss |
.org 0x4000 |
data_storage: |
li r3, 2 |
mr r4, sp |
addi r4, r4, 8 |
bl pht_refill_real |
cmpwi r3, 0 |
bne iret_real |
li r3, 2 |
b jump_to_kernel |
instruction_storage: |
li r3, 3 |
mr r4, sp |
addi r4, r4, 8 |
bl pht_refill_real |
cmpwi r3, 0 |
bne iret_real |
li r3, 3 |
b jump_to_kernel |
tlb_miss: |
li r3, 16 |
mfspr r4, tlbmiss |
mfspr r5, ptehi |
mfspr r6, ptelo |
mr r7, sp |
addi r7, r7, 20 |
bl tlb_refill_real |
b iret_real |
jump_to_kernel: |
lis r12, iret@ha |
addi r12, r12, iret@l |
313,6 → 272,7 |
rfi |
iret_real: |
lwz r0, 8(sp) |
lwz r2, 12(sp) |
lwz r3, 16(sp) |
362,7 → 322,7 |
lwz r12, 148(sp) |
mtxer r12 |
lwz r12, 156(sp) |
lwz sp, 160(sp) |
lwz r12, 152(sp) |
lwz sp, 156(sp) |
rfi |
/branches/arm/kernel/arch/ppc32/src/boot/boot.S |
---|
33,7 → 33,7 |
.global kernel_image_start |
kernel_image_start: |
# load temporal kernel stack |
lis sp, kernel_stack@ha |
52,7 → 52,7 |
beq bootinfo_end |
addis r3, r3, 0x8000 |
lis r31, bootinfo@ha |
addi r31, r31, bootinfo@l # r31 = bootinfo |
/branches/arm/kernel/arch/ppc32/src/dummy.s |
---|
30,7 → 30,6 |
.global asm_delay_loop |
.global sys_tls_set |
.global cpu_halt |
sys_tls_set: |
b sys_tls_set |
37,6 → 36,3 |
asm_delay_loop: |
blr |
cpu_halt: |
b cpu_halt |
/branches/arm/kernel/arch/ppc32/_link.ld.in |
---|
1,11 → 1,11 |
/** PPC32 linker script |
* |
* umapped section: |
* kernel text |
* kernel data |
* kernel text |
* kernel data |
* mapped section: |
* kernel text |
* kernel data |
* kernel text |
* kernel data |
* |
*/ |
27,7 → 27,7 |
unmapped_kdata_start = .; |
} |
.mapped PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) { |
.mapped PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) { |
ktext_start = .; |
*(K_TEXT_START); |
*(.text); |
37,22 → 37,22 |
*(K_DATA_START); |
*(.rodata); |
*(.rodata.*); |
*(.data); /* initialized data */ |
*(.data); /* initialized data */ |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
hardcoded_ktext_size = .; |
LONG(ktext_end - ktext_start); |
LONG(ktext_end - ktext_start); |
hardcoded_kdata_size = .; |
LONG(kdata_end - kdata_start); |
hardcoded_load_address = .; |
LONG(PA2KA(BOOT_OFFSET)); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
symbol_table = .; |
*(symtab.*); /* Symbol table, must be LAST symbol!*/ |
*(symtab.*); /* Symbol table, must be LAST symbol!*/ |
kdata_end = .; |
} |
} |
/branches/arm/kernel/arch/mips32/src/mm/tlb.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32mm |
/** @addtogroup mips32mm |
* @{ |
*/ |
/** @file |
40,12 → 40,12 |
#include <arch/cp0.h> |
#include <panic.h> |
#include <arch.h> |
#include <synch/mutex.h> |
#include <symtab.h> |
#include <synch/spinlock.h> |
#include <print.h> |
#include <debug.h> |
#include <align.h> |
#include <interrupt.h> |
#include <symtab.h> |
static void tlb_refill_fail(istate_t *); |
static void tlb_invalid_fail(istate_t *); |
92,15 → 92,15 |
uintptr_t badvaddr; |
pte_t *pte; |
int pfrc; |
badvaddr = cp0_badvaddr_read(); |
mutex_lock(&AS->lock); |
spinlock_lock(&AS->lock); |
asid = AS->asid; |
mutex_unlock(&AS->lock); |
spinlock_unlock(&AS->lock); |
page_table_lock(AS, true); |
pte = find_mapping_and_check(badvaddr, PF_ACCESS_READ, istate, &pfrc); |
if (!pte) { |
switch (pfrc) { |
115,7 → 115,7 |
page_table_unlock(AS, true); |
return; |
default: |
panic("Unexpected pfrc (%d).", pfrc); |
panic("unexpected pfrc (%d)\n", pfrc); |
} |
} |
199,7 → 199,7 |
page_table_unlock(AS, true); |
return; |
default: |
panic("Unexpected pfrc (%d).", pfrc); |
panic("unexpected pfrc (%d)\n", pfrc); |
} |
} |
282,7 → 282,7 |
page_table_unlock(AS, true); |
return; |
default: |
panic("Unexpected pfrc (%d).", pfrc); |
panic("unexpected pfrc (%d)\n", pfrc); |
} |
} |
320,14 → 320,19 |
void tlb_refill_fail(istate_t *istate) |
{ |
char *symbol, *sym2; |
char *symbol = ""; |
char *sym2 = ""; |
symbol = symtab_fmt_name_lookup(istate->epc); |
sym2 = symtab_fmt_name_lookup(istate->ra); |
fault_if_from_uspace(istate, "TLB Refill Exception on %p.", |
char *s = get_symtab_entry(istate->epc); |
if (s) |
symbol = s; |
s = get_symtab_entry(istate->ra); |
if (s) |
sym2 = s; |
fault_if_from_uspace(istate, "TLB Refill Exception on %p", |
cp0_badvaddr_read()); |
panic("%x: TLB Refill Exception at %x (%s<-%s).", cp0_badvaddr_read(), |
panic("%x: TLB Refill Exception at %x(%s<-%s)\n", cp0_badvaddr_read(), |
istate->epc, symbol, sym2); |
} |
334,25 → 339,27 |
void tlb_invalid_fail(istate_t *istate) |
{ |
char *symbol; |
char *symbol = ""; |
symbol = symtab_fmt_name_lookup(istate->epc); |
fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", |
char *s = get_symtab_entry(istate->epc); |
if (s) |
symbol = s; |
fault_if_from_uspace(istate, "TLB Invalid Exception on %p", |
cp0_badvaddr_read()); |
panic("%x: TLB Invalid Exception at %x (%s).", cp0_badvaddr_read(), |
panic("%x: TLB Invalid Exception at %x(%s)\n", cp0_badvaddr_read(), |
istate->epc, symbol); |
} |
void tlb_modified_fail(istate_t *istate) |
{ |
char *symbol; |
char *symbol = ""; |
symbol = symtab_fmt_name_lookup(istate->epc); |
fault_if_from_uspace(istate, "TLB Modified Exception on %p.", |
char *s = get_symtab_entry(istate->epc); |
if (s) |
symbol = s; |
fault_if_from_uspace(istate, "TLB Modified Exception on %p", |
cp0_badvaddr_read()); |
panic("%x: TLB Modified Exception at %x (%s).", cp0_badvaddr_read(), |
panic("%x: TLB Modified Exception at %x(%s)\n", cp0_badvaddr_read(), |
istate->epc, symbol); |
} |
422,11 → 429,12 |
break; |
case AS_PF_FAULT: |
page_table_lock(AS, true); |
printf("Page fault.\n"); |
*pfrc = AS_PF_FAULT; |
return NULL; |
break; |
default: |
panic("Unexpected rc (%d).", rc); |
panic("unexpected rc (%d)\n", rc); |
} |
} |
560,7 → 568,7 |
* @param page First page whose TLB entry is to be invalidated. |
* @param cnt Number of entries to invalidate. |
*/ |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt) |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
{ |
unsigned int i; |
ipl_t ipl; |
/branches/arm/kernel/arch/mips32/src/mm/frame.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32mm |
/** @addtogroup mips32mm |
* @{ |
*/ |
/** @file |
40,22 → 40,22 |
#include <mm/asid.h> |
#include <config.h> |
#include <arch/drivers/msim.h> |
#include <arch/drivers/serial.h> |
#include <print.h> |
#define ZERO_PAGE_MASK TLB_PAGE_MASK_256K |
#define ZERO_FRAMES 2048 |
#define ZERO_PAGE_WIDTH 18 /* 256K */ |
#define ZERO_PAGE_SIZE (1 << ZERO_PAGE_WIDTH) |
#define ZERO_PAGE_ASID ASID_INVALID |
#define ZERO_PAGE_TLBI 0 |
#define ZERO_PAGE_ADDR 0 |
#define ZERO_PAGE_OFFSET (ZERO_PAGE_SIZE / sizeof(uint32_t) - 1) |
#define ZERO_PAGE_VALUE (((volatile uint32_t *) ZERO_PAGE_ADDR)[ZERO_PAGE_OFFSET]) |
#define ZERO_PAGE_MASK TLB_PAGE_MASK_256K |
#define ZERO_FRAMES 2048 |
#define ZERO_PAGE_WIDTH 18 /* 256K */ |
#define ZERO_PAGE_SIZE (1 << ZERO_PAGE_WIDTH) |
#define ZERO_PAGE_ASID ASID_INVALID |
#define ZERO_PAGE_TLBI 0 |
#define ZERO_PAGE_ADDR 0 |
#define ZERO_PAGE_OFFSET (ZERO_PAGE_SIZE / sizeof(uint32_t) - 1) |
#define ZERO_PAGE_VALUE (((volatile uint32_t *) ZERO_PAGE_ADDR)[ZERO_PAGE_OFFSET]) |
#define ZERO_PAGE_VALUE_KSEG1(frame) \ |
(((volatile uint32_t *) (0xa0000000 + (frame << ZERO_PAGE_WIDTH)))[ZERO_PAGE_OFFSET]) |
#define ZERO_PAGE_VALUE_KSEG1(frame) (((volatile uint32_t *) (0xa0000000 + (frame << ZERO_PAGE_WIDTH)))[ZERO_PAGE_OFFSET]) |
#define MAX_REGIONS 32 |
#define MAX_REGIONS 32 |
typedef struct { |
pfn_t start; |
62,9 → 62,10 |
pfn_t count; |
} phys_region_t; |
static size_t phys_regions_count = 0; |
static count_t phys_regions_count = 0; |
static phys_region_t phys_regions[MAX_REGIONS]; |
/** Check whether frame is available |
* |
* Returns true if given frame is generally available for use. |
74,7 → 75,7 |
*/ |
static bool frame_available(pfn_t frame) |
{ |
#ifdef MACHINE_msim |
#if MACHINE == msim |
/* MSIM device (dprinter) */ |
if (frame == (KA2PA(MSIM_VIDEORAM) >> ZERO_PAGE_WIDTH)) |
return false; |
83,8 → 84,14 |
if (frame == (KA2PA(MSIM_KBD_ADDRESS) >> ZERO_PAGE_WIDTH)) |
return false; |
#endif |
#if defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul) |
#if MACHINE == simics |
/* Simics device (serial line) */ |
if (frame == (KA2PA(SERIAL_ADDRESS) >> ZERO_PAGE_WIDTH)) |
return false; |
#endif |
#if (MACHINE == lgxemul) || (MACHINE == bgxemul) |
/* gxemul devices */ |
if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE, |
0x10000000, MB2SIZE(256))) |
119,7 → 126,7 |
/* Init tasks */ |
bool safe = true; |
size_t i; |
count_t i; |
for (i = 0; i < init.cnt; i++) |
if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE, |
KA2PA(init.tasks[i].addr), init.tasks[i].size)) { |
174,7 → 181,7 |
cp0_entry_lo1_write(0); |
cp0_entry_hi_write(0); |
size_t i; |
count_t i; |
for (i = 0; i < TLB_ENTRY_COUNT; i++) { |
cp0_index_write(i); |
tlbwi(); |
211,7 → 218,7 |
ZERO_PAGE_VALUE = 0xdeadbeef; |
if (ZERO_PAGE_VALUE != 0xdeadbeef) |
avail = false; |
#if defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul) |
#if (MACHINE == lgxemul) || (MACHINE == bgxemul) |
else { |
ZERO_PAGE_VALUE_KSEG1(frame) = 0xaabbccdd; |
if (ZERO_PAGE_VALUE_KSEG1(frame) != 0xaabbccdd) |
251,7 → 258,7 |
printf("Base Size\n"); |
printf("---------- ----------\n"); |
size_t i; |
count_t i; |
for (i = 0; i < phys_regions_count; i++) { |
printf("%#010x %10u\n", |
PFN2ADDR(phys_regions[i].start), PFN2ADDR(phys_regions[i].count)); |
/branches/arm/kernel/arch/mips32/src/mm/page.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32mm |
/** @addtogroup mips32mm |
* @{ |
*/ |
/** @file |
35,7 → 35,6 |
#include <arch/mm/page.h> |
#include <genarch/mm/page_pt.h> |
#include <mm/page.h> |
#include <mm/frame.h> |
void page_arch_init(void) |
{ |
/branches/arm/kernel/arch/mips32/src/asm.S |
---|
27,17 → 27,17 |
# |
#include <arch/asm/regname.h> |
.text |
.macro cp0_read reg |
mfc0 $2, \reg |
mfc0 $2,\reg |
j $31 |
nop |
.endm |
.macro cp0_write reg |
mtc0 $4, \reg |
mtc0 $4,\reg |
j $31 |
nop |
.endm |
46,11 → 46,6 |
.set noreorder |
.set nomacro |
.global asm_delay_loop |
asm_delay_loop: |
j $31 |
nop |
.global cpu_halt |
cpu_halt: |
j cpu_halt |
63,12 → 58,6 |
nop |
.global memsetw |
memsetw: |
j _memsetw |
nop |
.global memcpy |
.global memcpy_from_uspace |
.global memcpy_to_uspace |
77,238 → 66,235 |
memcpy: |
memcpy_from_uspace: |
memcpy_to_uspace: |
move $t2, $a0 # save dst |
addiu $v0, $a1, 3 |
li $v1, -4 # 0xfffffffffffffffc |
and $v0, $v0, $v1 |
beq $a1, $v0, 3f |
move $t0, $a0 |
0: |
beq $a2, $zero, 2f |
move $a3, $zero |
1: |
addu $v0, $a1, $a3 |
lbu $a0, 0($v0) |
addu $v1, $t0, $a3 |
addiu $a3, $a3, 1 |
bne $a3, $a2, 1b |
sb $a0, 0($v1) |
2: |
jr $ra |
move $v0, $t2 |
3: |
addiu $v0, $a0, 3 |
and $v0, $v0, $v1 |
bne $a0, $v0, 0b |
srl $t1, $a2, 2 |
beq $t1, $zero, 5f |
move $a3, $zero |
move $a3, $zero |
move $a0, $zero |
4: |
addu $v0, $a1, $a0 |
lw $v1, 0($v0) |
addiu $a3, $a3, 1 |
addu $v0, $t0, $a0 |
sw $v1, 0($v0) |
bne $a3, $t1, 4b |
addiu $a0, $a0, 4 |
5: |
andi $a2, $a2, 0x3 |
beq $a2, $zero, 2b |
nop |
sll $v0, $a3, 2 |
addu $t1, $v0, $t0 |
move $a3, $zero |
addu $t0, $v0, $a1 |
6: |
addu $v0, $t0, $a3 |
lbu $a0, 0($v0) |
addu $v1, $t1, $a3 |
addiu $a3, $a3, 1 |
bne $a3, $a2, 6b |
sb $a0, 0($v1) |
jr $ra |
move $v0, $t2 |
addiu $v0,$a1,3 |
li $v1,-4 # 0xfffffffffffffffc |
and $v0,$v0,$v1 |
beq $a1,$v0,3f |
move $t0,$a0 |
move $t2,$a0 # save dst |
0: |
beq $a2,$zero,2f |
move $a3,$zero |
1: |
addu $v0,$a1,$a3 |
lbu $a0,0($v0) |
addu $v1,$t0,$a3 |
addiu $a3,$a3,1 |
bne $a3,$a2,1b |
sb $a0,0($v1) |
2: |
jr $ra |
move $v0,$t2 |
3: |
addiu $v0,$a0,3 |
and $v0,$v0,$v1 |
bne $a0,$v0,0b |
srl $t1,$a2,2 |
beq $t1,$zero,5f |
move $a3,$zero |
move $a3,$zero |
move $a0,$zero |
4: |
addu $v0,$a1,$a0 |
lw $v1,0($v0) |
addiu $a3,$a3,1 |
addu $v0,$t0,$a0 |
sw $v1,0($v0) |
bne $a3,$t1,4b |
addiu $a0,$a0,4 |
5: |
andi $a2,$a2,0x3 |
beq $a2,$zero,2b |
nop |
sll $v0,$a3,2 |
addu $t1,$v0,$t0 |
move $a3,$zero |
addu $t0,$v0,$a1 |
6: |
addu $v0,$t0,$a3 |
lbu $a0,0($v0) |
addu $v1,$t1,$a3 |
addiu $a3,$a3,1 |
bne $a3,$a2,6b |
sb $a0,0($v1) |
jr $ra |
move $v0,$t2 |
memcpy_from_uspace_failover_address: |
memcpy_to_uspace_failover_address: |
jr $ra |
move $v0, $zero |
jr $ra |
move $v0, $zero |
.macro fpu_gp_save reg ctx |
mfc1 $t0, $\reg |
sw $t0, \reg * 4(\ctx) |
mfc1 $t0,$\reg |
sw $t0, \reg*4(\ctx) |
.endm |
.macro fpu_gp_restore reg ctx |
lw $t0, \reg * 4(\ctx) |
mtc1 $t0, $\reg |
lw $t0, \reg*4(\ctx) |
mtc1 $t0,$\reg |
.endm |
.macro fpu_ct_save reg ctx |
cfc1 $t0, $1 |
sw $t0, (\reg + 32) * 4(\ctx) |
cfc1 $t0,$1 |
sw $t0, (\reg+32)*4(\ctx) |
.endm |
.macro fpu_ct_restore reg ctx |
lw $t0, (\reg + 32) * 4(\ctx) |
ctc1 $t0, $\reg |
lw $t0, (\reg+32)*4(\ctx) |
ctc1 $t0,$\reg |
.endm |
.global fpu_context_save |
fpu_context_save: |
#ifdef CONFIG_FPU |
fpu_gp_save 0, $a0 |
fpu_gp_save 1, $a0 |
fpu_gp_save 2, $a0 |
fpu_gp_save 3, $a0 |
fpu_gp_save 4, $a0 |
fpu_gp_save 5, $a0 |
fpu_gp_save 6, $a0 |
fpu_gp_save 7, $a0 |
fpu_gp_save 8, $a0 |
fpu_gp_save 9, $a0 |
fpu_gp_save 10, $a0 |
fpu_gp_save 11, $a0 |
fpu_gp_save 12, $a0 |
fpu_gp_save 13, $a0 |
fpu_gp_save 14, $a0 |
fpu_gp_save 15, $a0 |
fpu_gp_save 16, $a0 |
fpu_gp_save 17, $a0 |
fpu_gp_save 18, $a0 |
fpu_gp_save 19, $a0 |
fpu_gp_save 20, $a0 |
fpu_gp_save 21, $a0 |
fpu_gp_save 22, $a0 |
fpu_gp_save 23, $a0 |
fpu_gp_save 24, $a0 |
fpu_gp_save 25, $a0 |
fpu_gp_save 26, $a0 |
fpu_gp_save 27, $a0 |
fpu_gp_save 28, $a0 |
fpu_gp_save 29, $a0 |
fpu_gp_save 30, $a0 |
fpu_gp_save 31, $a0 |
fpu_ct_save 1, $a0 |
fpu_ct_save 2, $a0 |
fpu_ct_save 3, $a0 |
fpu_ct_save 4, $a0 |
fpu_ct_save 5, $a0 |
fpu_ct_save 6, $a0 |
fpu_ct_save 7, $a0 |
fpu_ct_save 8, $a0 |
fpu_ct_save 9, $a0 |
fpu_ct_save 10, $a0 |
fpu_ct_save 11, $a0 |
fpu_ct_save 12, $a0 |
fpu_ct_save 13, $a0 |
fpu_ct_save 14, $a0 |
fpu_ct_save 15, $a0 |
fpu_ct_save 16, $a0 |
fpu_ct_save 17, $a0 |
fpu_ct_save 18, $a0 |
fpu_ct_save 19, $a0 |
fpu_ct_save 20, $a0 |
fpu_ct_save 21, $a0 |
fpu_ct_save 22, $a0 |
fpu_ct_save 23, $a0 |
fpu_ct_save 24, $a0 |
fpu_ct_save 25, $a0 |
fpu_ct_save 26, $a0 |
fpu_ct_save 27, $a0 |
fpu_ct_save 28, $a0 |
fpu_ct_save 29, $a0 |
fpu_ct_save 30, $a0 |
fpu_ct_save 31, $a0 |
#endif |
#ifdef ARCH_HAS_FPU |
fpu_gp_save 0,$a0 |
fpu_gp_save 1,$a0 |
fpu_gp_save 2,$a0 |
fpu_gp_save 3,$a0 |
fpu_gp_save 4,$a0 |
fpu_gp_save 5,$a0 |
fpu_gp_save 6,$a0 |
fpu_gp_save 7,$a0 |
fpu_gp_save 8,$a0 |
fpu_gp_save 9,$a0 |
fpu_gp_save 10,$a0 |
fpu_gp_save 11,$a0 |
fpu_gp_save 12,$a0 |
fpu_gp_save 13,$a0 |
fpu_gp_save 14,$a0 |
fpu_gp_save 15,$a0 |
fpu_gp_save 16,$a0 |
fpu_gp_save 17,$a0 |
fpu_gp_save 18,$a0 |
fpu_gp_save 19,$a0 |
fpu_gp_save 20,$a0 |
fpu_gp_save 21,$a0 |
fpu_gp_save 22,$a0 |
fpu_gp_save 23,$a0 |
fpu_gp_save 24,$a0 |
fpu_gp_save 25,$a0 |
fpu_gp_save 26,$a0 |
fpu_gp_save 27,$a0 |
fpu_gp_save 28,$a0 |
fpu_gp_save 29,$a0 |
fpu_gp_save 30,$a0 |
fpu_gp_save 31,$a0 |
fpu_ct_save 1,$a0 |
fpu_ct_save 2,$a0 |
fpu_ct_save 3,$a0 |
fpu_ct_save 4,$a0 |
fpu_ct_save 5,$a0 |
fpu_ct_save 6,$a0 |
fpu_ct_save 7,$a0 |
fpu_ct_save 8,$a0 |
fpu_ct_save 9,$a0 |
fpu_ct_save 10,$a0 |
fpu_ct_save 11,$a0 |
fpu_ct_save 12,$a0 |
fpu_ct_save 13,$a0 |
fpu_ct_save 14,$a0 |
fpu_ct_save 15,$a0 |
fpu_ct_save 16,$a0 |
fpu_ct_save 17,$a0 |
fpu_ct_save 18,$a0 |
fpu_ct_save 19,$a0 |
fpu_ct_save 20,$a0 |
fpu_ct_save 21,$a0 |
fpu_ct_save 22,$a0 |
fpu_ct_save 23,$a0 |
fpu_ct_save 24,$a0 |
fpu_ct_save 25,$a0 |
fpu_ct_save 26,$a0 |
fpu_ct_save 27,$a0 |
fpu_ct_save 28,$a0 |
fpu_ct_save 29,$a0 |
fpu_ct_save 30,$a0 |
fpu_ct_save 31,$a0 |
#endif |
j $ra |
nop |
.global fpu_context_restore |
fpu_context_restore: |
#ifdef CONFIG_FPU |
fpu_gp_restore 0, $a0 |
fpu_gp_restore 1, $a0 |
fpu_gp_restore 2, $a0 |
fpu_gp_restore 3, $a0 |
fpu_gp_restore 4, $a0 |
fpu_gp_restore 5, $a0 |
fpu_gp_restore 6, $a0 |
fpu_gp_restore 7, $a0 |
fpu_gp_restore 8, $a0 |
fpu_gp_restore 9, $a0 |
fpu_gp_restore 10, $a0 |
fpu_gp_restore 11, $a0 |
fpu_gp_restore 12, $a0 |
fpu_gp_restore 13, $a0 |
fpu_gp_restore 14, $a0 |
fpu_gp_restore 15, $a0 |
fpu_gp_restore 16, $a0 |
fpu_gp_restore 17, $a0 |
fpu_gp_restore 18, $a0 |
fpu_gp_restore 19, $a0 |
fpu_gp_restore 20, $a0 |
fpu_gp_restore 21, $a0 |
fpu_gp_restore 22, $a0 |
fpu_gp_restore 23, $a0 |
fpu_gp_restore 24, $a0 |
fpu_gp_restore 25, $a0 |
fpu_gp_restore 26, $a0 |
fpu_gp_restore 27, $a0 |
fpu_gp_restore 28, $a0 |
fpu_gp_restore 29, $a0 |
fpu_gp_restore 30, $a0 |
fpu_gp_restore 31, $a0 |
fpu_ct_restore 1, $a0 |
fpu_ct_restore 2, $a0 |
fpu_ct_restore 3, $a0 |
fpu_ct_restore 4, $a0 |
fpu_ct_restore 5, $a0 |
fpu_ct_restore 6, $a0 |
fpu_ct_restore 7, $a0 |
fpu_ct_restore 8, $a0 |
fpu_ct_restore 9, $a0 |
fpu_ct_restore 10, $a0 |
fpu_ct_restore 11, $a0 |
fpu_ct_restore 12, $a0 |
fpu_ct_restore 13, $a0 |
fpu_ct_restore 14, $a0 |
fpu_ct_restore 15, $a0 |
fpu_ct_restore 16, $a0 |
fpu_ct_restore 17, $a0 |
fpu_ct_restore 18, $a0 |
fpu_ct_restore 19, $a0 |
fpu_ct_restore 20, $a0 |
fpu_ct_restore 21, $a0 |
fpu_ct_restore 22, $a0 |
fpu_ct_restore 23, $a0 |
fpu_ct_restore 24, $a0 |
fpu_ct_restore 25, $a0 |
fpu_ct_restore 26, $a0 |
fpu_ct_restore 27, $a0 |
fpu_ct_restore 28, $a0 |
fpu_ct_restore 29, $a0 |
fpu_ct_restore 30, $a0 |
fpu_ct_restore 31, $a0 |
#endif |
#ifdef ARCH_HAS_FPU |
fpu_gp_restore 0,$a0 |
fpu_gp_restore 1,$a0 |
fpu_gp_restore 2,$a0 |
fpu_gp_restore 3,$a0 |
fpu_gp_restore 4,$a0 |
fpu_gp_restore 5,$a0 |
fpu_gp_restore 6,$a0 |
fpu_gp_restore 7,$a0 |
fpu_gp_restore 8,$a0 |
fpu_gp_restore 9,$a0 |
fpu_gp_restore 10,$a0 |
fpu_gp_restore 11,$a0 |
fpu_gp_restore 12,$a0 |
fpu_gp_restore 13,$a0 |
fpu_gp_restore 14,$a0 |
fpu_gp_restore 15,$a0 |
fpu_gp_restore 16,$a0 |
fpu_gp_restore 17,$a0 |
fpu_gp_restore 18,$a0 |
fpu_gp_restore 19,$a0 |
fpu_gp_restore 20,$a0 |
fpu_gp_restore 21,$a0 |
fpu_gp_restore 22,$a0 |
fpu_gp_restore 23,$a0 |
fpu_gp_restore 24,$a0 |
fpu_gp_restore 25,$a0 |
fpu_gp_restore 26,$a0 |
fpu_gp_restore 27,$a0 |
fpu_gp_restore 28,$a0 |
fpu_gp_restore 29,$a0 |
fpu_gp_restore 30,$a0 |
fpu_gp_restore 31,$a0 |
fpu_ct_restore 1,$a0 |
fpu_ct_restore 2,$a0 |
fpu_ct_restore 3,$a0 |
fpu_ct_restore 4,$a0 |
fpu_ct_restore 5,$a0 |
fpu_ct_restore 6,$a0 |
fpu_ct_restore 7,$a0 |
fpu_ct_restore 8,$a0 |
fpu_ct_restore 9,$a0 |
fpu_ct_restore 10,$a0 |
fpu_ct_restore 11,$a0 |
fpu_ct_restore 12,$a0 |
fpu_ct_restore 13,$a0 |
fpu_ct_restore 14,$a0 |
fpu_ct_restore 15,$a0 |
fpu_ct_restore 16,$a0 |
fpu_ct_restore 17,$a0 |
fpu_ct_restore 18,$a0 |
fpu_ct_restore 19,$a0 |
fpu_ct_restore 20,$a0 |
fpu_ct_restore 21,$a0 |
fpu_ct_restore 22,$a0 |
fpu_ct_restore 23,$a0 |
fpu_ct_restore 24,$a0 |
fpu_ct_restore 25,$a0 |
fpu_ct_restore 26,$a0 |
fpu_ct_restore 27,$a0 |
fpu_ct_restore 28,$a0 |
fpu_ct_restore 29,$a0 |
fpu_ct_restore 30,$a0 |
fpu_ct_restore 31,$a0 |
#endif |
j $ra |
nop |
/branches/arm/kernel/arch/mips32/src/drivers/msim.c |
---|
0,0 → 1,171 |
/* |
* Copyright (c) 2005 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
*/ |
#include <interrupt.h> |
#include <ipc/irq.h> |
#include <console/chardev.h> |
#include <arch/drivers/msim.h> |
#include <arch/cp0.h> |
#include <console/console.h> |
#include <sysinfo/sysinfo.h> |
#include <ddi/ddi.h> |
static parea_t msim_parea; |
static chardev_t console; |
static irq_t msim_irq; |
static void msim_write(chardev_t *dev, const char ch); |
static void msim_enable(chardev_t *dev); |
static void msim_disable(chardev_t *dev); |
static char msim_do_read(chardev_t *dev); |
static chardev_operations_t msim_ops = { |
.resume = msim_enable, |
.suspend = msim_disable, |
.write = msim_write, |
.read = msim_do_read, |
}; |
/** Putchar that works with MSIM & gxemul */ |
void msim_write(chardev_t *dev, const char ch) |
{ |
*((char *) MSIM_VIDEORAM) = ch; |
} |
/* Called from getc(). */ |
void msim_enable(chardev_t *dev) |
{ |
cp0_unmask_int(MSIM_KBD_IRQ); |
} |
/* Called from getc(). */ |
void msim_disable(chardev_t *dev) |
{ |
cp0_mask_int(MSIM_KBD_IRQ); |
} |
#include <print.h> |
/** Read character using polling, assume interrupts disabled */ |
static char msim_do_read(chardev_t *dev) |
{ |
char ch; |
while (1) { |
ch = *((volatile char *) MSIM_KBD_ADDRESS); |
if (ch) { |
if (ch == '\r') |
return '\n'; |
if (ch == 0x7f) |
return '\b'; |
return ch; |
} |
} |
} |
/** Process keyboard interrupt. */ |
static void msim_irq_handler(irq_t *irq, void *arg, ...) |
{ |
if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) |
ipc_irq_send_notif(irq); |
else { |
char ch = 0; |
ch = *((char *) MSIM_KBD_ADDRESS); |
if (ch =='\r') |
ch = '\n'; |
if (ch == 0x7f) |
ch = '\b'; |
chardev_push_character(&console, ch); |
} |
} |
static irq_ownership_t msim_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
void msim_kbd_grab(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&msim_irq.lock); |
msim_irq.notif_cfg.notify = false; |
spinlock_unlock(&msim_irq.lock); |
interrupts_restore(ipl); |
} |
void msim_kbd_release(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&msim_irq.lock); |
if (msim_irq.notif_cfg.answerbox) |
msim_irq.notif_cfg.notify = true; |
spinlock_unlock(&msim_irq.lock); |
interrupts_restore(ipl); |
} |
/* Return console object representing msim console */ |
void msim_console(devno_t devno) |
{ |
chardev_initialize("msim_console", &console, &msim_ops); |
stdin = &console; |
stdout = &console; |
irq_initialize(&msim_irq); |
msim_irq.devno = devno; |
msim_irq.inr = MSIM_KBD_IRQ; |
msim_irq.claim = msim_claim; |
msim_irq.handler = msim_irq_handler; |
irq_register(&msim_irq); |
cp0_unmask_int(MSIM_KBD_IRQ); |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.devno", NULL, devno); |
sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); |
sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS); |
msim_parea.pbase = KA2PA(MSIM_VIDEORAM); |
msim_parea.vbase = MSIM_VIDEORAM; |
msim_parea.frames = 1; |
msim_parea.cacheable = false; |
ddi_parea_register(&msim_parea); |
sysinfo_set_item_val("fb", NULL, true); |
sysinfo_set_item_val("fb.kind", NULL, 3); |
sysinfo_set_item_val("fb.address.physical", NULL, KA2PA(MSIM_VIDEORAM)); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/mips32/src/drivers/serial.c |
---|
0,0 → 1,159 |
/* |
* Copyright (c) 2005 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
*/ |
#include <interrupt.h> |
#include <arch/cp0.h> |
#include <ipc/irq.h> |
#include <arch/drivers/serial.h> |
#include <console/chardev.h> |
#include <console/console.h> |
#define SERIAL_IRQ 2 |
static irq_t serial_irq; |
static chardev_t console; |
static serial_t sconf[SERIAL_MAX]; |
static bool kb_enabled; |
static void serial_write(chardev_t *d, const char ch) |
{ |
serial_t *sd = (serial_t *)d->data; |
if (ch == '\n') |
serial_write(d, '\r'); |
/* Wait until transmit buffer empty */ |
while (! (SERIAL_READ_LSR(sd->port) & (1<<TRANSMIT_EMPTY_BIT))) |
; |
SERIAL_WRITE(sd->port, ch); |
} |
static void serial_enable(chardev_t *d) |
{ |
kb_enabled = true; |
} |
static void serial_disable(chardev_t *d) |
{ |
kb_enabled = false; |
} |
int serial_init(void) |
{ |
int i = 0; |
if (SERIAL_READ_LSR(SERIAL_COM1) == 0x60) { |
sconf[i].port = SERIAL_COM1; |
sconf[i].irq = SERIAL_COM1_IRQ; |
/* Enable interrupt on available data */ |
i++; |
} |
return i; |
} |
/** Read character from serial port, wait until available */ |
static char serial_do_read(chardev_t *dev) |
{ |
serial_t *sd = (serial_t *)dev->data; |
char ch; |
while (!(SERIAL_READ_LSR(sd->port) & 1)) |
; |
ch = SERIAL_READ(sd->port); |
if (ch =='\r') |
ch = '\n'; |
return ch; |
} |
static void serial_handler(void) |
{ |
serial_t *sd = (serial_t *) console.data; |
char ch; |
if (!(SERIAL_READ_LSR(sd->port) & 1)) |
return; |
ch = SERIAL_READ(sd->port); |
if (ch =='\r') |
ch = '\n'; |
chardev_push_character(&console, ch); |
} |
/** Process keyboard interrupt. Does not work in simics? */ |
static void serial_irq_handler(irq_t *irq, void *arg, ...) |
{ |
if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) |
ipc_irq_send_notif(irq); |
else |
serial_handler(); |
} |
static irq_ownership_t serial_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
static chardev_operations_t serial_ops = { |
.resume = serial_enable, |
.suspend = serial_disable, |
.write = serial_write, |
.read = serial_do_read |
}; |
void serial_console(devno_t devno) |
{ |
serial_t *sd = &sconf[0]; |
chardev_initialize("serial_console", &console, &serial_ops); |
console.data = sd; |
kb_enabled = true; |
irq_initialize(&serial_irq); |
serial_irq.devno = devno; |
serial_irq.inr = SERIAL_IRQ; |
serial_irq.claim = serial_claim; |
serial_irq.handler = serial_irq_handler; |
irq_register(&serial_irq); |
/* I don't know why, but the serial interrupts simply |
* don't work on simics |
*/ |
virtual_timer_fnc = &serial_handler; |
stdin = &console; |
stdout = &console; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/mips32/src/console.c |
---|
0,0 → 1,65 |
/* |
* Copyright (c) 2005 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
*/ |
#include <console/console.h> |
#include <arch/console.h> |
#include <arch/drivers/serial.h> |
#include <arch/drivers/msim.h> |
void console_init(devno_t devno) |
{ |
if (serial_init()) |
serial_console(devno); |
else |
msim_console(devno); |
} |
/** Acquire console back for kernel |
* |
*/ |
void arch_grab_console(void) |
{ |
msim_kbd_grab(); |
} |
/** Return console to userspace |
* |
*/ |
void arch_release_console(void) |
{ |
msim_kbd_release(); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/mips32/src/mips32.c |
---|
33,17 → 33,20 |
*/ |
#include <arch.h> |
#include <arch/boot.h> |
#include <arch/cp0.h> |
#include <arch/exception.h> |
#include <mm/as.h> |
#include <userspace.h> |
#include <arch/console.h> |
#include <memstr.h> |
#include <proc/thread.h> |
#include <proc/uarg.h> |
#include <print.h> |
#include <console/console.h> |
#include <syscall/syscall.h> |
#include <sysinfo/sysinfo.h> |
#include <arch/interrupt.h> |
#include <console/chardev.h> |
#include <arch/barrier.h> |
50,51 → 53,39 |
#include <arch/debugger.h> |
#include <genarch/fb/fb.h> |
#include <genarch/fb/visuals.h> |
#include <genarch/drivers/dsrln/dsrlnin.h> |
#include <genarch/drivers/dsrln/dsrlnout.h> |
#include <genarch/srln/srln.h> |
#include <macros.h> |
#include <config.h> |
#include <string.h> |
#include <arch/drivers/msim.h> |
#include <ddi/device.h> |
#include <arch/asm/regname.h> |
/* Size of the code jumping to the exception handler code |
* - J+NOP |
/* Size of the code jumping to the exception handler code |
* - J+NOP |
*/ |
#define EXCEPTION_JUMP_SIZE 8 |
#define EXCEPTION_JUMP_SIZE 8 |
#define TLB_EXC ((char *) 0x80000000) |
#define NORM_EXC ((char *) 0x80000180) |
#define CACHE_EXC ((char *) 0x80000100) |
#define TLB_EXC ((char *) 0x80000000) |
#define NORM_EXC ((char *) 0x80000180) |
#define CACHE_EXC ((char *) 0x80000100) |
/* Why the linker moves the variable 64K away in assembler |
* when not in .text section? |
* when not in .text section ???????? |
*/ |
uintptr_t supervisor_sp __attribute__ ((section (".text"))); |
/* Stack pointer saved when entering user mode */ |
uintptr_t supervisor_sp __attribute__ ((section (".text"))); |
/* TODO: How do we do it on SMP system???? */ |
bootinfo_t bootinfo __attribute__ ((section (".text"))); |
size_t cpu_count = 0; |
/** Performs mips32-specific initialization before main_bsp() is called. */ |
void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) |
void arch_pre_main(void) |
{ |
/* Setup usermode */ |
init.cnt = bootinfo->cnt; |
init.cnt = bootinfo.cnt; |
size_t i; |
for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) { |
init.tasks[i].addr = bootinfo->tasks[i].addr; |
init.tasks[i].size = bootinfo->tasks[i].size; |
str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, |
bootinfo->tasks[i].name); |
} |
uint32_t i; |
for (i = 0; i < CPUMAP_MAX_RECORDS; i++) { |
if ((bootinfo->cpumap & (1 << i)) != 0) |
cpu_count++; |
for (i = 0; i < bootinfo.cnt; i++) { |
init.tasks[i].addr = bootinfo.tasks[i].addr; |
init.tasks[i].size = bootinfo.tasks[i].size; |
} |
} |
120,12 → 111,12 |
*/ |
cp0_status_write(cp0_status_read() & |
~(cp0_status_bev_bootstrap_bit | cp0_status_erl_error_bit)); |
/* |
* Mask all interrupts |
/* |
* Mask all interrupts |
*/ |
cp0_mask_all_int(); |
debugger_init(); |
} |
132,23 → 123,12 |
void arch_post_mm_init(void) |
{ |
interrupt_init(); |
console_init(device_assign_devno()); |
#ifdef CONFIG_FB |
/* GXemul framebuffer */ |
fb_properties_t gxemul_prop = { |
.addr = 0x12000000, |
.offset = 0, |
.x = 640, |
.y = 480, |
.scan = 1920, |
.visual = VISUAL_BGR_8_8_8, |
}; |
fb_init(&gxemul_prop); |
#else |
#ifdef CONFIG_MIPS_PRN |
dsrlnout_init((ioport8_t *) MSIM_KBD_ADDRESS); |
#endif /* CONFIG_MIPS_PRN */ |
#endif /* CONFIG_FB */ |
fb_init(0x12000000, 640, 480, 1920, VISUAL_RGB_8_8_8); |
#endif |
sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1); |
} |
void arch_post_cpu_init(void) |
161,37 → 141,8 |
void arch_post_smp_init(void) |
{ |
#ifdef CONFIG_MIPS_KBD |
/* |
* Initialize the msim/GXemul keyboard port. Then initialize the serial line |
* module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts. |
*/ |
dsrlnin_instance_t *dsrlnin_instance |
= dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, MSIM_KBD_IRQ); |
if (dsrlnin_instance) { |
srln_instance_t *srln_instance = srln_init(); |
if (srln_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *srln = srln_wire(srln_instance, sink); |
dsrlnin_wire(dsrlnin_instance, srln); |
cp0_unmask_int(MSIM_KBD_IRQ); |
} |
} |
/* |
* This is the necessary evil until the userspace driver is entirely |
* self-sufficient. |
*/ |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); |
sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS); |
#endif |
} |
void calibrate_delay_loop(void) |
{ |
} |
void userspace(uspace_arg_t *kernel_uarg) |
{ |
/* EXL = 1, UM = 1, IE = 1 */ |
202,7 → 153,8 |
(uintptr_t) kernel_uarg->uspace_uarg, |
(uintptr_t) kernel_uarg->uspace_entry); |
while (1); |
while (1) |
; |
} |
/** Perform mips32 specific tasks needed before the new task is run. */ |
234,36 → 186,10 |
void arch_reboot(void) |
{ |
___halt(); |
while (1); |
while (1) |
; |
} |
/** Construct function pointer |
* |
* @param fptr function pointer structure |
* @param addr function address |
* @param caller calling function address |
* |
* @return address of the function pointer |
* |
*/ |
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
{ |
return addr; |
} |
void arch_grab_console(void) |
{ |
#ifdef CONFIG_FB |
fb_redraw(); |
#endif |
} |
/** Return console to userspace |
* |
*/ |
void arch_release_console(void) |
{ |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/mips32/src/interrupt.c |
---|
41,9 → 41,8 |
#include <ipc/sysipc.h> |
#include <ddi/device.h> |
#define IRQ_COUNT 8 |
#define TIMER_IRQ 7 |
#define DORDER_IRQ 5 |
#define IRQ_COUNT 8 |
#define TIMER_IRQ 7 |
function virtual_timer_fnc = NULL; |
static irq_t timer_irq; |
101,12 → 100,12 |
cp0_compare_write(nextcount); |
} |
static irq_ownership_t timer_claim(irq_t *irq) |
static irq_ownership_t timer_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
static void timer_irq_handler(irq_t *irq) |
static void timer_irq_handler(irq_t *irq, void *arg, ...) |
{ |
unsigned long drift; |
/branches/arm/kernel/arch/mips32/src/start.S |
---|
31,7 → 31,7 |
#include <arch/asm/boot.h> |
#include <arch/context_offset.h> |
#include <arch/stack.h> |
.text |
.set noat |
75,6 → 75,18 |
mfhi $at |
sw $at, EOFFSET_HI(\r) |
#ifdef CONFIG_DEBUG_ALLREGS |
sw $s0, EOFFSET_S0(\r) |
sw $s1, EOFFSET_S1(\r) |
sw $s2, EOFFSET_S2(\r) |
sw $s3, EOFFSET_S3(\r) |
sw $s4, EOFFSET_S4(\r) |
sw $s5, EOFFSET_S5(\r) |
sw $s6, EOFFSET_S6(\r) |
sw $s7, EOFFSET_S7(\r) |
sw $s8, EOFFSET_S8(\r) |
#endif |
sw $gp, EOFFSET_GP(\r) |
sw $ra, EOFFSET_RA(\r) |
sw $k1, EOFFSET_K1(\r) |
120,6 → 132,17 |
lw $t8, EOFFSET_T8(\r) |
lw $t9, EOFFSET_T9(\r) |
#ifdef CONFIG_DEBUG_ALLREGS |
lw $s0, EOFFSET_S0(\r) |
lw $s1, EOFFSET_S1(\r) |
lw $s2, EOFFSET_S2(\r) |
lw $s3, EOFFSET_S3(\r) |
lw $s4, EOFFSET_S4(\r) |
lw $s5, EOFFSET_S5(\r) |
lw $s6, EOFFSET_S6(\r) |
lw $s7, EOFFSET_S7(\r) |
lw $s8, EOFFSET_S8(\r) |
#endif |
lw $gp, EOFFSET_GP(\r) |
lw $ra, EOFFSET_RA(\r) |
lw $k1, EOFFSET_K1(\r) |
152,9 → 175,9 |
ori $k0, $k0, %lo(supervisor_sp) |
# Move $k0 (superveisor_sp) |
lw $k0, 0($k0) |
1: |
1: |
.endm |
.org 0x0 |
kernel_image_start: |
/* Load temporary stack */ |
161,12 → 184,31 |
lui $sp, %hi(end_stack) |
ori $sp, $sp, %lo(end_stack) |
/* Not sure about this, but might |
be needed for PIC code */ |
/* $a1 contains physical address of bootinfo_t */ |
/* $a2 contains size of bootinfo_t */ |
beq $a2, $0, bootinfo_end |
/* Not sure about this, but might be needed for PIC code???? */ |
lui $gp, 0x8000 |
/* $a1 contains physical address of bootinfo_t */ |
lui $a3, %hi(bootinfo) |
ori $a3, $a3, %lo(bootinfo) |
bootinfo_loop: |
lw $v0, 0($a1) |
sw $v0, 0($a3) |
addi $a1, $a1, 4 |
addi $a3, $a3, 4 |
addi $a2, $a2, -4 |
bgtz $a2, bootinfo_loop |
nop |
bootinfo_end: |
jal arch_pre_main |
nop |
186,8 → 228,8 |
exception_entry: |
j exception_handler |
nop |
nop |
exception_handler: |
KERNEL_STACK_TO_K0 |
sub $k0, REGISTER_SPACE |
196,17 → 238,17 |
mfc0 $k0, $cause |
sra $k0, $k0, 0x2 # cp0_exc_cause() part 1 |
andi $k0, $k0, 0x1f # cp0_exc_cause() part 2 |
sub $k0, 8 # 8 = SYSCALL |
sra $k0, $k0, 0x2 # cp0_exc_cause() part 1 |
andi $k0, $k0, 0x1f # cp0_exc_cause() part 2 |
sub $k0, 8 # 8 = SYSCALL |
beqz $k0, syscall_shortcut |
add $k0, 8 # Revert $k0 back to correct exc number |
add $k0, 8 # Revert $k0 back to correct exc number |
REGISTERS_STORE_AND_EXC_RESET $sp |
move $a1, $sp |
jal exc_dispatch # exc_dispatch(excno, register_space) |
jal exc_dispatch # exc_dispatch(excno, register_space) |
move $a0, $k0 |
REGISTERS_LOAD $sp |
/branches/arm/kernel/arch/mips32/src/debugger.c |
---|
37,18 → 37,16 |
#include <memstr.h> |
#include <console/kconsole.h> |
#include <console/cmd.h> |
#include <symtab.h> |
#include <print.h> |
#include <panic.h> |
#include <arch.h> |
#include <arch/cp0.h> |
#include <func.h> |
#include <symtab.h> |
bpinfo_t breakpoints[BKPOINTS_MAX]; |
SPINLOCK_INITIALIZE(bkpoint_lock); |
#ifdef CONFIG_KCONSOLE |
static int cmd_print_breakpoints(cmd_arg_t *argv); |
static cmd_info_t bkpts_info = { |
.name = "bkpts", |
125,12 → 123,10 |
{0, 0} /* EndOfTable */ |
}; |
/** Test, if the given instruction is a jump or branch instruction |
* |
* @param instr Instruction code |
* @return true - it is jump instruction, false otherwise |
* |
*/ |
static bool is_jump(unative_t instr) |
{ |
162,7 → 158,7 |
for (i = 0; i < BKPOINTS_MAX; i++) { |
if (breakpoints[i].address == (uintptr_t)argv->intval) { |
printf("Duplicate breakpoint %d.\n", i); |
spinlock_unlock(&bkpoint_lock); |
spinlock_unlock(&bkpoints_lock); |
return 0; |
} else if (breakpoints[i].address == (uintptr_t)argv->intval + |
sizeof(unative_t) || breakpoints[i].address == |
169,10 → 165,10 |
(uintptr_t)argv->intval - sizeof(unative_t)) { |
printf("Adjacent breakpoints not supported, conflict " |
"with %d.\n", i); |
spinlock_unlock(&bkpoint_lock); |
spinlock_unlock(&bkpoints_lock); |
return 0; |
} |
} |
for (i = 0; i < BKPOINTS_MAX; i++) |
259,9 → 255,8 |
for (i = 0; i < BKPOINTS_MAX; i++) |
if (breakpoints[i].address) { |
symbol = symtab_fmt_name_lookup( |
breakpoints[i].address); |
symbol = get_symtab_entry(breakpoints[i].address); |
printf("%-2u %-5d %#10zx %-6s %-7s %-8s %s\n", i, |
breakpoints[i].counter, breakpoints[i].address, |
((breakpoints[i].flags & BKPOINT_INPROG) ? "true" : |
272,8 → 267,6 |
return 1; |
} |
#endif |
/** Initialize debugger */ |
void debugger_init() |
{ |
281,24 → 274,22 |
for (i = 0; i < BKPOINTS_MAX; i++) |
breakpoints[i].address = NULL; |
#ifdef CONFIG_KCONSOLE |
cmd_initialize(&bkpts_info); |
if (!cmd_register(&bkpts_info)) |
printf("Cannot register command %s\n", bkpts_info.name); |
panic("could not register command %s\n", bkpts_info.name); |
cmd_initialize(&delbkpt_info); |
if (!cmd_register(&delbkpt_info)) |
printf("Cannot register command %s\n", delbkpt_info.name); |
panic("could not register command %s\n", delbkpt_info.name); |
cmd_initialize(&addbkpt_info); |
if (!cmd_register(&addbkpt_info)) |
printf("Cannot register command %s\n", addbkpt_info.name); |
panic("could not register command %s\n", addbkpt_info.name); |
cmd_initialize(&addbkpte_info); |
if (!cmd_register(&addbkpte_info)) |
printf("Cannot register command %s\n", addbkpte_info.name); |
#endif |
panic("could not register command %s\n", addbkpte_info.name); |
} |
/** Handle breakpoint |
317,7 → 308,7 |
/* test branch delay slot */ |
if (cp0_cause_read() & 0x80000000) |
panic("Breakpoint in branch delay slot not supported."); |
panic("Breakpoint in branch delay slot not supported.\n"); |
spinlock_lock(&bkpoint_lock); |
for (i = 0; i < BKPOINTS_MAX; i++) { |
349,10 → 340,9 |
if (cur->flags & BKPOINT_INPROG) |
printf("Warning: breakpoint recursion\n"); |
if (!(cur->flags & BKPOINT_FUNCCALL)) { |
if (!(cur->flags & BKPOINT_FUNCCALL)) |
printf("***Breakpoint %d: %p in %s.\n", i, fireaddr, |
symtab_fmt_name_lookup(istate->epc)); |
} |
get_symtab_entry(istate->epc)); |
/* Return first instruction back */ |
((uint32_t *)cur->address)[0] = cur->instruction; |
365,9 → 355,8 |
} |
cur->flags |= BKPOINT_INPROG; |
} else { |
printf("***Breakpoint %d: %p in %s.\n", i, fireaddr, |
symtab_fmt_name_lookup(fireaddr)); |
printf("***Breakpoint %p in %s.\n", fireaddr, |
get_symtab_entry(fireaddr)); |
/* Move on to next instruction */ |
istate->epc += 4; |
} |
378,20 → 367,19 |
if (cur->bkfunc) |
cur->bkfunc(cur, istate); |
} else { |
#ifdef CONFIG_KCONSOLE |
printf("***Type 'exit' to exit kconsole.\n"); |
/* This disables all other processors - we are not SMP, |
* actually this gets us to cpu_halt, if scheduler() is run |
* - we generally do not want scheduler to be run from debug, |
* so this is a good idea |
*/ |
atomic_set(&haltstate, 1); |
atomic_set(&haltstate,1); |
spinlock_unlock(&bkpoint_lock); |
kconsole("debug", "Debug console ready.\n", false); |
kconsole("debug"); |
spinlock_lock(&bkpoint_lock); |
atomic_set(&haltstate, 0); |
#endif |
atomic_set(&haltstate,0); |
} |
if (cur && cur->address == fireaddr && (cur->flags & BKPOINT_INPROG)) { |
/* Remove one-shot breakpoint */ |
/branches/arm/kernel/arch/mips32/src/exception.c |
---|
41,12 → 41,13 |
#include <arch.h> |
#include <debug.h> |
#include <proc/thread.h> |
#include <symtab.h> |
#include <print.h> |
#include <interrupt.h> |
#include <func.h> |
#include <console/kconsole.h> |
#include <ddi/irq.h> |
#include <arch/debugger.h> |
#include <symtab.h> |
static char * exctable[] = { |
"Interrupt", |
73,21 → 74,25 |
static void print_regdump(istate_t *istate) |
{ |
char *pcsymbol, *rasymbol; |
char *pcsymbol = ""; |
char *rasymbol = ""; |
pcsymbol = symtab_fmt_name_lookup(istate->epc); |
rasymbol = symtab_fmt_name_lookup(istate->ra); |
printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, |
istate->ra, rasymbol, istate->sp); |
char *s = get_symtab_entry(istate->epc); |
if (s) |
pcsymbol = s; |
s = get_symtab_entry(istate->ra); |
if (s) |
rasymbol = s; |
printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp); |
} |
static void unhandled_exception(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "Unhandled exception %s.", exctable[n]); |
fault_if_from_uspace(istate, "unhandled exception %s", exctable[n]); |
print_regdump(istate); |
panic("Unhandled exception %s.", exctable[n]); |
panic("unhandled exception %s\n", exctable[n]); |
} |
static void reserved_instr_exception(int n, istate_t *istate) |
128,8 → 133,8 |
if (cp0_cause_coperr(cp0_cause_read()) == fpu_cop_id) |
scheduler_fpu_lazy_request(); |
else { |
fault_if_from_uspace(istate, "Unhandled Coprocessor Unusable Exception."); |
panic("Unhandled Coprocessor Unusable Exception."); |
fault_if_from_uspace(istate, "unhandled Coprocessor Unusable Exception"); |
panic("unhandled Coprocessor Unusable Exception\n"); |
} |
} |
#endif |
140,7 → 145,7 |
int i; |
/* decode interrupt number and process the interrupt */ |
cause = (cp0_cause_read() >> 8) & 0xff; |
cause = (cp0_cause_read() >> 8) &0xff; |
for (i = 0; i < 8; i++) { |
if (cause & (1 << i)) { |
149,7 → 154,7 |
/* |
* The IRQ handler was found. |
*/ |
irq->handler(irq); |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
/* |
156,8 → 161,7 |
* Spurious interrupt. |
*/ |
#ifdef CONFIG_DEBUG |
printf("cpu%u: spurious interrupt (inum=%d)\n", |
CPU->id, i); |
printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, i); |
#endif |
} |
} |
167,7 → 171,7 |
/** Handle syscall userspace call */ |
static void syscall_exception(int n, istate_t *istate) |
{ |
panic("Syscall is handled through shortcut."); |
panic("Syscall is handled through shortcut"); |
} |
void exception_init(void) |
/branches/arm/kernel/arch/mips32/src/cpu/cpu.c |
---|
48,7 → 48,7 |
{ "MIPS", "R2000" }, /* 0x01 */ |
{ "MIPS", "R3000" }, /* 0x02 */ |
{ "MIPS", "R6000" }, /* 0x03 */ |
{ "MIPS", "R4000/R4400" }, /* 0x04 */ |
{ "MIPS", " R4000/R4400" }, /* 0x04 */ |
{ "LSI Logic", "R3000" }, /* 0x05 */ |
{ "MIPS", "R6000A" }, /* 0x06 */ |
{ "IDT", "3051/3052" }, /* 0x07 */ |
123,9 → 123,9 |
data = &imp_data[m->arch.imp_num]; |
} |
printf("cpu%u: %s %s (rev=%d.%d, imp=%d)\n", |
printf("cpu%d: %s %s (rev=%d.%d, imp=%d)\n", |
m->id, data->vendor, data->model, m->arch.rev_num >> 4, |
m->arch.rev_num & 0x0f, m->arch.imp_num); |
m->arch.rev_num & 0xf, m->arch.imp_num); |
} |
/** @} |
/branches/arm/kernel/arch/mips32/src/smp/dorder.c |
---|
File deleted |
/branches/arm/kernel/arch/mips32/src/smp/smp.c |
---|
File deleted |
/branches/arm/kernel/arch/mips32/src/smp/order.c |
---|
0,0 → 1,45 |
/* |
* Copyright (c) 2007 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/smp/order.h> |
#define MSIM_ORDER_ADDRESS 0xB0000004 |
void ipi_broadcast_arch(int ipi) |
{ |
*((volatile unsigned int *) MSIM_ORDER_ADDRESS) = 0x7FFFFFFF; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/mips32/src/cache.c |
---|
38,7 → 38,7 |
void cache_error(istate_t *istate) |
{ |
panic("cache_error exception (epc=%p).", istate->epc); |
panic("cache_error exception (epc=%p)\n", istate->epc); |
} |
/** @} |
/branches/arm/kernel/arch/mips32/src/fpu_context.c |
---|
40,7 → 40,7 |
void fpu_disable(void) |
{ |
#ifdef CONFIG_FPU |
#ifdef ARCH_HAS_FPU |
cp0_status_write(cp0_status_read() & ~cp0_status_fpu_bit); |
#endif |
} |
47,7 → 47,7 |
void fpu_enable(void) |
{ |
#ifdef CONFIG_FPU |
#ifdef ARCH_HAS_FPU |
cp0_status_write(cp0_status_read() | cp0_status_fpu_bit); |
#endif |
} |
/branches/arm/kernel/arch/mips32/src/dummy.S |
---|
0,0 → 1,41 |
# |
# Copyright (c) 2003-2004 Jakub Jermar |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
.text |
.set noat |
.global calibrate_delay_loop |
.global asm_delay_loop |
.global dummy |
calibrate_delay_loop: |
asm_delay_loop: |
dummy: |
j $31 |
nop |
/branches/arm/kernel/arch/mips32/Makefile.inc |
---|
29,51 → 29,87 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_ARCH = mips |
BFD = binary |
TARGET = mipsel-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/mipsel |
GCC_CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 |
KERNEL_LOAD_ADDRESS = 0x80100000 |
BITS = 32 |
GCC_CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss |
DEFS += -D__32_BITS__ -DMACHINE=$(MACHINE) -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS} |
## Compile with hierarchical page tables support. |
# |
CONFIG_PAGE_PT = y |
DEFS += -DCONFIG_PAGE_PT |
## Compile with support for address space identifiers. |
# |
CONFIG_ASID = y |
CONFIG_ASID_FIFO = y |
## Accepted MACHINEs |
# |
ifeq ($(MACHINE),lgxemul) |
BFD_NAME = elf32-tradlittlemips |
ENDIANESS = LE |
BFD = binary |
GCC_CFLAGS += -DFB_INVERT_ENDIAN -DARCH_HAS_FPU -mips3 |
endif |
ifeq ($(MACHINE),bgxemul) |
BFD_NAME = elf32-tradbigmips |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips |
TARGET = mips-linux-gnu |
ENDIANESS = BE |
GCC_CFLAGS += -D__BE__ |
BFD_NAME = elf32-bigmips |
BFD = ecoff-bigmips |
TARGET = mips-sgi-irix5 |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips/bin |
GCC_CFLAGS += -EB -DBIG_ENDIAN -DARCH_HAS_FPU -mips3 |
endif |
ifeq ($(MACHINE),simics) |
# SIMICS 4kc emulation is broken, although for instructions |
# that do not bother us |
BFD_NAME = elf32-tradlittlemips |
BFD = elf32-tradlittlemips |
GCC_CFLAGS += -mhard-float -mips3 -DTLBCNT=16 |
TLBCNT = 16 |
endif |
ifeq ($(MACHINE),msim) |
BFD_NAME = elf32-tradlittlemips |
ENDIANESS = LE |
GCC_CFLAGS += -mhard-float |
BFD = binary |
GCC_CFLAGS += -mhard-float -mips3 |
endif |
## Compile with support for software integer division. |
# |
CONFIG_SOFTINT = y |
ARCH_SOURCES = \ |
arch/$(KARCH)/src/start.S \ |
arch/$(KARCH)/src/context.S \ |
arch/$(KARCH)/src/panic.S \ |
arch/$(KARCH)/src/mips32.c \ |
arch/$(KARCH)/src/asm.S \ |
arch/$(KARCH)/src/exception.c \ |
arch/$(KARCH)/src/interrupt.c \ |
arch/$(KARCH)/src/cache.c \ |
arch/$(KARCH)/src/debugger.c \ |
arch/$(KARCH)/src/cpu/cpu.c \ |
arch/$(KARCH)/src/mm/frame.c \ |
arch/$(KARCH)/src/mm/page.c \ |
arch/$(KARCH)/src/mm/tlb.c \ |
arch/$(KARCH)/src/mm/as.c \ |
arch/$(KARCH)/src/fpu_context.c \ |
arch/$(KARCH)/src/ddi/ddi.c \ |
arch/$(KARCH)/src/smp/dorder.c \ |
arch/$(KARCH)/src/smp/smp.c |
arch/$(ARCH)/src/start.S \ |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/panic.S \ |
arch/$(ARCH)/src/mips32.c \ |
arch/$(ARCH)/src/dummy.S \ |
arch/$(ARCH)/src/console.c \ |
arch/$(ARCH)/src/asm.S \ |
arch/$(ARCH)/src/exception.c \ |
arch/$(ARCH)/src/interrupt.c \ |
arch/$(ARCH)/src/cache.c \ |
arch/$(ARCH)/src/debugger.c \ |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/fpu_context.c \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/drivers/msim.c \ |
arch/$(ARCH)/src/drivers/serial.c \ |
arch/$(ARCH)/src/smp/order.c |
/branches/arm/kernel/arch/mips32/include/drivers/serial.h |
---|
0,0 → 1,76 |
/* |
* Copyright (c) 2005 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_mips32_SERIAL_H_ |
#define KERN_mips32_SERIAL_H_ |
#include <console/chardev.h> |
#define SERIAL_ADDRESS 0x98000000 |
#define SERIAL_MAX 4 |
#define SERIAL_COM1 0x3f8 |
#define SERIAL_COM1_IRQ 4 |
#define SERIAL_COM2 0x2f8 |
#define SERIAL_COM2_IRQ 3 |
#define P_WRITEB(where, what) (*((volatile char *) (SERIAL_ADDRESS + where)) = what) |
#define P_READB(where) (*((volatile char *) (SERIAL_ADDRESS + where))) |
#define SERIAL_READ(x) P_READB(x) |
#define SERIAL_WRITE(x, c) P_WRITEB(x, c) |
/* Interrupt enable register */ |
#define SERIAL_READ_IER(x) (P_READB((x) + 1)) |
#define SERIAL_WRITE_IER(x,c) (P_WRITEB((x) + 1, c)) |
/* Interrupt identification register */ |
#define SERIAL_READ_IIR(x) (P_READB((x) + 2)) |
/* Line status register */ |
#define SERIAL_READ_LSR(x) (P_READB((x) + 5)) |
#define TRANSMIT_EMPTY_BIT 5 |
typedef struct { |
int port; |
int irq; |
}serial_t; |
extern void serial_console(devno_t devno); |
extern int serial_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/mips32/include/drivers/msim.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
36,10 → 36,16 |
#define KERN_mips32_MSIM_H_ |
/** Address of devices. */ |
#define MSIM_VIDEORAM 0x90000000 |
#define MSIM_KBD_ADDRESS 0x90000000 |
#define MSIM_KBD_IRQ 2 |
#define MSIM_VIDEORAM 0x90000000 |
#define MSIM_KBD_ADDRESS 0x90000000 |
#define MSIM_KBD_IRQ 2 |
#include <console/chardev.h> |
void msim_console(devno_t devno); |
void msim_kbd_release(void); |
void msim_kbd_grab(void); |
#endif |
/** @} |
/branches/arm/kernel/arch/mips32/include/mm/page.h |
---|
112,21 → 112,21 |
/* Get PTE flags accessors for each level. */ |
#define GET_PTL1_FLAGS_ARCH(ptl0, i) \ |
get_pt_flags((pte_t *) (ptl0), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl0), (index_t) (i)) |
#define GET_PTL2_FLAGS_ARCH(ptl1, i) \ |
PAGE_PRESENT |
#define GET_PTL3_FLAGS_ARCH(ptl2, i) \ |
PAGE_PRESENT |
#define GET_FRAME_FLAGS_ARCH(ptl3, i) \ |
get_pt_flags((pte_t *) (ptl3), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl3), (index_t) (i)) |
/* Set PTE flags accessors for each level. */ |
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ |
set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x)) |
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ |
set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x)) |
/* Last-level info macros. */ |
#define PTE_VALID_ARCH(pte) (*((uint32_t *) (pte)) != 0) |
140,7 → 140,7 |
#include <mm/mm.h> |
#include <arch/exception.h> |
static inline int get_pt_flags(pte_t *pt, size_t i) |
static inline int get_pt_flags(pte_t *pt, index_t i) |
{ |
pte_t *p = &pt[i]; |
153,7 → 153,7 |
(p->g << PAGE_GLOBAL_SHIFT)); |
} |
static inline void set_pt_flags(pte_t *pt, size_t i, int flags) |
static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
{ |
pte_t *p = &pt[i]; |
/branches/arm/kernel/arch/mips32/include/mm/tlb.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32mm |
/** @addtogroup mips32mm |
* @{ |
*/ |
/** @file |
40,38 → 40,42 |
#include <arch/mm/asid.h> |
#include <arch/exception.h> |
#define TLB_ENTRY_COUNT 48 |
#ifdef TLBCNT |
# define TLB_ENTRY_COUNT TLBCNT |
#else |
# define TLB_ENTRY_COUNT 48 |
#endif |
#define TLB_WIRED 1 |
#define TLB_KSTACK_WIRED_INDEX 0 |
#define TLB_WIRED 1 |
#define TLB_KSTACK_WIRED_INDEX 0 |
#define TLB_PAGE_MASK_4K (0x000 << 13) |
#define TLB_PAGE_MASK_16K (0x003 << 13) |
#define TLB_PAGE_MASK_64K (0x00f << 13) |
#define TLB_PAGE_MASK_256K (0x03f << 13) |
#define TLB_PAGE_MASK_1M (0x0ff << 13) |
#define TLB_PAGE_MASK_4M (0x3ff << 13) |
#define TLB_PAGE_MASK_16M (0xfff << 13) |
#define TLB_PAGE_MASK_4K (0x000 << 13) |
#define TLB_PAGE_MASK_16K (0x003 << 13) |
#define TLB_PAGE_MASK_64K (0x00f << 13) |
#define TLB_PAGE_MASK_256K (0x03f << 13) |
#define TLB_PAGE_MASK_1M (0x0ff << 13) |
#define TLB_PAGE_MASK_4M (0x3ff << 13) |
#define TLB_PAGE_MASK_16M (0xfff << 13) |
#define PAGE_UNCACHED 2 |
#define PAGE_CACHEABLE_EXC_WRITE 5 |
#define PAGE_UNCACHED 2 |
#define PAGE_CACHEABLE_EXC_WRITE 5 |
typedef union { |
struct { |
#ifdef BIG_ENDIAN |
unsigned : 2; /* zero */ |
unsigned pfn : 24; /* frame number */ |
unsigned c : 3; /* cache coherency attribute */ |
unsigned d : 1; /* dirty/write-protect bit */ |
unsigned v : 1; /* valid bit */ |
unsigned g : 1; /* global bit */ |
unsigned : 2; /* zero */ |
unsigned pfn : 24; /* frame number */ |
unsigned c : 3; /* cache coherency attribute */ |
unsigned d : 1; /* dirty/write-protect bit */ |
unsigned v : 1; /* valid bit */ |
unsigned g : 1; /* global bit */ |
#else |
unsigned g : 1; /* global bit */ |
unsigned v : 1; /* valid bit */ |
unsigned d : 1; /* dirty/write-protect bit */ |
unsigned c : 3; /* cache coherency attribute */ |
unsigned pfn : 24; /* frame number */ |
unsigned : 2; /* zero */ |
unsigned g : 1; /* global bit */ |
unsigned v : 1; /* valid bit */ |
unsigned d : 1; /* dirty/write-protect bit */ |
unsigned c : 3; /* cache coherency attribute */ |
unsigned pfn : 24; /* frame number */ |
unsigned : 2; /* zero */ |
#endif |
} __attribute__ ((packed)); |
uint32_t value; |
159,7 → 163,7 |
asm volatile ("tlbwr\n\t"); |
} |
#define tlb_invalidate(asid) tlb_invalidate_asid(asid) |
#define tlb_invalidate(asid) tlb_invalidate_asid(asid) |
extern void tlb_invalid(istate_t *istate); |
extern void tlb_refill(istate_t *istate); |
/branches/arm/kernel/arch/mips32/include/mm/frame.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32mm |
/** @addtogroup mips32mm |
* @{ |
*/ |
/** @file |
35,14 → 35,12 |
#ifndef KERN_mips32_FRAME_H_ |
#define KERN_mips32_FRAME_H_ |
#define FRAME_WIDTH 14 /* 16K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#define FRAME_WIDTH 14 /* 16K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#ifdef KERNEL |
#ifndef __ASM__ |
#include <typedefs.h> |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
/branches/arm/kernel/arch/mips32/include/mm/asid.h |
---|
37,7 → 37,7 |
#include <arch/types.h> |
#define ASID_MAX_ARCH 255 /* 2^8 - 1 */ |
#define ASID_MAX_ARCH 255 /* 2^8 - 1 */ |
typedef uint8_t asid_t; |
/branches/arm/kernel/arch/mips32/include/atomic.h |
---|
35,14 → 35,14 |
#ifndef KERN_mips32_ATOMIC_H_ |
#define KERN_mips32_ATOMIC_H_ |
#define atomic_inc(x) ((void) atomic_add(x, 1)) |
#define atomic_dec(x) ((void) atomic_add(x, -1)) |
#define atomic_inc(x) ((void) atomic_add(x, 1)) |
#define atomic_dec(x) ((void) atomic_add(x, -1)) |
#define atomic_postinc(x) (atomic_add(x, 1) - 1) |
#define atomic_postdec(x) (atomic_add(x, -1) + 1) |
#define atomic_postinc(x) (atomic_add(x, 1) - 1) |
#define atomic_postdec(x) (atomic_add(x, -1) + 1) |
#define atomic_preinc(x) atomic_add(x, 1) |
#define atomic_predec(x) atomic_add(x, -1) |
#define atomic_preinc(x) atomic_add(x, 1) |
#define atomic_predec(x) atomic_add(x, -1) |
/* Atomic addition of immediate value. |
* |
54,37 → 54,19 |
static inline long atomic_add(atomic_t *val, int i) |
{ |
long tmp, v; |
asm volatile ( |
"1:\n" |
" ll %0, %1\n" |
" addu %0, %0, %3\n" /* same as addi, but never traps on overflow */ |
" move %2, %0\n" |
" addu %0, %0, %3\n" /* same as addi, but never traps on overflow */ |
" move %2, %0\n" |
" sc %0, %1\n" |
" beq %0, %4, 1b\n" /* if the atomic operation failed, try again */ |
" beq %0, %4, 1b\n" /* if the atomic operation failed, try again */ |
" nop\n" |
: "=&r" (tmp), "+m" (val->count), "=&r" (v) |
: "r" (i), "i" (0) |
); |
return v; |
} |
); |
static inline uint32_t test_and_set(atomic_t *val) { |
uint32_t tmp, v; |
asm volatile ( |
"1:\n" |
" ll %2, %1\n" |
" bnez %2, 2f\n" |
" li %0, %3\n" |
" sc %0, %1\n" |
" beqz %0, 1b\n" |
"2:\n" |
: "=&r" (tmp), "+m" (val->count), "=&r" (v) |
: "i" (1) |
); |
return v; |
} |
/branches/arm/kernel/arch/mips32/include/types.h |
---|
46,6 → 46,8 |
typedef unsigned long long uint64_t; |
typedef uint32_t size_t; |
typedef uint32_t count_t; |
typedef uint32_t index_t; |
typedef uint32_t uintptr_t; |
typedef uint32_t pfn_t; |
55,11 → 57,10 |
typedef uint32_t unative_t; |
typedef int32_t native_t; |
typedef struct { |
} fncptr_t; |
#define PRIp "x" /**< Format for uintptr_t. */ |
#define PRIs "u" /**< Format for size_t. */ |
#define PRIc "u" /**< Format for count_t. */ |
#define PRIi "u" /**< Format for index_t. */ |
#define PRId8 "d" /**< Format for int8_t. */ |
#define PRId16 "d" /**< Format for int16_t. */ |
/branches/arm/kernel/arch/mips32/include/byteorder.h |
---|
0,0 → 1,47 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_mips32_BYTEORDER_H_ |
#define KERN_mips32_BYTEORDER_H_ |
#ifdef BIG_ENDIAN |
#define ARCH_IS_BIG_ENDIAN |
#else |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/mips32/include/context_offset.h |
---|
76,17 → 76,26 |
#define EOFFSET_T5 0x30 |
#define EOFFSET_T6 0x34 |
#define EOFFSET_T7 0x38 |
#define EOFFSET_T8 0x3c |
#define EOFFSET_T9 0x40 |
#define EOFFSET_GP 0x44 |
#define EOFFSET_SP 0x48 |
#define EOFFSET_RA 0x4c |
#define EOFFSET_LO 0x50 |
#define EOFFSET_HI 0x54 |
#define EOFFSET_STATUS 0x58 |
#define EOFFSET_EPC 0x5c |
#define EOFFSET_K1 0x60 |
#define REGISTER_SPACE 104 /* respect stack alignment */ |
#define EOFFSET_S0 0x3c |
#define EOFFSET_S1 0x40 |
#define EOFFSET_S2 0x44 |
#define EOFFSET_S3 0x48 |
#define EOFFSET_S4 0x4c |
#define EOFFSET_S5 0x50 |
#define EOFFSET_S6 0x54 |
#define EOFFSET_S7 0x58 |
#define EOFFSET_T8 0x5c |
#define EOFFSET_T9 0x60 |
#define EOFFSET_GP 0x64 |
#define EOFFSET_SP 0x68 |
#define EOFFSET_S8 0x6c |
#define EOFFSET_RA 0x70 |
#define EOFFSET_LO 0x74 |
#define EOFFSET_HI 0x78 |
#define EOFFSET_STATUS 0x7c |
#define EOFFSET_EPC 0x80 |
#define EOFFSET_K1 0x84 |
#define REGISTER_SPACE 136 |
#ifdef __ASM__ |
105,10 → 114,10 |
sw $s8,OFFSET_S8(\ctx) |
sw $gp,OFFSET_GP(\ctx) |
#ifndef KERNEL |
#ifndef KERNEL |
sw $k1,OFFSET_TLS(\ctx) |
#ifdef CONFIG_FPU |
# ifdef CONFIG_MIPS_FPU |
mfc1 $t0,$20 |
sw $t0, OFFSET_F20(\ctx) |
141,7 → 150,7 |
mfc1 $t0,$30 |
sw $t0, OFFSET_F30(\ctx) |
#endif /* CONFIG_FPU */ |
# endif /* CONFIG_MIPS_FPU */ |
#endif /* KERNEL */ |
sw $ra,OFFSET_PC(\ctx) |
163,7 → 172,7 |
#ifndef KERNEL |
lw $k1,OFFSET_TLS(\ctx) |
#ifdef CONFIG_FPU |
# ifdef CONFIG_MIPS_FPU |
lw $t0, OFFSET_F20(\ctx) |
mtc1 $t0,$20 |
196,9 → 205,9 |
lw $t0, OFFSET_F30(\ctx) |
mtc1 $t0,$30 |
#endif /* CONFIG_FPU */ |
# endif /* CONFIG_MIPS_FPU */ |
#endif /* KERNEL */ |
lw $ra,OFFSET_PC(\ctx) |
lw $sp,OFFSET_SP(\ctx) |
.endm |
/branches/arm/kernel/arch/mips32/include/smp/dorder.h |
---|
File deleted |
/branches/arm/kernel/arch/mips32/include/smp/order.h |
---|
0,0 → 1,34 |
/* |
* Copyright (c) 2007 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef KERN_mips32_ORDER_H_ |
#define KERN_mips32_ORDER_H_ |
extern void ipi_broadcast_arch(int ipi); |
#endif |
/branches/arm/kernel/arch/mips32/include/interrupt.h |
---|
38,11 → 38,9 |
#include <typedefs.h> |
#include <arch/exception.h> |
#define IVT_ITEMS 32 |
#define IVT_FIRST 0 |
#define IVT_ITEMS 32 |
#define IVT_FIRST 0 |
#define VECTOR_TLB_SHOOTDOWN_IPI EXC_Int |
extern function virtual_timer_fnc; |
extern uint32_t count_hi; |
/branches/arm/kernel/arch/mips32/include/exception.h |
---|
73,10 → 73,19 |
uint32_t t5; |
uint32_t t6; |
uint32_t t7; |
uint32_t s0; |
uint32_t s1; |
uint32_t s2; |
uint32_t s3; |
uint32_t s4; |
uint32_t s5; |
uint32_t s6; |
uint32_t s7; |
uint32_t t8; |
uint32_t t9; |
uint32_t gp; |
uint32_t sp; |
uint32_t s8; |
uint32_t ra; |
uint32_t lo; |
/branches/arm/kernel/arch/mips32/include/asm.h |
---|
36,7 → 36,6 |
#define KERN_mips32_ASM_H_ |
#include <arch/types.h> |
#include <typedefs.h> |
#include <config.h> |
56,11 → 55,7 |
{ |
uintptr_t v; |
asm volatile ( |
"and %0, $29, %1\n" |
: "=r" (v) |
: "r" (~(STACK_SIZE-1)) |
); |
asm volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
return v; |
} |
68,44 → 63,13 |
extern void cpu_halt(void); |
extern void asm_delay_loop(uint32_t t); |
extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg, |
uintptr_t entry); |
uintptr_t entry); |
extern ipl_t interrupts_disable(void); |
extern ipl_t interrupts_enable(void); |
extern void interrupts_restore(ipl_t ipl); |
extern ipl_t interrupts_read(void); |
extern void asm_delay_loop(uint32_t t); |
static inline void pio_write_8(ioport8_t *port, uint8_t v) |
{ |
*port = v; |
} |
static inline void pio_write_16(ioport16_t *port, uint16_t v) |
{ |
*port = v; |
} |
static inline void pio_write_32(ioport32_t *port, uint32_t v) |
{ |
*port = v; |
} |
static inline uint8_t pio_read_8(ioport8_t *port) |
{ |
return *port; |
} |
static inline uint16_t pio_read_16(ioport16_t *port) |
{ |
return *port; |
} |
static inline uint32_t pio_read_32(ioport32_t *port) |
{ |
return *port; |
} |
#endif |
/** @} |
/branches/arm/kernel/arch/mips32/include/debugger.h |
---|
53,7 → 53,7 |
unative_t instruction; /**< Original instruction */ |
unative_t nextinstruction; /**< Original instruction following break */ |
int flags; /**< Flags regarding breakpoint */ |
size_t counter; |
count_t counter; |
void (*bkfunc)(void *b, istate_t *istate); |
} bpinfo_t; |
/branches/arm/kernel/arch/mips32/include/cpu.h |
---|
42,7 → 42,7 |
uint32_t imp_num; |
uint32_t rev_num; |
} cpu_arch_t; |
#endif |
/** @} |
/branches/arm/kernel/arch/mips32/include/asm/boot.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
/branches/arm/kernel/arch/mips32/include/console.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_mips32_CONSOLE_H_ |
#define KERN_mips32_CONSOLE_H_ |
extern void console_init(devno_t devno); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/mips32/include/boot.h |
---|
0,0 → 1,48 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef KERN_mips32_BOOT_H_ |
#define KERN_mips32_BOOT_H_ |
#define TASKMAP_MAX_RECORDS 32 |
#include <arch/types.h> |
typedef struct { |
uintptr_t addr; |
uint32_t size; |
} utask_t; |
typedef struct { |
uint32_t cnt; |
utask_t tasks[TASKMAP_MAX_RECORDS]; |
} bootinfo_t; |
extern bootinfo_t bootinfo; |
#endif |
/branches/arm/kernel/arch/mips32/include/elf.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
35,15 → 35,15 |
#ifndef KERN_mips32_ELF_H_ |
#define KERN_mips32_ELF_H_ |
#define ELF_MACHINE EM_MIPS |
#define ELF_MACHINE EM_MIPS |
#ifdef __BE__ |
#define ELF_DATA_ENCODING ELFDATA2MSB |
#ifdef BIG_ENDIAN |
# define ELF_DATA_ENCODING ELFDATA2MSB |
#else |
#define ELF_DATA_ENCODING ELFDATA2LSB |
# define ELF_DATA_ENCODING ELFDATA2LSB |
#endif |
#define ELF_CLASS ELFCLASS32 |
#define ELF_CLASS ELFCLASS32 |
#endif |
/branches/arm/kernel/arch/mips32/include/arch.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32 |
/** @addtogroup mips32 |
* @{ |
*/ |
/** @file |
35,29 → 35,6 |
#ifndef KERN_mips32_ARCH_H_ |
#define KERN_mips32_ARCH_H_ |
#define TASKMAP_MAX_RECORDS 32 |
#define CPUMAP_MAX_RECORDS 32 |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
#include <typedefs.h> |
extern size_t cpu_count; |
typedef struct { |
uintptr_t addr; |
uint32_t size; |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} utask_t; |
typedef struct { |
uint32_t cpumap; |
uint32_t cnt; |
utask_t tasks[TASKMAP_MAX_RECORDS]; |
} bootinfo_t; |
extern void arch_pre_main(void *entry, bootinfo_t *bootinfo); |
#endif |
/** @} |
/branches/arm/kernel/arch/mips32/_link.ld.in |
---|
1,17 → 1,15 |
/* |
* MIPS32 linker script |
* |
* MIPS32 linker script |
* |
* kernel text |
* kernel data |
* |
* |
*/ |
#undef mips |
#define mips mips |
#define KERNEL_LOAD_ADDRESS 0x80100000 |
OUTPUT_ARCH(mips) |
OUTPUT_ARCH(mips) |
ENTRY(kernel_image_start) |
SECTIONS { |
23,9 → 21,9 |
} |
.data : { |
kdata_start = .; |
*(.data); /* initialized data */ |
*(.data); /* initialized data */ |
hardcoded_ktext_size = .; |
LONG(ktext_end - ktext_start); |
LONG(ktext_end - ktext_start); |
hardcoded_kdata_size = .; |
LONG(kdata_end - kdata_start); |
hardcoded_load_address = .; |
35,21 → 33,21 |
*(.reginfo); |
*(.sbss); |
*(.scommon); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
symbol_table = .; |
*(symtab.*); |
*(symtab.*); |
} |
_gp = . + 0x8000; |
.lit8 : { *(.lit8) } |
.lit4 : { *(.lit4) } |
kdata_end = .; |
/DISCARD/ : { |
*(.mdebug*); |
*(.pdr); |
*(.comment); |
*(.note); |
*(.mdebug*); |
*(.pdr); |
*(.comment); |
*(.note); |
} |
} |
/branches/arm/kernel/arch/ia64/Makefile.inc |
---|
29,6 → 29,10 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf64-little |
BFD_ARCH = ia64-elf64 |
TARGET = ia64-pc-linux-gnu |
41,35 → 45,56 |
LFLAGS += -EL |
AFLAGS += -mconstant-gp |
BITS = 64 |
ENDIANESS = LE |
DEFS += -D__64_BITS__ -D$(MACHINE) |
## Compile with page hash table support. |
# |
CONFIG_PAGE_HT = y |
DEFS += -DCONFIG_PAGE_HT |
## Compile with support for address space identifiers. |
# |
CONFIG_ASID = y |
CONFIG_ASID_FIFO = y |
## Compile with support for software integer division. |
# |
CONFIG_SOFTINT = y |
ARCH_SOURCES = \ |
arch/$(KARCH)/src/start.S \ |
arch/$(KARCH)/src/asm.S \ |
arch/$(KARCH)/src/dummy.s \ |
arch/$(KARCH)/src/ia64.c \ |
arch/$(KARCH)/src/fpu_context.c \ |
arch/$(KARCH)/src/context.S \ |
arch/$(KARCH)/src/cpu/cpu.c \ |
arch/$(KARCH)/src/ivt.S \ |
arch/$(KARCH)/src/interrupt.c \ |
arch/$(KARCH)/src/mm/as.c \ |
arch/$(KARCH)/src/mm/frame.c \ |
arch/$(KARCH)/src/mm/page.c \ |
arch/$(KARCH)/src/mm/tlb.c \ |
arch/$(KARCH)/src/mm/vhpt.c \ |
arch/$(KARCH)/src/proc/scheduler.c \ |
arch/$(KARCH)/src/ddi/ddi.c \ |
arch/$(KARCH)/src/smp/smp.c \ |
arch/$(KARCH)/src/drivers/it.c |
arch/$(ARCH)/src/start.S \ |
arch/$(ARCH)/src/asm.S \ |
arch/$(ARCH)/src/dummy.s \ |
arch/$(ARCH)/src/ia64.c \ |
arch/$(ARCH)/src/fpu_context.c \ |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/ivt.S \ |
arch/$(ARCH)/src/interrupt.c \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/mm/vhpt.c \ |
arch/$(ARCH)/src/proc/scheduler.c \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/drivers/it.c |
ifeq ($(MACHINE),ski) |
ARCH_SOURCES += arch/$(KARCH)/src/drivers/ski.c |
ARCH_SOURCES += arch/$(ARCH)/src/ski/ski.c |
DEFS += -DSKI |
# BFD = elf64-ia64-little |
BFD = binary |
endif |
ifeq ($(MACHINE),i460GX) |
DEFS += -DI460GX |
ARCH_SOURCES += arch/$(ARCH)/src/drivers/ega.c |
CONFIG_I8042 = y |
DEFS += -DI460GX -DCONFIG_I8042 |
BFD = binary |
endif |
/branches/arm/kernel/arch/ia64/src/smp/smp.c |
---|
File deleted |
/branches/arm/kernel/arch/ia64/src/asm.S |
---|
51,7 → 51,7 |
adds r14 = 7, in1 |
mov r2 = ar.lc |
mov r8 = in0 ;; |
mov r8 = in0 |
and r14 = -8, r14 ;; |
cmp.ne p6, p7 = r14, in1 |
(p7) br.cond.dpnt 3f ;; |
128,10 → 128,6 |
memsetb: |
br _memsetb |
.global memsetw |
memsetw: |
br _memsetw |
.global cpu_halt |
cpu_halt: |
br cpu_halt |
/branches/arm/kernel/arch/ia64/src/mm/vhpt.c |
---|
41,8 → 41,7 |
uintptr_t vhpt_set_up(void) |
{ |
vhpt_base = frame_alloc(VHPT_WIDTH - FRAME_WIDTH, |
FRAME_KA | FRAME_ATOMIC); |
vhpt_base = frame_alloc(VHPT_WIDTH - FRAME_WIDTH, FRAME_KA | FRAME_ATOMIC); |
if (!vhpt_base) |
panic("Kernel configured with VHPT but no memory for table."); |
vhpt_invalidate_all(); |
53,7 → 52,7 |
void vhpt_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry) |
{ |
region_register rr_save, rr; |
size_t vrn; |
index_t vrn; |
rid_t rid; |
uint64_t tag; |
/branches/arm/kernel/arch/ia64/src/mm/tlb.c |
---|
92,7 → 92,7 |
/** Invalidate entries belonging to an address space. |
* |
* @param asid Address space identifier. |
* @param asid Address space identifier. |
*/ |
void tlb_invalidate_asid(asid_t asid) |
{ |
100,7 → 100,7 |
} |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt) |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
{ |
region_register rr; |
bool restore_rr = false; |
131,45 → 131,59 |
uint64_t ps; |
switch (b) { |
case 0: /* cnt 1 - 3 */ |
case 0: /*cnt 1-3*/ |
ps = PAGE_WIDTH; |
break; |
case 1: /* cnt 4 - 15 */ |
ps = PAGE_WIDTH + 2; |
va &= ~((1 << ps) - 1); |
case 1: /*cnt 4-15*/ |
/*cnt=((cnt-1)/4)+1;*/ |
ps = PAGE_WIDTH+2; |
va &= ~((1<<ps)-1); |
break; |
case 2: /* cnt 16 - 63 */ |
ps = PAGE_WIDTH + 4; |
va &= ~((1 << ps) - 1); |
case 2: /*cnt 16-63*/ |
/*cnt=((cnt-1)/16)+1;*/ |
ps = PAGE_WIDTH+4; |
va &= ~((1<<ps)-1); |
break; |
case 3: /* cnt 64 - 255 */ |
ps = PAGE_WIDTH + 6; |
va &= ~((1 << ps) - 1); |
case 3: /*cnt 64-255*/ |
/*cnt=((cnt-1)/64)+1;*/ |
ps = PAGE_WIDTH+6; |
va &= ~((1<<ps)-1); |
break; |
case 4: /* cnt 256 - 1023 */ |
ps = PAGE_WIDTH + 8; |
va &= ~((1 << ps) - 1); |
case 4: /*cnt 256-1023*/ |
/*cnt=((cnt-1)/256)+1;*/ |
ps = PAGE_WIDTH+8; |
va &= ~((1<<ps)-1); |
break; |
case 5: /* cnt 1024 - 4095 */ |
ps = PAGE_WIDTH + 10; |
va &= ~((1 << ps) - 1); |
case 5: /*cnt 1024-4095*/ |
/*cnt=((cnt-1)/1024)+1;*/ |
ps = PAGE_WIDTH+10; |
va &= ~((1<<ps)-1); |
break; |
case 6: /* cnt 4096 - 16383 */ |
ps = PAGE_WIDTH + 12; |
va &= ~((1 << ps) - 1); |
case 6: /*cnt 4096-16383*/ |
/*cnt=((cnt-1)/4096)+1;*/ |
ps = PAGE_WIDTH+12; |
va &= ~((1<<ps)-1); |
break; |
case 7: /* cnt 16384 - 65535 */ |
case 8: /* cnt 65536 - (256K - 1) */ |
ps = PAGE_WIDTH + 14; |
va &= ~((1 << ps) - 1); |
case 7: /*cnt 16384-65535*/ |
case 8: /*cnt 65536-(256K-1)*/ |
/*cnt=((cnt-1)/16384)+1;*/ |
ps = PAGE_WIDTH+14; |
va &= ~((1<<ps)-1); |
break; |
default: |
ps = PAGE_WIDTH + 18; |
va &= ~((1 << ps) - 1); |
/*cnt=((cnt-1)/(16384*16))+1;*/ |
ps=PAGE_WIDTH+18; |
va&=~((1<<ps)-1); |
break; |
} |
for(; va < (page + cnt * PAGE_SIZE); va += (1 << ps)) |
asm volatile ("ptc.l %0, %1;;" :: "r" (va), "r" (ps << 2)); |
/*cnt+=(page!=va);*/ |
for(; va<(page+cnt*(PAGE_SIZE)); va += (1<<ps)) { |
asm volatile ( |
"ptc.l %0,%1;;" |
: |
: "r" (va), "r" (ps<<2) |
); |
} |
srlz_d(); |
srlz_i(); |
182,10 → 196,9 |
/** Insert data into data translation cache. |
* |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion |
* format. |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion format. |
*/ |
void dtc_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry) |
{ |
194,10 → 207,9 |
/** Insert data into instruction translation cache. |
* |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion |
* format. |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion format. |
*/ |
void itc_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry) |
{ |
206,12 → 218,10 |
/** Insert data into instruction or data translation cache. |
* |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion |
* format. |
* @param dtc If true, insert into data translation cache, use |
* instruction translation cache otherwise. |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion format. |
* @param dtc If true, insert into data translation cache, use instruction translation cache otherwise. |
*/ |
void tc_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, bool dtc) |
{ |
234,20 → 244,19 |
} |
asm volatile ( |
"mov r8 = psr;;\n" |
"mov r8=psr;;\n" |
"rsm %0;;\n" /* PSR_IC_MASK */ |
"srlz.d;;\n" |
"srlz.i;;\n" |
"mov cr.ifa = %1\n" /* va */ |
"mov cr.itir = %2;;\n" /* entry.word[1] */ |
"cmp.eq p6,p7 = %4,r0;;\n" /* decide between itc and dtc */ |
"mov cr.ifa=%1\n" /* va */ |
"mov cr.itir=%2;;\n" /* entry.word[1] */ |
"cmp.eq p6,p7 = %4,r0;;\n" /* decide between itc and dtc */ |
"(p6) itc.i %3;;\n" |
"(p7) itc.d %3;;\n" |
"mov psr.l = r8;;\n" |
"mov psr.l=r8;;\n" |
"srlz.d;;\n" |
: |
: "i" (PSR_IC_MASK), "r" (va), "r" (entry.word[1]), |
"r" (entry.word[0]), "r" (dtc) |
: "i" (PSR_IC_MASK), "r" (va), "r" (entry.word[1]), "r" (entry.word[0]), "r" (dtc) |
: "p6", "p7", "r8" |
); |
260,14 → 269,12 |
/** Insert data into instruction translation register. |
* |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion |
* format. |
* @param tr Translation register. |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion format. |
* @param tr Translation register. |
*/ |
void |
itr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, size_t tr) |
void itr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, index_t tr) |
{ |
tr_mapping_insert(va, asid, entry, false, tr); |
} |
274,14 → 281,12 |
/** Insert data into data translation register. |
* |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion |
* format. |
* @param tr Translation register. |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion format. |
* @param tr Translation register. |
*/ |
void |
dtr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, size_t tr) |
void dtr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, index_t tr) |
{ |
tr_mapping_insert(va, asid, entry, true, tr); |
} |
288,17 → 293,13 |
/** Insert data into instruction or data translation register. |
* |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion |
* format. |
* @param dtr If true, insert into data translation register, use |
* instruction translation register otherwise. |
* @param tr Translation register. |
* @param va Virtual page address. |
* @param asid Address space identifier. |
* @param entry The rest of TLB entry as required by TLB insertion format. |
* @param dtr If true, insert into data translation register, use instruction translation register otherwise. |
* @param tr Translation register. |
*/ |
void |
tr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, bool dtr, |
size_t tr) |
void tr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, bool dtr, index_t tr) |
{ |
region_register rr; |
bool restore_rr = false; |
319,20 → 320,19 |
} |
asm volatile ( |
"mov r8 = psr;;\n" |
"mov r8=psr;;\n" |
"rsm %0;;\n" /* PSR_IC_MASK */ |
"srlz.d;;\n" |
"srlz.i;;\n" |
"mov cr.ifa = %1\n" /* va */ |
"mov cr.itir = %2;;\n" /* entry.word[1] */ |
"cmp.eq p6,p7 = %5,r0;;\n" /* decide between itr and dtr */ |
"(p6) itr.i itr[%4] = %3;;\n" |
"(p7) itr.d dtr[%4] = %3;;\n" |
"mov psr.l = r8;;\n" |
"mov cr.ifa=%1\n" /* va */ |
"mov cr.itir=%2;;\n" /* entry.word[1] */ |
"cmp.eq p6,p7=%5,r0;;\n" /* decide between itr and dtr */ |
"(p6) itr.i itr[%4]=%3;;\n" |
"(p7) itr.d dtr[%4]=%3;;\n" |
"mov psr.l=r8;;\n" |
"srlz.d;;\n" |
: |
: "i" (PSR_IC_MASK), "r" (va), "r" (entry.word[1]), |
"r" (entry.word[0]), "r" (tr), "r" (dtr) |
: "i" (PSR_IC_MASK), "r" (va), "r" (entry.word[1]), "r" (entry.word[0]), "r" (tr), "r" (dtr) |
: "p6", "p7", "r8" |
); |
345,15 → 345,12 |
/** Insert data into DTLB. |
* |
* @param page Virtual page address including VRN bits. |
* @param frame Physical frame address. |
* @param dtr If true, insert into data translation register, use data |
* translation cache otherwise. |
* @param tr Translation register if dtr is true, ignored otherwise. |
* @param page Virtual page address including VRN bits. |
* @param frame Physical frame address. |
* @param dtr If true, insert into data translation register, use data translation cache otherwise. |
* @param tr Translation register if dtr is true, ignored otherwise. |
*/ |
void |
dtlb_kernel_mapping_insert(uintptr_t page, uintptr_t frame, bool dtr, |
size_t tr) |
void dtlb_kernel_mapping_insert(uintptr_t page, uintptr_t frame, bool dtr, index_t tr) |
{ |
tlb_entry_t entry; |
379,18 → 376,18 |
* |
* Purge DTR entries used by the kernel. |
* |
* @param page Virtual page address including VRN bits. |
* @param width Width of the purge in bits. |
* @param page Virtual page address including VRN bits. |
* @param width Width of the purge in bits. |
*/ |
void dtr_purge(uintptr_t page, size_t width) |
void dtr_purge(uintptr_t page, count_t width) |
{ |
asm volatile ("ptr.d %0, %1\n" : : "r" (page), "r" (width << 2)); |
asm volatile ("ptr.d %0, %1\n" : : "r" (page), "r" (width<<2)); |
} |
/** Copy content of PTE into data translation cache. |
* |
* @param t PTE. |
* @param t PTE. |
*/ |
void dtc_pte_copy(pte_t *t) |
{ |
416,7 → 413,7 |
/** Copy content of PTE into instruction translation cache. |
* |
* @param t PTE. |
* @param t PTE. |
*/ |
void itc_pte_copy(pte_t *t) |
{ |
443,8 → 440,8 |
/** Instruction TLB fault handler for faults with VHPT turned off. |
* |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
*/ |
void alternate_instruction_tlb_fault(uint64_t vector, istate_t *istate) |
{ |
472,77 → 469,16 |
*/ |
page_table_unlock(AS, true); |
if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate,"Page fault at %p.",va); |
panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
istate->cr_iip); |
fault_if_from_uspace(istate,"Page fault at %p",va); |
panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip); |
} |
} |
} |
static int is_io_page_accessible(int page) |
{ |
if (TASK->arch.iomap) |
return bitmap_get(TASK->arch.iomap, page); |
else |
return 0; |
} |
#define IO_FRAME_BASE 0xFFFFC000000 |
/** |
* There is special handling of memory mapped legacy io, because of 4KB sized |
* access for userspace. |
* |
* @param va Virtual address of page fault. |
* @param istate Structure with saved interruption state. |
* |
* @return One on success, zero on failure. |
*/ |
static int try_memmap_io_insertion(uintptr_t va, istate_t *istate) |
{ |
if ((va >= IO_OFFSET ) && (va < IO_OFFSET + (1 << IO_PAGE_WIDTH))) { |
if (TASK) { |
uint64_t io_page = (va & ((1 << IO_PAGE_WIDTH) - 1)) >> |
USPACE_IO_PAGE_WIDTH; |
if (is_io_page_accessible(io_page)) { |
uint64_t page, frame; |
page = IO_OFFSET + |
(1 << USPACE_IO_PAGE_WIDTH) * io_page; |
frame = IO_FRAME_BASE + |
(1 << USPACE_IO_PAGE_WIDTH) * io_page; |
tlb_entry_t entry; |
entry.word[0] = 0; |
entry.word[1] = 0; |
entry.p = true; /* present */ |
entry.ma = MA_UNCACHEABLE; |
entry.a = true; /* already accessed */ |
entry.d = true; /* already dirty */ |
entry.pl = PL_USER; |
entry.ar = AR_READ | AR_WRITE; |
entry.ppn = frame >> PPN_SHIFT; |
entry.ps = USPACE_IO_PAGE_WIDTH; |
dtc_mapping_insert(page, TASK->as->asid, entry); |
return 1; |
} else { |
fault_if_from_uspace(istate, |
"IO access fault at %p.", va); |
} |
} |
} |
return 0; |
} |
/** Data TLB fault handler for faults with VHPT turned off. |
* |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
*/ |
void alternate_data_tlb_fault(uint64_t vector, istate_t *istate) |
{ |
575,17 → 511,13 |
dtc_pte_copy(t); |
page_table_unlock(AS, true); |
} else { |
page_table_unlock(AS, true); |
if (try_memmap_io_insertion(va, istate)) |
return; |
/* |
* Forward the page fault to the address space page fault |
* handler. |
* Forward the page fault to the address space page fault handler. |
*/ |
page_table_unlock(AS, true); |
if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate,"Page fault at %p.",va); |
panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
istate->cr_iip); |
fault_if_from_uspace(istate,"Page fault at %p",va); |
panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip); |
} |
} |
} |
594,18 → 526,18 |
* |
* This fault should not occur. |
* |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
*/ |
void data_nested_tlb_fault(uint64_t vector, istate_t *istate) |
{ |
panic("%s.", __func__); |
panic("%s\n", __func__); |
} |
/** Data Dirty bit fault handler. |
* |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
*/ |
void data_dirty_bit_fault(uint64_t vector, istate_t *istate) |
{ |
630,9 → 562,10 |
dtc_pte_copy(t); |
} else { |
if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate,"Page fault at %p.",va); |
panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
istate->cr_iip); |
fault_if_from_uspace(istate,"Page fault at %p",va); |
panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip); |
t->d = true; |
dtc_pte_copy(t); |
} |
} |
page_table_unlock(AS, true); |
640,8 → 573,8 |
/** Instruction access bit fault handler. |
* |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
*/ |
void instruction_access_bit_fault(uint64_t vector, istate_t *istate) |
{ |
666,9 → 599,10 |
itc_pte_copy(t); |
} else { |
if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate, "Page fault at %p.", va); |
panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
istate->cr_iip); |
fault_if_from_uspace(istate,"Page fault at %p",va); |
panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip); |
t->a = true; |
itc_pte_copy(t); |
} |
} |
page_table_unlock(AS, true); |
702,45 → 636,15 |
dtc_pte_copy(t); |
} else { |
if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate, "Page fault at %p.", va); |
panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
istate->cr_iip); |
fault_if_from_uspace(istate,"Page fault at %p",va); |
panic("%s: va=%p, rid=%d, iip=%p\n", __func__, va, rid, istate->cr_iip); |
t->a = true; |
itc_pte_copy(t); |
} |
} |
page_table_unlock(AS, true); |
} |
/** Data access rights fault handler. |
* |
* @param vector Interruption vector. |
* @param istate Structure with saved interruption state. |
*/ |
void data_access_rights_fault(uint64_t vector, istate_t *istate) |
{ |
region_register rr; |
rid_t rid; |
uintptr_t va; |
pte_t *t; |
va = istate->cr_ifa; /* faulting address */ |
rr.word = rr_read(VA2VRN(va)); |
rid = rr.map.rid; |
/* |
* Assume a write to a read-only page. |
*/ |
page_table_lock(AS, true); |
t = page_mapping_find(AS, va); |
ASSERT(t && t->p); |
ASSERT(!t->w); |
if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate, "Page fault at %p.", va); |
panic("%s: va=%p, rid=%d, iip=%p.", __func__, va, rid, |
istate->cr_iip); |
} |
page_table_unlock(AS, true); |
} |
/** Page not present fault handler. |
* |
* @param vector Interruption vector. |
774,19 → 678,11 |
} else { |
page_table_unlock(AS, true); |
if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate, "Page fault at %p.", va); |
panic("%s: va=%p, rid=%d.", __func__, va, rid); |
fault_if_from_uspace(istate,"Page fault at %p",va); |
panic("%s: va=%p, rid=%d\n", __func__, va, rid); |
} |
} |
} |
void tlb_arch_init(void) |
{ |
} |
void tlb_print(void) |
{ |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/src/mm/frame.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64mm |
/** @addtogroup ia64mm |
* @{ |
*/ |
/** @file |
36,55 → 36,26 |
#include <mm/frame.h> |
#include <config.h> |
#include <panic.h> |
#include <arch/bootinfo.h> |
#include <align.h> |
#include <macros.h> |
#define KERNEL_RESERVED_AREA_BASE (0x4400000) |
#define KERNEL_RESERVED_AREA_SIZE (16 * 1024 * 1024) |
/* |
* This is Ski-specific and certainly not sufficient |
* for real ia64 systems that provide memory map. |
*/ |
#define MEMORY_SIZE (64 * 1024 * 1024) |
#define MEMORY_BASE (64 * 1024 * 1024) |
#define ROM_BASE 0xa0000 /* for simulators */ |
#define ROM_SIZE (384 * 1024) /* for simulators */ |
#define MIN_ZONE_SIZE (64 * 1024) |
#define MINCONF 1 |
uintptr_t last_frame = 0; |
#define ROM_BASE 0xa0000 //For ski |
#define ROM_SIZE (384 * 1024) //For ski |
void poke_char(int x,int y,char ch, char c); |
void frame_arch_init(void) |
{ |
if (config.cpu_active == 1) { |
unsigned int i; |
for (i = 0; i < bootinfo->memmap_items; i++) { |
if (bootinfo->memmap[i].type == EFI_MEMMAP_FREE_MEM) { |
uint64_t base = bootinfo->memmap[i].base; |
uint64_t size = bootinfo->memmap[i].size; |
uint64_t abase = ALIGN_UP(base, FRAME_SIZE); |
if (size > FRAME_SIZE) |
size -= abase - base; |
if (size > MIN_ZONE_SIZE) { |
zone_create(abase >> FRAME_WIDTH, |
size >> FRAME_WIDTH, |
max(MINCONF, abase >> FRAME_WIDTH), |
0); |
} |
if (abase + size > last_frame) |
last_frame = abase + size; |
} |
} |
/* |
* Blacklist ROM regions. |
*/ |
frame_mark_unavailable(ADDR2PFN(ROM_BASE), |
SIZE2FRAMES(ROM_SIZE)); |
frame_mark_unavailable(ADDR2PFN(KERNEL_RESERVED_AREA_BASE), |
SIZE2FRAMES(KERNEL_RESERVED_AREA_SIZE)); |
} |
zone_create(MEMORY_BASE >> FRAME_WIDTH, SIZE2FRAMES(MEMORY_SIZE), (MEMORY_SIZE) >> FRAME_WIDTH, 0); |
/* |
* Blacklist ROM regions. |
*/ |
frame_mark_unavailable(ADDR2PFN(ROM_BASE), SIZE2FRAMES(ROM_SIZE)); |
} |
/** @} |
/branches/arm/kernel/arch/ia64/src/mm/as.c |
---|
68,7 → 68,7 |
continue; |
rr.word = rr_read(i); |
rr.map.ve = false; /* disable VHPT walker */ |
rr.map.ve = false; /* disable VHPT walker */ |
rr.map.rid = ASID2RID(as->asid, i); |
rr.map.ps = PAGE_WIDTH; |
rr_write(i, rr.word); |
/branches/arm/kernel/arch/ia64/src/mm/page.c |
---|
27,7 → 27,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64mm |
/** @addtogroup ia64mm |
* @{ |
*/ |
/** @file |
47,7 → 47,6 |
#include <arch/asm.h> |
#include <arch/barrier.h> |
#include <memstr.h> |
#include <align.h> |
static void set_environment(void); |
63,9 → 62,9 |
void set_environment(void) |
{ |
region_register rr; |
pta_register pta; |
pta_register pta; |
int i; |
#ifdef CONFIG_VHPT |
#ifdef CONFIG_VHPT |
uintptr_t vhpt_base; |
#endif |
123,15 → 122,15 |
* |
* Interrupts must be disabled. |
* |
* @param page Address of virtual page including VRN bits. |
* @param asid Address space identifier. |
* @param page Address of virtual page including VRN bits. |
* @param asid Address space identifier. |
* |
* @return VHPT entry address. |
* @return VHPT entry address. |
*/ |
vhpt_entry_t *vhpt_hash(uintptr_t page, asid_t asid) |
{ |
region_register rr_save, rr; |
size_t vrn; |
index_t vrn; |
rid_t rid; |
vhpt_entry_t *v; |
167,16 → 166,15 |
* |
* Interrupts must be disabled. |
* |
* @param page Address of virtual page including VRN bits. |
* @param asid Address space identifier. |
* @param page Address of virtual page including VRN bits. |
* @param asid Address space identifier. |
* |
* @return True if page and asid match the page and asid of t, |
* false otherwise. |
* @return True if page and asid match the page and asid of t, false otherwise. |
*/ |
bool vhpt_compare(uintptr_t page, asid_t asid, vhpt_entry_t *v) |
{ |
region_register rr_save, rr; |
size_t vrn; |
index_t vrn; |
rid_t rid; |
bool match; |
212,18 → 210,15 |
/** Set up one VHPT entry. |
* |
* @param v VHPT entry to be set up. |
* @param page Virtual address of the page mapped by the entry. |
* @param asid Address space identifier of the address space to which |
* page belongs. |
* @param frame Physical address of the frame to wich page is mapped. |
* @param flags Different flags for the mapping. |
* @param page Virtual address of the page mapped by the entry. |
* @param asid Address space identifier of the address space to which page belongs. |
* @param frame Physical address of the frame to wich page is mapped. |
* @param flags Different flags for the mapping. |
*/ |
void |
vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame, |
int flags) |
void vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame, int flags) |
{ |
region_register rr_save, rr; |
size_t vrn; |
index_t vrn; |
rid_t rid; |
uint64_t tag; |
254,8 → 249,7 |
v->word[3] = 0; |
v->present.p = true; |
v->present.ma = (flags & PAGE_CACHEABLE) ? |
MA_WRITEBACK : MA_UNCACHEABLE; |
v->present.ma = (flags & PAGE_CACHEABLE) ? MA_WRITEBACK : MA_UNCACHEABLE; |
v->present.a = false; /* not accessed */ |
v->present.d = false; /* not dirty */ |
v->present.pl = (flags & PAGE_USER) ? PL_USER : PL_KERNEL; |
268,11 → 262,5 |
v->present.tag.tag_word = tag; |
} |
uintptr_t hw_map(uintptr_t physaddr, size_t size __attribute__ ((unused))) |
{ |
/* THIS is a dirty hack. */ |
return (uintptr_t)((uint64_t)(PA2KA(physaddr)) + VIO_OFFSET); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/src/drivers/ski.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/arch/ia64/src/drivers/ega.c |
---|
0,0 → 1,139 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
* @{ |
*/ |
/** |
* @file |
* @brief EGA driver. |
*/ |
#include <putchar.h> |
#include <mm/page.h> |
#include <mm/as.h> |
#include <arch/mm/page.h> |
#include <synch/spinlock.h> |
#include <arch/types.h> |
#include <arch/asm.h> |
#include <memstr.h> |
#include <console/chardev.h> |
#include <console/console.h> |
#include <sysinfo/sysinfo.h> |
#include <arch/drivers/ega.h> |
/* |
* The EGA driver. |
* Simple and short. Function for displaying characters and "scrolling". |
*/ |
SPINLOCK_INITIALIZE(egalock); |
static uint32_t ega_cursor; |
static uint8_t *videoram; |
static void ega_putchar(chardev_t *d, const char ch); |
chardev_t ega_console; |
static chardev_operations_t ega_ops = { |
.write = ega_putchar |
}; |
void ega_init(void) |
{ |
videoram = (uint8_t *) (VIDEORAM); |
/* |
* Clear the screen. |
*/ |
_memsetw(videoram, SCREEN, 0x0720); |
chardev_initialize("ega_out", &ega_console, &ega_ops); |
stdout = &ega_console; |
sysinfo_set_item_val("fb", NULL, true); |
sysinfo_set_item_val("fb.kind", NULL, 2); |
sysinfo_set_item_val("fb.width", NULL, ROW); |
sysinfo_set_item_val("fb.height", NULL, ROWS); |
sysinfo_set_item_val("fb.address.physical", NULL, VIDEORAM); |
#ifndef CONFIG_FB |
putchar('\n'); |
#endif |
} |
static void ega_display_char(char ch) |
{ |
videoram[ega_cursor * 2] = ch; |
videoram[ega_cursor * 2 + 1] = 7; |
} |
/* |
* This function takes care of scrolling. |
*/ |
static void ega_check_cursor(void) |
{ |
if (ega_cursor < SCREEN) |
return; |
memcpy((void *) videoram, (void *) (videoram + ROW * 2), (SCREEN - ROW) * 2); |
_memsetw(videoram + (SCREEN - ROW) * 2, ROW, 0x0720); |
ega_cursor = ega_cursor - ROW; |
} |
void ega_putchar(chardev_t *d, const char ch) |
{ |
ipl_t ipl; |
ipl = interrupts_disable(); |
spinlock_lock(&egalock); |
switch (ch) { |
case '\n': |
ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW; |
break; |
case '\t': |
ega_cursor = (ega_cursor + 8) - ega_cursor % 8; |
break; |
case '\b': |
if (ega_cursor % ROW) |
ega_cursor--; |
break; |
default: |
ega_display_char(ch); |
ega_cursor++; |
break; |
} |
ega_check_cursor(); |
spinlock_unlock(&egalock); |
interrupts_restore(ipl); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/src/drivers/it.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64 |
/** @addtogroup ia64 |
* @{ |
*/ |
/** @file |
44,44 → 44,25 |
#include <ddi/device.h> |
#include <arch.h> |
#define IT_SERVICE_CLOCKS 64 |
#define IT_SERVICE_CLOCKS 64 |
#define FREQ_NUMERATOR_SHIFT 32 |
#define FREQ_NUMERATOR_MASK 0xffffffff00000000ULL |
#define FREQ_DENOMINATOR_SHIFT 0 |
#define FREQ_DENOMINATOR_MASK 0xffffffffULL |
uint64_t it_delta; |
static irq_t it_irq; |
static irq_ownership_t it_claim(irq_t *); |
static void it_interrupt(irq_t *); |
static irq_ownership_t it_claim(void); |
static void it_interrupt(irq_t *irq, void *arg, ...); |
/** Initialize Interval Timer. */ |
void it_init(void) |
{ |
cr_itv_t itv; |
if (config.cpu_active == 1) { |
irq_initialize(&it_irq); |
it_irq.inr = INTERRUPT_TIMER; |
it_irq.devno = device_assign_devno(); |
it_irq.claim = it_claim; |
it_irq.handler = it_interrupt; |
irq_register(&it_irq); |
uint64_t base_freq; |
base_freq = ((bootinfo->freq_scale) & FREQ_NUMERATOR_MASK) >> |
FREQ_NUMERATOR_SHIFT; |
base_freq *= bootinfo->sys_freq; |
base_freq /= ((bootinfo->freq_scale) & FREQ_DENOMINATOR_MASK) >> |
FREQ_DENOMINATOR_SHIFT; |
it_delta = base_freq / HZ; |
} |
irq_initialize(&it_irq); |
it_irq.inr = INTERRUPT_TIMER; |
it_irq.devno = device_assign_devno(); |
it_irq.claim = it_claim; |
it_irq.handler = it_interrupt; |
irq_register(&it_irq); |
/* initialize Interval Timer external interrupt vector */ |
itv.value = itv_read(); |
itv.vector = INTERRUPT_TIMER; |
104,13 → 85,13 |
* |
* @return Always IRQ_ACCEPT. |
*/ |
irq_ownership_t it_claim(irq_t *irq) |
irq_ownership_t it_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
/** Process Interval Timer interrupt. */ |
void it_interrupt(irq_t *irq) |
void it_interrupt(irq_t *irq, void *arg, ...) |
{ |
int64_t c; |
int64_t m; |
/branches/arm/kernel/arch/ia64/src/ia64.c |
---|
33,7 → 33,7 |
*/ |
#include <arch.h> |
#include <arch/drivers/ski.h> |
#include <arch/ski/ski.h> |
#include <arch/drivers/it.h> |
#include <arch/interrupt.h> |
#include <arch/barrier.h> |
50,91 → 50,64 |
#include <proc/uarg.h> |
#include <syscall/syscall.h> |
#include <ddi/irq.h> |
#include <ddi/device.h> |
#include <arch/drivers/ega.h> |
#include <arch/bootinfo.h> |
#include <genarch/drivers/legacy/ia32/io.h> |
#include <genarch/drivers/ega/ega.h> |
#include <genarch/kbrd/kbrd.h> |
#include <genarch/srln/srln.h> |
#include <genarch/drivers/i8042/i8042.h> |
#include <genarch/drivers/ns16550/ns16550.h> |
#include <arch/drivers/kbd.h> |
#include <smp/smp.h> |
#include <smp/ipi.h> |
#include <arch/atomic.h> |
#include <panic.h> |
#include <print.h> |
#include <sysinfo/sysinfo.h> |
#include <string.h> |
#include <genarch/kbd/i8042.h> |
/* NS16550 as a COM 1 */ |
#define NS16550_IRQ (4 + LEGACY_INTERRUPT_BASE) |
bootinfo_t *bootinfo; |
static uint64_t iosapic_base = 0xfec00000; |
/** Performs ia64-specific initialization before main_bsp() is called. */ |
void arch_pre_main(void) |
{ |
/* Setup usermode init tasks. */ |
//#ifdef I460GX |
unsigned int i; |
init.cnt = bootinfo->taskmap.count; |
for (i = 0; i < init.cnt; i++) { |
init.tasks[i].addr = |
((unsigned long) bootinfo->taskmap.tasks[i].addr) | |
VRN_MASK; |
init.tasks[i].addr = ((unsigned long) bootinfo->taskmap.tasks[i].addr) | VRN_MASK; |
init.tasks[i].size = bootinfo->taskmap.tasks[i].size; |
str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, |
bootinfo->taskmap.tasks[i].name); |
} |
/* |
#else |
init.cnt = 8; |
init.tasks[0].addr = INIT0_ADDRESS; |
init.tasks[0].size = INIT0_SIZE; |
init.tasks[1].addr = INIT0_ADDRESS + 0x400000; |
init.tasks[1].size = INIT0_SIZE; |
init.tasks[2].addr = INIT0_ADDRESS + 0x800000; |
init.tasks[2].size = INIT0_SIZE; |
init.tasks[3].addr = INIT0_ADDRESS + 0xc00000; |
init.tasks[3].size = INIT0_SIZE; |
init.tasks[4].addr = INIT0_ADDRESS + 0x1000000; |
init.tasks[4].size = INIT0_SIZE; |
init.tasks[5].addr = INIT0_ADDRESS + 0x1400000; |
init.tasks[5].size = INIT0_SIZE; |
init.tasks[6].addr = INIT0_ADDRESS + 0x1800000; |
init.tasks[6].size = INIT0_SIZE; |
init.tasks[7].addr = INIT0_ADDRESS + 0x1c00000; |
init.tasks[7].size = INIT0_SIZE; |
#endif*/ |
} |
void arch_pre_mm_init(void) |
{ |
/* |
* Set Interruption Vector Address (i.e. location of interruption vector |
* table). |
*/ |
/* Set Interruption Vector Address (i.e. location of interruption vector table). */ |
iva_write((uintptr_t) &ivt); |
srlz_d(); |
} |
static void iosapic_init(void) |
{ |
uint64_t IOSAPIC = PA2KA((unative_t)(iosapic_base)) | FW_OFFSET; |
int i; |
int myid, myeid; |
myid = ia64_get_cpu_id(); |
myeid = ia64_get_cpu_eid(); |
for (i = 0; i < 16; i++) { |
if (i == 2) |
continue; /* Disable Cascade interrupt */ |
((uint32_t *)(IOSAPIC + 0x00))[0] = 0x10 + 2 * i; |
srlz_d(); |
((uint32_t *)(IOSAPIC + 0x10))[0] = LEGACY_INTERRUPT_BASE + i; |
srlz_d(); |
((uint32_t *)(IOSAPIC + 0x00))[0] = 0x10 + 2 * i + 1; |
srlz_d(); |
((uint32_t *)(IOSAPIC + 0x10))[0] = myid << (56 - 32) | |
myeid << (48 - 32); |
srlz_d(); |
} |
} |
void arch_post_mm_init(void) |
{ |
if (config.cpu_active == 1) { |
iosapic_init(); |
irq_init(INR_COUNT, INR_COUNT); |
} |
irq_init(INR_COUNT, INR_COUNT); |
#ifdef SKI |
ski_init_console(); |
#else |
ega_init(); |
#endif |
it_init(); |
} |
146,73 → 119,51 |
{ |
} |
void arch_post_smp_init(void) |
#ifdef I460GX |
#define POLL_INTERVAL 50000 /* 50 ms */ |
/** Kernel thread for polling keyboard. */ |
static void i8042_kkbdpoll(void *arg) |
{ |
#ifdef MACHINE_ski |
ski_instance_t *ski_instance = skiin_init(); |
if (ski_instance) { |
srln_instance_t *srln_instance = srln_init(); |
if (srln_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *srln = srln_wire(srln_instance, sink); |
skiin_wire(ski_instance, srln); |
} |
while (1) { |
i8042_poll(); |
thread_usleep(POLL_INTERVAL); |
} |
skiout_init(); |
} |
#endif |
#ifdef CONFIG_EGA |
ega_init(EGA_BASE, EGA_VIDEORAM); |
void arch_post_smp_init(void) |
{ |
if (config.cpu_active == 1) { |
/* |
* Create thread that polls keyboard. |
*/ |
#ifdef SKI |
thread_t *t; |
t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); |
if (!t) |
panic("cannot create kkbdpoll\n"); |
thread_ready(t); |
#endif |
#ifdef I460GX |
devno_t kbd = device_assign_devno(); |
devno_t mouse = device_assign_devno(); |
/* keyboard controller */ |
i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE); |
thread_t *t; |
t = thread_create(i8042_kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); |
if (!t) |
panic("cannot create kkbdpoll\n"); |
thread_ready(t); |
#endif |
#ifdef CONFIG_NS16550 |
ns16550_instance_t *ns16550_instance |
= ns16550_init((ns16550_t *) NS16550_BASE, NS16550_IRQ, NULL, NULL); |
if (ns16550_instance) { |
srln_instance_t *srln_instance = srln_init(); |
if (srln_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *srln = srln_wire(srln_instance, sink); |
ns16550_wire(ns16550_instance, srln); |
} |
} |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.inr", NULL, NS16550_IRQ); |
sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550); |
sysinfo_set_item_val("kbd.address.physical", NULL, |
(uintptr_t) NS16550_BASE); |
sysinfo_set_item_val("kbd.address.kernel", NULL, |
(uintptr_t) NS16550_BASE); |
#endif |
#ifdef CONFIG_I8042 |
i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
if (i8042_instance) { |
kbrd_instance_t *kbrd_instance = kbrd_init(); |
if (kbrd_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *kbrd = kbrd_wire(kbrd_instance, sink); |
i8042_wire(i8042_instance, kbrd); |
} |
} |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY); |
sysinfo_set_item_val("kbd.address.physical", NULL, |
(uintptr_t) I8042_BASE); |
sysinfo_set_item_val("kbd.address.kernel", NULL, |
(uintptr_t) I8042_BASE); |
#endif |
sysinfo_set_item_val("ia64_iospace", NULL, true); |
sysinfo_set_item_val("ia64_iospace.address", NULL, true); |
sysinfo_set_item_val("ia64_iospace.address.virtual", NULL, IO_OFFSET); |
} |
/** Enter userspace and never return. */ |
void userspace(uspace_arg_t *kernel_uarg) |
{ |
221,25 → 172,26 |
psr.value = psr_read(); |
psr.cpl = PL_USER; |
psr.i = true; /* start with interrupts enabled */ |
psr.i = true; /* start with interrupts enabled */ |
psr.ic = true; |
psr.ri = 0; /* start with instruction #0 */ |
psr.bn = 1; /* start in bank 0 */ |
psr.ri = 0; /* start with instruction #0 */ |
psr.bn = 1; /* start in bank 0 */ |
asm volatile ("mov %0 = ar.rsc\n" : "=r" (rsc.value)); |
rsc.loadrs = 0; |
rsc.be = false; |
rsc.pl = PL_USER; |
rsc.mode = 3; /* eager mode */ |
rsc.mode = 3; /* eager mode */ |
switch_to_userspace((uintptr_t) kernel_uarg->uspace_entry, |
((uintptr_t) kernel_uarg->uspace_stack) + PAGE_SIZE - |
ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), |
((uintptr_t) kernel_uarg->uspace_stack) + PAGE_SIZE, |
(uintptr_t) kernel_uarg->uspace_uarg, psr.value, rsc.value); |
((uintptr_t) kernel_uarg->uspace_stack)+PAGE_SIZE-ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT), |
((uintptr_t) kernel_uarg->uspace_stack)+PAGE_SIZE, |
(uintptr_t) kernel_uarg->uspace_uarg, |
psr.value, rsc.value); |
while (1) |
while (1) { |
; |
} |
} |
/** Set thread-local-storage pointer. |
256,17 → 208,16 |
*/ |
void arch_grab_console(void) |
{ |
#ifdef MACHINE_ski |
#ifdef SKI |
ski_kbd_grab(); |
#endif |
#endif |
} |
/** Return console to userspace |
* |
*/ |
void arch_release_console(void) |
{ |
#ifdef MACHINE_ski |
#ifdef SKI |
ski_kbd_release(); |
#endif |
} |
273,27 → 224,9 |
void arch_reboot(void) |
{ |
pio_write_8((ioport8_t *)0x64, 0xfe); |
while (1) |
; |
// TODO |
while (1); |
} |
/** Construct function pointer |
* |
* @param fptr function pointer structure |
* @param addr function address |
* @param caller calling function address |
* |
* @return address of the function pointer |
* |
*/ |
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
{ |
fptr->fnc = (unative_t) addr; |
fptr->gp = ((unative_t *) caller)[1]; |
return (void *) fptr; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/src/start.S |
---|
32,15 → 32,19 |
#include <mm/asid.h> |
#define RR_MASK (0xFFFFFFFF00000002) |
#define RID_SHIFT 8 |
#define PS_SHIFT 2 |
#define RID_SHIFT 8 |
#define PS_SHIFT 2 |
#define KERNEL_TRANSLATION_I 0x0010000000000661 |
#define KERNEL_TRANSLATION_D 0x0010000000000661 |
#define KERNEL_TRANSLATION_VIO 0x0010000000000671 |
#define KERNEL_TRANSLATION_IO 0x00100FFFFC000671 |
#define KERNEL_TRANSLATION_FW 0x00100000F0000671 |
#define KERNEL_TRANSLATION_I 0x0010000000000661 |
#define KERNEL_TRANSLATION_D 0x0010000000000661 |
#define KERNEL_TRANSLATION_VIO 0x0010000000000671 |
#define KERNEL_TRANSLATION_IO 0x00100FFFFC000671 |
#define VIO_OFFSET 0x0002000000000000 |
#define IO_OFFSET 0x0001000000000000 |
.section K_TEXT_START, "ax" |
.global kernel_image_start |
49,19 → 53,6 |
kernel_image_start: |
.auto |
#ifdef CONFIG_SMP |
# Identify self(CPU) in OS structures by ID / EID |
mov r9 = cr64 |
mov r10 = 1 |
movl r12 = 0xffffffff |
movl r8 = cpu_by_id_eid_list |
and r8 = r8, r12 |
shr r9 = r9, 16 |
add r8 = r8, r9 |
st1 [r8] = r10 |
#endif |
mov psr.l = r0 |
srlz.i |
srlz.d |
68,29 → 59,39 |
# Fill TR.i and TR.d using Region Register #VRN_KERNEL |
movl r8 = (VRN_KERNEL << VRN_SHIFT) |
mov r9 = rr[r8] |
movl r10 = (RR_MASK) |
and r9 = r10, r9 |
movl r10 = ((RID_KERNEL << RID_SHIFT) | (KERNEL_PAGE_WIDTH << PS_SHIFT)) |
or r9 = r10, r9 |
mov rr[r8] = r9 |
movl r8 = (VRN_KERNEL << VRN_SHIFT) |
mov cr.ifa = r8 |
mov r11 = cr.itir |
movl r10 = (KERNEL_PAGE_WIDTH << PS_SHIFT) |
or r10 = r10, r11 |
mov cr.itir = r10 |
mov r11 = cr.itir ;; |
movl r10 = (KERNEL_PAGE_WIDTH << PS_SHIFT);; |
or r10 =r10 , r11 ;; |
mov cr.itir = r10;; |
movl r10 = (KERNEL_TRANSLATION_I) |
itr.i itr[r0] = r10 |
movl r10 = (KERNEL_TRANSLATION_D) |
itr.d dtr[r0] = r10 |
movl r7 = 1 |
movl r8 = (VRN_KERNEL << VRN_SHIFT) | VIO_OFFSET |
mov cr.ifa = r8 |
97,13 → 98,15 |
movl r10 = (KERNEL_TRANSLATION_VIO) |
itr.d dtr[r7] = r10 |
mov r11 = cr.itir |
movl r10 = ~0xfc |
and r10 = r10, r11 |
movl r11 = (IO_PAGE_WIDTH << PS_SHIFT) |
or r10 = r10, r11 |
mov cr.itir = r10 |
mov r11 = cr.itir ;; |
movl r10 = ~0xfc;; |
and r10 =r10 , r11 ;; |
movl r11 = (IO_PAGE_WIDTH << PS_SHIFT);; |
or r10 =r10 , r11 ;; |
mov cr.itir = r10;; |
movl r7 = 2 |
movl r8 = (VRN_KERNEL << VRN_SHIFT) | IO_OFFSET |
mov cr.ifa = r8 |
110,26 → 113,12 |
movl r10 = (KERNEL_TRANSLATION_IO) |
itr.d dtr[r7] = r10 |
# Setup mapping for fimware arrea (also SAPIC) |
mov r11 = cr.itir |
movl r10 = ~0xfc |
and r10 = r10, r11 |
movl r11 = (FW_PAGE_WIDTH << PS_SHIFT) |
or r10 = r10, r11 |
mov cr.itir = r10 |
movl r7 = 3 |
movl r8 = (VRN_KERNEL << VRN_SHIFT) | FW_OFFSET |
mov cr.ifa = r8 |
movl r10 = (KERNEL_TRANSLATION_FW) |
itr.d dtr[r7] = r10 |
# Initialize PSR |
# initialize PSR |
movl r10 = (PSR_DT_MASK | PSR_RT_MASK | PSR_IT_MASK | PSR_IC_MASK) /* Enable paging */ |
mov r9 = psr |
or r10 = r10, r9 |
mov cr.ipsr = r10 |
mov cr.ifs = r0 |
139,14 → 128,11 |
srlz.i |
.explicit |
/* |
* Return From Interrupt is the only way to |
* fill the upper half word of PSR. |
* Return From Interupt is the only the way to fill upper half word of PSR. |
*/ |
rfi ;; |
rfi;; |
.global paging_start |
paging_start: |
154,64 → 140,45 |
* Now we are paging. |
*/ |
# Switch to register bank 1 |
# switch to register bank 1 |
bsw.1 |
#ifdef CONFIG_SMP |
# Am I BSP or AP? |
movl r20 = bsp_started ;; |
ld8 r20 = [r20] ;; |
cmp.eq p3, p2 = r20, r0 ;; |
#else |
cmp.eq p3, p2 = r0, r0 ;; /* you are BSP */ |
#endif /* CONFIG_SMP */ |
# Initialize register stack |
# initialize register stack |
mov ar.rsc = r0 |
movl r8 = (VRN_KERNEL << VRN_SHIFT) ;; |
mov ar.bspstore = r8 |
loadrs |
# Initialize memory stack to some sane value |
# initialize memory stack to some sane value |
movl r12 = stack0 ;; |
add r12 = -16, r12 /* allocate a scratch area on the stack */ |
# Initialize gp (Global Pointer) register |
# initialize gp (Global Pointer) register |
movl r20 = (VRN_KERNEL << VRN_SHIFT);; |
or r20 = r20,r1;; |
movl r1 = _hardcoded_load_address |
/* |
* Initialize hardcoded_* variables. Do only BSP |
* Initialize hardcoded_* variables. |
*/ |
(p3) movl r14 = _hardcoded_ktext_size |
(p3) movl r15 = _hardcoded_kdata_size |
(p3) movl r16 = _hardcoded_load_address ;; |
(p3) addl r17 = @gprel(hardcoded_ktext_size), gp |
(p3) addl r18 = @gprel(hardcoded_kdata_size), gp |
(p3) addl r19 = @gprel(hardcoded_load_address), gp |
(p3) addl r21 = @gprel(bootinfo), gp |
movl r14 = _hardcoded_ktext_size |
movl r15 = _hardcoded_kdata_size |
movl r16 = _hardcoded_load_address ;; |
addl r17 = @gprel(hardcoded_ktext_size), gp |
addl r18 = @gprel(hardcoded_kdata_size), gp |
addl r19 = @gprel(hardcoded_load_address), gp |
addl r21 = @gprel(bootinfo), gp |
;; |
(p3) st8 [r17] = r14 |
(p3) st8 [r18] = r15 |
(p3) st8 [r19] = r16 |
(p3) st8 [r21] = r20 |
st8 [r17] = r14 |
st8 [r18] = r15 |
st8 [r19] = r16 |
st8 [r21] = r20 |
ssm (1 << 19) ;; /* Disable f32 - f127 */ |
srlz.i |
srlz.d ;; |
#ifdef CONFIG_SMP |
(p2) movl r18 = main_ap ;; |
(p2) mov b1 = r18 ;; |
(p2) br.call.sptk.many b0 = b1 |
# Mark that BSP is on |
mov r20 = 1 ;; |
movl r21 = bsp_started ;; |
st8 [r21] = r20 ;; |
#endif |
br.call.sptk.many b0 = arch_pre_main |
movl r18 = main_bsp ;; |
218,51 → 185,6 |
mov b1 = r18 ;; |
br.call.sptk.many b0 = b1 |
0: |
br 0b |
#ifdef CONFIG_SMP |
.align 4096 |
kernel_image_ap_start: |
.auto |
# Identify self(CPU) in OS structures by ID / EID |
mov r9 = cr64 |
mov r10 = 1 |
movl r12 = 0xffffffff |
movl r8 = cpu_by_id_eid_list |
and r8 = r8, r12 |
shr r9 = r9, 16 |
add r8 = r8, r9 |
st1 [r8] = r10 |
# Wait for wakeup synchro signal (#3 in cpu_by_id_eid_list) |
kernel_image_ap_start_loop: |
movl r11 = kernel_image_ap_start_loop |
and r11 = r11, r12 |
mov b1 = r11 |
ld1 r20 = [r8] ;; |
movl r21 = 3 ;; |
cmp.eq p2, p3 = r20, r21 ;; |
(p3) br.call.sptk.many b0 = b1 |
movl r11 = kernel_image_start |
and r11 = r11, r12 |
mov b1 = r11 |
br.call.sptk.many b0 = b1 |
.align 16 |
.global bsp_started |
bsp_started: |
.space 8 |
.align 4096 |
.global cpu_by_id_eid_list |
cpu_by_id_eid_list: |
.space 65536 |
#endif /* CONFIG_SMP */ |
/branches/arm/kernel/arch/ia64/src/ivt.S |
---|
536,7 → 536,7 |
HEAVYWEIGHT_HANDLER 0x5000 page_not_present |
HEAVYWEIGHT_HANDLER 0x5100 |
HEAVYWEIGHT_HANDLER 0x5200 |
HEAVYWEIGHT_HANDLER 0x5300 data_access_rights_fault |
HEAVYWEIGHT_HANDLER 0x5300 |
HEAVYWEIGHT_HANDLER 0x5400 general_exception |
HEAVYWEIGHT_HANDLER 0x5500 disabled_fp_register |
HEAVYWEIGHT_HANDLER 0x5600 |
/branches/arm/kernel/arch/ia64/src/interrupt.c |
---|
38,6 → 38,7 |
#include <ddi/irq.h> |
#include <panic.h> |
#include <print.h> |
#include <symtab.h> |
#include <debug.h> |
#include <console/console.h> |
#include <arch/types.h> |
52,9 → 53,6 |
#include <ipc/irq.h> |
#include <ipc/ipc.h> |
#include <synch/spinlock.h> |
#include <mm/tlb.h> |
#include <symtab.h> |
#include <putchar.h> |
#define VECTORS_64_BUNDLE 20 |
#define VECTORS_16_BUNDLE 48 |
138,9 → 136,9 |
{ |
char *ifa, *iipa, *iip; |
ifa = symtab_fmt_name_lookup(istate->cr_ifa); |
iipa = symtab_fmt_name_lookup(istate->cr_iipa); |
iip = symtab_fmt_name_lookup(istate->cr_iip); |
ifa = get_symtab_entry(istate->cr_ifa); |
iipa = get_symtab_entry(istate->cr_iipa); |
iip = get_symtab_entry(istate->cr_iip); |
putchar('\n'); |
printf("Interrupted context dump:\n"); |
187,21 → 185,21 |
break; |
} |
fault_if_from_uspace(istate, "General Exception (%s).", desc); |
fault_if_from_uspace(istate, "General Exception (%s)", desc); |
dump_interrupted_context(istate); |
panic("General Exception (%s).", desc); |
panic("General Exception (%s)\n", desc); |
} |
void disabled_fp_register(uint64_t vector, istate_t *istate) |
{ |
#ifdef CONFIG_FPU_LAZY |
scheduler_fpu_lazy_request(); |
#ifdef CONFIG_FPU_LAZY |
scheduler_fpu_lazy_request(); |
#else |
fault_if_from_uspace(istate, "Interruption: %#hx (%s).", |
fault_if_from_uspace(istate, "Interruption: %#hx (%s)", |
(uint16_t) vector, vector_to_string(vector)); |
dump_interrupted_context(istate); |
panic("Interruption: %#hx (%s).", (uint16_t) vector, |
panic("Interruption: %#hx (%s)\n", (uint16_t) vector, |
vector_to_string(vector)); |
#endif |
} |
229,82 → 227,40 |
void universal_handler(uint64_t vector, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "Interruption: %#hx (%s).", |
fault_if_from_uspace(istate, "Interruption: %#hx (%s)\n", |
(uint16_t) vector, vector_to_string(vector)); |
dump_interrupted_context(istate); |
panic("Interruption: %#hx (%s).", (uint16_t) vector, |
panic("Interruption: %#hx (%s)\n", (uint16_t) vector, |
vector_to_string(vector)); |
} |
static void end_of_local_irq(void) |
{ |
asm volatile ("mov cr.eoi=r0;;"); |
} |
void external_interrupt(uint64_t vector, istate_t *istate) |
{ |
irq_t *irq; |
cr_ivr_t ivr; |
irq_t *irq; |
ivr.value = ivr_read(); |
srlz_d(); |
switch (ivr.vector) { |
case INTERRUPT_SPURIOUS: |
irq = irq_dispatch_and_lock(ivr.vector); |
if (irq) { |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
switch (ivr.vector) { |
case INTERRUPT_SPURIOUS: |
#ifdef CONFIG_DEBUG |
printf("cpu%d: spurious interrupt\n", CPU->id); |
printf("cpu%d: spurious interrupt\n", CPU->id); |
#endif |
break; |
break; |
#ifdef CONFIG_SMP |
case VECTOR_TLB_SHOOTDOWN_IPI: |
tlb_shootdown_ipi_recv(); |
end_of_local_irq(); |
break; |
#endif |
case INTERRUPT_TIMER: |
irq = irq_dispatch_and_lock(ivr.vector); |
if (irq) { |
irq->handler(irq); |
spinlock_unlock(&irq->lock); |
} else { |
panic("Unhandled Internal Timer Interrupt (%d).", |
default: |
panic("\nUnhandled External Interrupt Vector %d\n", |
ivr.vector); |
break; |
} |
break; |
default: |
irq = irq_dispatch_and_lock(ivr.vector); |
if (irq) { |
/* |
* The IRQ handler was found. |
*/ |
if (irq->preack) { |
/* Send EOI before processing the interrupt */ |
end_of_local_irq(); |
} |
irq->handler(irq); |
if (!irq->preack) |
end_of_local_irq(); |
spinlock_unlock(&irq->lock); |
} else { |
/* |
* Unhandled interrupt. |
*/ |
end_of_local_irq(); |
#ifdef CONFIG_DEBUG |
printf("\nUnhandled External Interrupt Vector %d\n", |
ivr.vector); |
#endif |
} |
break; |
} |
} |
void trap_virtual_enable_irqs(uint16_t irqmask) |
{ |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/src/cpu/cpu.c |
---|
55,7 → 55,7 |
*((uint64_t *) &vendor[0 * sizeof(uint64_t)]) = CPU->arch.cpuid0; |
*((uint64_t *) &vendor[1 * sizeof(uint64_t)]) = CPU->arch.cpuid1; |
vendor[sizeof(vendor) - 1] = 0; |
vendor[sizeof(vendor) - 1] = '\0'; |
switch(m->arch.cpuid3.family) { |
case FAMILY_ITANIUM: |
70,8 → 70,8 |
} |
printf("cpu%d: %s (%s), archrev=%d, model=%d, revision=%d\n", CPU->id, |
family_str, vendor, CPU->arch.cpuid3.archrev, |
CPU->arch.cpuid3.model, CPU->arch.cpuid3.revision); |
family_str, vendor, CPU->arch.cpuid3.archrev, CPU->arch.cpuid3.model, |
CPU->arch.cpuid3.revision); |
} |
/** @} |
/branches/arm/kernel/arch/ia64/src/ski/ski.c |
---|
0,0 → 1,264 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64 |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/ski/ski.h> |
#include <console/console.h> |
#include <console/chardev.h> |
#include <arch/interrupt.h> |
#include <sysinfo/sysinfo.h> |
#include <arch/types.h> |
#include <ddi/device.h> |
#include <ddi/irq.h> |
#include <ipc/irq.h> |
#include <proc/thread.h> |
#include <synch/spinlock.h> |
#include <arch/asm.h> |
#define SKI_KBD_INR 0 |
static irq_t ski_kbd_irq; |
static devno_t ski_kbd_devno; |
chardev_t ski_console; |
chardev_t ski_uconsole; |
static bool kbd_disabled; |
static void ski_putchar(chardev_t *d, const char ch); |
static int32_t ski_getchar(void); |
/** Display character on debug console |
* |
* Use SSC (Simulator System Call) to |
* display character on debug console. |
* |
* @param d Character device. |
* @param ch Character to be printed. |
*/ |
void ski_putchar(chardev_t *d, const char ch) |
{ |
asm volatile ( |
"mov r15 = %0\n" |
"mov r32 = %1\n" /* r32 is in0 */ |
"break 0x80000\n" /* modifies r8 */ |
: |
: "i" (SKI_PUTCHAR), "r" (ch) |
: "r15", "in0", "r8" |
); |
if (ch == '\n') |
ski_putchar(d, '\r'); |
} |
/** Ask debug console if a key was pressed. |
* |
* Use SSC (Simulator System Call) to |
* get character from debug console. |
* |
* This call is non-blocking. |
* |
* @return ASCII code of pressed key or 0 if no key pressed. |
*/ |
int32_t ski_getchar(void) |
{ |
uint64_t ch; |
asm volatile ( |
"mov r15 = %1\n" |
"break 0x80000;;\n" /* modifies r8 */ |
"mov %0 = r8;;\n" |
: "=r" (ch) |
: "i" (SKI_GETCHAR) |
: "r15", "r8" |
); |
return (int32_t) ch; |
} |
/** |
* This is a blocking wrapper for ski_getchar(). |
* To be used when the kernel crashes. |
*/ |
static char ski_getchar_blocking(chardev_t *d) |
{ |
int ch; |
while(!(ch = ski_getchar())) |
; |
if(ch == '\r') |
ch = '\n'; |
return (char) ch; |
} |
/** Ask keyboard if a key was pressed. */ |
static void poll_keyboard(void) |
{ |
char ch; |
static char last; |
ipl_t ipl; |
ipl = interrupts_disable(); |
if (kbd_disabled) { |
interrupts_restore(ipl); |
return; |
} |
spinlock_lock(&ski_kbd_irq.lock); |
ch = ski_getchar(); |
if(ch == '\r') |
ch = '\n'; |
if (ch) { |
if (ski_kbd_irq.notif_cfg.notify && ski_kbd_irq.notif_cfg.answerbox) { |
chardev_push_character(&ski_uconsole, ch); |
ipc_irq_send_notif(&ski_kbd_irq); |
} else { |
chardev_push_character(&ski_console, ch); |
} |
last = ch; |
spinlock_unlock(&ski_kbd_irq.lock); |
interrupts_restore(ipl); |
return; |
} |
if (last) { |
if (ski_kbd_irq.notif_cfg.notify && ski_kbd_irq.notif_cfg.answerbox) { |
chardev_push_character(&ski_uconsole, 0); |
ipc_irq_send_notif(&ski_kbd_irq); |
} |
last = 0; |
} |
spinlock_unlock(&ski_kbd_irq.lock); |
interrupts_restore(ipl); |
} |
/* Called from getc(). */ |
static void ski_kbd_enable(chardev_t *d) |
{ |
kbd_disabled = false; |
} |
/* Called from getc(). */ |
static void ski_kbd_disable(chardev_t *d) |
{ |
kbd_disabled = true; |
} |
/** Decline to service hardware IRQ. |
* |
* This is only a virtual IRQ, so always decline. |
* |
* @return Always IRQ_DECLINE. |
*/ |
static irq_ownership_t ski_kbd_claim(void) |
{ |
return IRQ_DECLINE; |
} |
static chardev_operations_t ski_ops = { |
.resume = ski_kbd_enable, |
.suspend = ski_kbd_disable, |
.write = ski_putchar, |
.read = ski_getchar_blocking |
}; |
/** Initialize debug console |
* |
* Issue SSC (Simulator System Call) to |
* to open debug console. |
*/ |
void ski_init_console(void) |
{ |
asm volatile ( |
"mov r15 = %0\n" |
"break 0x80000\n" |
: |
: "i" (SKI_INIT_CONSOLE) |
: "r15", "r8" |
); |
chardev_initialize("ski_console", &ski_console, &ski_ops); |
chardev_initialize("ski_uconsole", &ski_uconsole, &ski_ops); |
stdin = &ski_console; |
stdout = &ski_console; |
ski_kbd_devno = device_assign_devno(); |
irq_initialize(&ski_kbd_irq); |
ski_kbd_irq.inr = SKI_KBD_INR; |
ski_kbd_irq.devno = ski_kbd_devno; |
ski_kbd_irq.claim = ski_kbd_claim; |
irq_register(&ski_kbd_irq); |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.inr", NULL, SKI_KBD_INR); |
sysinfo_set_item_val("kbd.devno", NULL, ski_kbd_devno); |
} |
void ski_kbd_grab(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&ski_kbd_irq.lock); |
ski_kbd_irq.notif_cfg.notify = false; |
spinlock_unlock(&ski_kbd_irq.lock); |
interrupts_restore(ipl); |
} |
void ski_kbd_release(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&ski_kbd_irq.lock); |
if (ski_kbd_irq.notif_cfg.answerbox) |
ski_kbd_irq.notif_cfg.notify = true; |
spinlock_unlock(&ski_kbd_irq.lock); |
interrupts_restore(ipl); |
} |
#define POLL_INTERVAL 50000 /* 50 ms */ |
/** Kernel thread for polling keyboard. */ |
void kkbdpoll(void *arg) |
{ |
while (1) { |
poll_keyboard(); |
thread_usleep(POLL_INTERVAL); |
} |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/src/ddi/ddi.c |
---|
1,6 → 1,5 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* Copyright (c) 2008 Jakub vana |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
36,39 → 35,19 |
#include <ddi/ddi.h> |
#include <proc/task.h> |
#include <arch/types.h> |
#include <mm/slab.h> |
#include <errno.h> |
#define IO_MEMMAP_PAGES 16384 |
#define PORTS_PER_PAGE 4 |
/** Enable I/O space range for task. |
* |
* Interrupts are disabled and task is locked. |
* |
* @param task Task. |
* @param ioaddr Starting I/O space address. |
* @param size Size of the enabled I/O range. |
* @param task Task. |
* @param ioaddr Startign I/O space address. |
* @param size Size of the enabled I/O range. |
* |
* @return 0 on success or an error code from errno.h. |
*/ |
int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size) |
{ |
if (!task->arch.iomap) { |
uint8_t *map; |
task->arch.iomap = malloc(sizeof(bitmap_t), 0); |
map = malloc(BITS2BYTES(IO_MEMMAP_PAGES), 0); |
if(!map) |
return ENOMEM; |
bitmap_initialize(task->arch.iomap, map, IO_MEMMAP_PAGES); |
bitmap_clear_range(task->arch.iomap, 0, IO_MEMMAP_PAGES); |
} |
uintptr_t iopage = ioaddr / PORTS_PER_PAGE; |
size = ALIGN_UP(size + ioaddr - 4 * iopage, PORTS_PER_PAGE); |
bitmap_set_range(task->arch.iomap, iopage, size / 4); |
return 0; |
} |
/branches/arm/kernel/arch/ia64/src/proc/scheduler.c |
---|
47,17 → 47,14 |
{ |
} |
/** Prepare kernel stack pointers in bank 0 r22 and r23 and make sure the stack |
* is mapped in DTR. |
*/ |
/** Prepare kernel stack pointers in bank 0 r22 and r23 and make sure the stack is mapped in DTR. */ |
void before_thread_runs_arch(void) |
{ |
uintptr_t base; |
base = ALIGN_DOWN(config.base, 1 << KERNEL_PAGE_WIDTH); |
base = ALIGN_DOWN(config.base, 1<<KERNEL_PAGE_WIDTH); |
if ((uintptr_t) THREAD->kstack < base || |
(uintptr_t) THREAD->kstack > base + (1 << (KERNEL_PAGE_WIDTH))) { |
if ((uintptr_t) THREAD->kstack < base || (uintptr_t) THREAD->kstack > base + (1<<(KERNEL_PAGE_WIDTH))) { |
/* |
* Kernel stack of this thread is not mapped by DTR[TR_KERNEL]. |
* Use DTR[TR_KSTACK1] and DTR[TR_KSTACK2] to map it. |
67,11 → 64,8 |
dtr_purge((uintptr_t) THREAD->kstack, PAGE_WIDTH+1); |
/* insert DTR[TR_STACK1] and DTR[TR_STACK2] */ |
dtlb_kernel_mapping_insert((uintptr_t) THREAD->kstack, |
KA2PA(THREAD->kstack), true, DTR_KSTACK1); |
dtlb_kernel_mapping_insert((uintptr_t) THREAD->kstack + |
PAGE_SIZE, KA2PA(THREAD->kstack) + FRAME_SIZE, true, |
DTR_KSTACK2); |
dtlb_kernel_mapping_insert((uintptr_t) THREAD->kstack, KA2PA(THREAD->kstack), true, DTR_KSTACK1); |
dtlb_kernel_mapping_insert((uintptr_t) THREAD->kstack + PAGE_SIZE, KA2PA(THREAD->kstack) + FRAME_SIZE, true, DTR_KSTACK2); |
} |
/* |
/branches/arm/kernel/arch/ia64/src/fpu_context.c |
---|
149,10 → 149,8 |
"stf.spill [%7] = f127, 0x80\n;;" |
: |
: "r" (&((fctx->fr)[0])), "r" (&((fctx->fr)[1])), |
"r" (&((fctx->fr)[2])), "r" (&((fctx->fr)[3])), |
"r" (&((fctx->fr)[4])), "r" (&((fctx->fr)[5])), |
"r" (&((fctx->fr)[6])), "r" (&((fctx->fr)[7])) |
: "r" (&((fctx->fr)[0])), "r" (&((fctx->fr)[1])), "r" (&((fctx->fr)[2])), "r" (&((fctx->fr)[3])), |
"r" (&((fctx->fr)[4])), "r" (&((fctx->fr)[5])), "r" (&((fctx->fr)[6])), "r" (&((fctx->fr)[7])) |
); |
} |
269,16 → 267,14 |
"ldf.fill f127 = [%7], 0x80\n;;" |
: |
: "r" (&((fctx->fr)[0])), "r" (&((fctx->fr)[1])), |
"r" (&((fctx->fr)[2])), "r" (&((fctx->fr)[3])), |
"r" (&((fctx->fr)[4])), "r" (&((fctx->fr)[5])), |
"r" (&((fctx->fr)[6])), "r" (&((fctx->fr)[7])) |
: "r" (&((fctx->fr)[0])), "r" (&((fctx->fr)[1])), "r" (&((fctx->fr)[2])), "r" (&((fctx->fr)[3])), |
"r" (&((fctx->fr)[4])), "r" (&((fctx->fr)[5])), "r" (&((fctx->fr)[6])), "r" (&((fctx->fr)[7])) |
); |
} |
void fpu_enable(void) |
{ |
uint64_t a = 0; |
uint64_t a = 0 ; |
asm volatile ( |
"rsm %0 ;;" |
/branches/arm/kernel/arch/ia64/src/putchar.c |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64 |
* @{ |
*/ |
/** @file |
*/ |
#include <putchar.h> |
#include <arch/ski/ski.h> |
void putchar(const char ch) |
{ |
ski_write(ch); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/include/mm/page.h |
---|
46,25 → 46,8 |
/** Bit width of the TLB-locked portion of kernel address space. */ |
#define KERNEL_PAGE_WIDTH 28 /* 256M */ |
#define IO_PAGE_WIDTH 26 /* 64M */ |
#define FW_PAGE_WIDTH 28 /* 256M */ |
#define USPACE_IO_PAGE_WIDTH 12 /* 4K */ |
/* |
* Statically mapped IO spaces - offsets to 0xe...00 of virtual addresses |
* because of "minimal virtual bits implemented is 51" it is possible to |
* have values up to 0x0007000000000000 |
*/ |
/* Firmware area (bellow 4GB in phys mem) */ |
#define FW_OFFSET 0x00000000F0000000 |
/* Legacy IO space */ |
#define IO_OFFSET 0x0001000000000000 |
/* Videoram - now mapped to 0 as VGA text mode vram on 0xb8000 */ |
#define VIO_OFFSET 0x0002000000000000 |
#define PPN_SHIFT 12 |
#define VRN_SHIFT 61 |
79,8 → 62,8 |
#define REGION_REGISTERS 8 |
#define KA2PA(x) ((uintptr_t) (x - (VRN_KERNEL << VRN_SHIFT))) |
#define PA2KA(x) ((uintptr_t) (x + (VRN_KERNEL << VRN_SHIFT))) |
#define KA2PA(x) ((uintptr_t) (x-(VRN_KERNEL<<VRN_SHIFT))) |
#define PA2KA(x) ((uintptr_t) (x+(VRN_KERNEL<<VRN_SHIFT))) |
#define VHPT_WIDTH 20 /* 1M */ |
#define VHPT_SIZE (1 << VHPT_WIDTH) |
240,7 → 223,7 |
* |
* @return Current contents of rr[i]. |
*/ |
static inline uint64_t rr_read(size_t i) |
static inline uint64_t rr_read(index_t i) |
{ |
uint64_t ret; |
ASSERT(i < REGION_REGISTERS); |
253,7 → 236,7 |
* @param i Region register index. |
* @param v Value to be written to rr[i]. |
*/ |
static inline void rr_write(size_t i, uint64_t v) |
static inline void rr_write(index_t i, uint64_t v) |
{ |
ASSERT(i < REGION_REGISTERS); |
asm volatile ( |
/branches/arm/kernel/arch/ia64/include/mm/frame.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64mm |
/** @addtogroup ia64mm |
* @{ |
*/ |
/** @file |
35,16 → 35,12 |
#ifndef KERN_ia64_FRAME_H_ |
#define KERN_ia64_FRAME_H_ |
#define FRAME_WIDTH 14 /* 16K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#define FRAME_WIDTH 14 /* 16K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#ifdef KERNEL |
#ifndef __ASM__ |
#include <arch/types.h> |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
#define physmem_print() |
/branches/arm/kernel/arch/ia64/include/mm/tlb.h |
---|
35,6 → 35,9 |
#ifndef KERN_ia64_TLB_H_ |
#define KERN_ia64_TLB_H_ |
#define tlb_arch_init() |
#define tlb_print() |
#include <arch/mm/page.h> |
#include <arch/mm/asid.h> |
#include <arch/interrupt.h> |
43,8 → 46,8 |
/** Data and instruction Translation Register indices. */ |
#define DTR_KERNEL 0 |
#define ITR_KERNEL 0 |
#define DTR_KSTACK1 4 |
#define DTR_KSTACK2 5 |
#define DTR_KSTACK1 1 |
#define DTR_KSTACK2 2 |
/** Portion of TLB insertion format data structure. */ |
union tlb_entry { |
76,12 → 79,12 |
extern void dtc_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry); |
extern void itc_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry); |
extern void tr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, bool dtr, size_t tr); |
extern void dtr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, size_t tr); |
extern void itr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, size_t tr); |
extern void tr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, bool dtr, index_t tr); |
extern void dtr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, index_t tr); |
extern void itr_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry, index_t tr); |
extern void dtlb_kernel_mapping_insert(uintptr_t page, uintptr_t frame, bool dtr, size_t tr); |
extern void dtr_purge(uintptr_t page, size_t width); |
extern void dtlb_kernel_mapping_insert(uintptr_t page, uintptr_t frame, bool dtr, index_t tr); |
extern void dtr_purge(uintptr_t page, count_t width); |
extern void dtc_pte_copy(pte_t *t); |
extern void itc_pte_copy(pte_t *t); |
92,7 → 95,6 |
extern void data_dirty_bit_fault(uint64_t vector, istate_t *istate); |
extern void instruction_access_bit_fault(uint64_t vector, istate_t *istate); |
extern void data_access_bit_fault(uint64_t vector, istate_t *istate); |
extern void data_access_rights_fault(uint64_t vector, istate_t *istate); |
extern void page_not_present(uint64_t vector, istate_t *istate); |
#endif |
/branches/arm/kernel/arch/ia64/include/mm/vhpt.h |
---|
44,8 → 44,8 |
{ |
vhpt_entry_t ventry; |
ventry.word[0] = tentry.word[0]; |
ventry.word[1] = tentry.word[1]; |
ventry.word[0]=tentry.word[0]; |
ventry.word[1]=tentry.word[1]; |
return ventry; |
} |
/branches/arm/kernel/arch/ia64/include/types.h |
---|
54,6 → 54,8 |
} uint128_t; |
typedef uint64_t size_t; |
typedef uint64_t count_t; |
typedef uint64_t index_t; |
typedef uint64_t uintptr_t; |
typedef uint64_t pfn_t; |
63,13 → 65,10 |
typedef uint64_t unative_t; |
typedef int64_t native_t; |
typedef struct { |
unative_t fnc; |
unative_t gp; |
} fncptr_t; |
#define PRIp "lx" /**< Format for uintptr_t. */ |
#define PRIs "lu" /**< Format for size_t. */ |
#define PRIc "lu" /**< Format for count_t. */ |
#define PRIi "lu" /**< Format for index_t. */ |
#define PRId8 "d" /**< Format for int8_t. */ |
#define PRId16 "d" /**< Format for int16_t. */ |
/branches/arm/kernel/arch/ia64/include/byteorder.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia64_BYTEORDER_H_ |
#define KERN_ia64_BYTEORDER_H_ |
/* IA-64 is little-endian */ |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/include/asm.h |
---|
36,72 → 36,29 |
#define KERN_ia64_ASM_H_ |
#include <config.h> |
#include <typedefs.h> |
#include <arch/types.h> |
#include <arch/register.h> |
#define IA64_IOSPACE_ADDRESS 0xE001000000000000ULL |
static inline void pio_write_8(ioport8_t *port, uint8_t v) |
static inline void outb(uint64_t port,uint8_t v) |
{ |
uintptr_t prt = (uintptr_t) port; |
*((char *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v; |
*((ioport8_t *)(IA64_IOSPACE_ADDRESS + |
((prt & 0xfff) | ((prt >> 2) << 12)))) = v; |
asm volatile ("mf\n" ::: "memory"); |
} |
static inline void pio_write_16(ioport16_t *port, uint16_t v) |
{ |
uintptr_t prt = (uintptr_t) port; |
*((ioport16_t *)(IA64_IOSPACE_ADDRESS + |
((prt & 0xfff) | ((prt >> 2) << 12)))) = v; |
asm volatile ("mf\n" ::: "memory"); |
} |
static inline void pio_write_32(ioport32_t *port, uint32_t v) |
static inline uint8_t inb(uint64_t port) |
{ |
uintptr_t prt = (uintptr_t) port; |
*((ioport32_t *)(IA64_IOSPACE_ADDRESS + |
((prt & 0xfff) | ((prt >> 2) << 12)))) = v; |
asm volatile ("mf\n" ::: "memory"); |
} |
static inline uint8_t pio_read_8(ioport8_t *port) |
{ |
uintptr_t prt = (uintptr_t) port; |
asm volatile ("mf\n" ::: "memory"); |
return *((ioport8_t *)(IA64_IOSPACE_ADDRESS + |
((prt & 0xfff) | ((prt >> 2) << 12)))); |
return *((char *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))); |
} |
static inline uint16_t pio_read_16(ioport16_t *port) |
{ |
uintptr_t prt = (uintptr_t) port; |
asm volatile ("mf\n" ::: "memory"); |
return *((ioport16_t *)(IA64_IOSPACE_ADDRESS + |
((prt & 0xfff) | ((prt >> 2) << 12)))); |
} |
static inline uint32_t pio_read_32(ioport32_t *port) |
{ |
uintptr_t prt = (uintptr_t) port; |
asm volatile ("mf\n" ::: "memory"); |
return *((ioport32_t *)(IA64_IOSPACE_ADDRESS + |
((prt & 0xfff) | ((prt >> 2) << 12)))); |
} |
/** Return base address of current stack |
* |
* Return the base address of the current stack. |
112,14 → 69,9 |
{ |
uint64_t v; |
//I'm not sure why but this code bad inlines in scheduler, |
//so THE shifts about 16B and causes kernel panic |
//asm volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
//return v; |
asm volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1))); |
//this code have the same meaning but inlines well |
asm volatile ("mov %0 = r12" : "=r" (v) ); |
return v & (~(STACK_SIZE-1)); |
return v; |
} |
/** Return Processor State Register. |
171,16 → 123,6 |
return v; |
} |
static inline uint64_t cr64_read(void) |
{ |
uint64_t v; |
asm volatile ("mov %0 = cr64\n" : "=r" (v)); |
return v; |
} |
/** Write ITC (Interval Timer Counter) register. |
* |
* @param v New counter value. |
355,8 → 297,7 |
extern void cpu_sleep(void); |
extern void asm_delay_loop(uint32_t t); |
extern void switch_to_userspace(uintptr_t, uintptr_t, uintptr_t, uintptr_t, |
uint64_t, uint64_t); |
extern void switch_to_userspace(uintptr_t entry, uintptr_t sp, uintptr_t bsp, uintptr_t uspace_uarg, uint64_t ipsr, uint64_t rsc); |
#endif |
/branches/arm/kernel/arch/ia64/include/drivers/kbd.h |
---|
File deleted |
/branches/arm/kernel/arch/ia64/include/drivers/ski.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/arch/ia64/include/drivers/ega.h |
---|
0,0 → 1,50 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* 2007 Jakub Vana |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia64_EGA_H |
#define KERN_ia64_EGA_H |
#define VIDEORAM (0xe0020000000B8000LL) |
#define ROW 80 |
#define ROWS 25 |
#define SCREEN (ROW * ROWS) |
extern void ega_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/include/drivers/i8042.h |
---|
0,0 → 1,71 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
*/ |
/** |
* This file implements ia32 specific access to i8042 registers. |
*/ |
#ifndef KERN_ia64_I8042_H_ |
#define KERN_ia64_I8042_H_ |
#include <arch/asm.h> |
#include <arch/types.h> |
#define i8042_DATA 0x60 |
#define i8042_STATUS 0x64 |
static inline void i8042_data_write(uint8_t data) |
{ |
outb(i8042_DATA, data); |
} |
static inline uint8_t i8042_data_read(void) |
{ |
return inb(i8042_DATA); |
} |
static inline uint8_t i8042_status_read(void) |
{ |
return inb(i8042_STATUS); |
} |
static inline void i8042_command_write(uint8_t command) |
{ |
outb(i8042_STATUS, command); |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/include/drivers/it.h |
---|
41,7 → 41,7 |
* from firmware. |
* |
*/ |
#define IT_DELTA it_delta |
#define IT_DELTA 100000 |
extern void it_init(void); |
/branches/arm/kernel/arch/ia64/include/interrupt.h |
---|
50,13 → 50,10 |
#define IVT_FIRST 0 |
/** External Interrupt vectors. */ |
#define VECTOR_TLB_SHOOTDOWN_IPI 0xf0 |
#define INTERRUPT_TIMER 255 |
#define IRQ_KBD (0x01 + LEGACY_INTERRUPT_BASE) |
#define IRQ_MOUSE (0x0c + LEGACY_INTERRUPT_BASE) |
#define IRQ_KBD 241 |
#define IRQ_MOUSE 252 |
#define INTERRUPT_SPURIOUS 15 |
#define LEGACY_INTERRUPT_BASE 0x20 |
/** General Exception codes. */ |
#define GE_ILLEGALOP 0 |
117,7 → 114,7 |
/* |
* The following variables are defined only for break_instruction |
* handler. |
* handler. |
*/ |
uint64_t in0; |
uint64_t in1; |
153,8 → 150,6 |
extern void external_interrupt(uint64_t vector, istate_t *istate); |
extern void disabled_fp_register(uint64_t vector, istate_t *istate); |
extern void trap_virtual_enable_irqs(uint16_t irqmask); |
#endif |
/** @} |
/branches/arm/kernel/arch/ia64/include/bootinfo.h |
---|
29,23 → 29,13 |
#ifndef KERN_ia64_BOOTINFO_H_ |
#define KERN_ia64_BOOTINFO_H_ |
#define BOOTINFO_ADDRESS 0x4401000 |
#define CONFIG_INIT_TASKS 32 |
#define MEMMAP_ITEMS 128 |
#define EFI_MEMMAP_FREE_MEM 0 |
#define EFI_MEMMAP_IO 1 |
#define EFI_MEMMAP_IO_PORTS 2 |
/** Size of buffer for storing task name in binit_task_t. */ |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
typedef struct { |
void *addr; |
unsigned long size; |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} binit_task_t; |
typedef struct { |
53,24 → 43,9 |
binit_task_t tasks[CONFIG_INIT_TASKS]; |
} binit_t; |
typedef struct { |
unsigned int type; |
unsigned long base; |
unsigned long size; |
}efi_memmap_item_t; |
typedef struct { |
binit_t taskmap; |
efi_memmap_item_t memmap[MEMMAP_ITEMS]; |
unsigned int memmap_items; |
unsigned long * sapic; |
unsigned long sys_freq; |
unsigned long freq_scale; |
unsigned int wakeup_intno; |
int hello_configured; |
} bootinfo_t; |
extern bootinfo_t *bootinfo; |
/branches/arm/kernel/arch/ia64/include/fpu_context.h |
---|
35,6 → 35,7 |
#ifndef KERN_ia64_FPU_CONTEXT_H_ |
#define KERN_ia64_FPU_CONTEXT_H_ |
#define ARCH_HAS_FPU 1 |
#define FPU_CONTEXT_ALIGN 16 |
#include <arch/types.h> |
/branches/arm/kernel/arch/ia64/include/cpu.h |
---|
38,7 → 38,6 |
#include <arch/types.h> |
#include <arch/register.h> |
#include <arch/asm.h> |
#include <arch/bootinfo.h> |
#define FAMILY_ITANIUM 0x7 |
#define FAMILY_ITANIUM2 0x1f |
64,32 → 63,6 |
return v; |
} |
#define CR64_ID_SHIFT 24 |
#define CR64_ID_MASK 0xff000000 |
#define CR64_EID_SHIFT 16 |
#define CR64_EID_MASK 0xff0000 |
static inline int ia64_get_cpu_id(void) |
{ |
uint64_t cr64=cr64_read(); |
return ((CR64_ID_MASK)&cr64)>>CR64_ID_SHIFT; |
} |
static inline int ia64_get_cpu_eid(void) |
{ |
uint64_t cr64=cr64_read(); |
return ((CR64_EID_MASK)&cr64)>>CR64_EID_SHIFT; |
} |
static inline void ipi_send_ipi(int id, int eid, int intno) |
{ |
(bootinfo->sapic)[2 * (id * 256 + eid)] = intno; |
srlz_d(); |
} |
#endif |
/** @} |
/branches/arm/kernel/arch/ia64/include/atomic.h |
---|
37,65 → 37,29 |
/** Atomic addition. |
* |
* @param val Atomic value. |
* @param imm Value to add. |
* @param val Atomic value. |
* @param imm Value to add. |
* |
* @return Value before addition. |
* @return Value before addition. |
*/ |
static inline long atomic_add(atomic_t *val, int imm) |
{ |
long v; |
asm volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), |
"+m" (val->count) : "i" (imm)); |
asm volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), "+m" (val->count) : "i" (imm)); |
return v; |
} |
static inline void atomic_inc(atomic_t *val) { atomic_add(val, 1); } |
static inline void atomic_dec(atomic_t *val) { atomic_add(val, -1); } |
static inline uint64_t test_and_set(atomic_t *val) { |
uint64_t v; |
asm volatile ( |
"movl %0 = 0x01;;\n" |
"xchg8 %0 = %1, %0;;\n" |
: "=r" (v), "+m" (val->count) |
); |
return v; |
} |
static inline long atomic_preinc(atomic_t *val) { return atomic_add(val, 1) + 1; } |
static inline long atomic_predec(atomic_t *val) { return atomic_add(val, -1) - 1; } |
static inline long atomic_postinc(atomic_t *val) { return atomic_add(val, 1); } |
static inline long atomic_postdec(atomic_t *val) { return atomic_add(val, -1); } |
static inline void atomic_inc(atomic_t *val) |
{ |
atomic_add(val, 1); |
} |
static inline void atomic_dec(atomic_t *val) |
{ |
atomic_add(val, -1); |
} |
static inline long atomic_preinc(atomic_t *val) |
{ |
return atomic_add(val, 1) + 1; |
} |
static inline long atomic_predec(atomic_t *val) |
{ |
return atomic_add(val, -1) - 1; |
} |
static inline long atomic_postinc(atomic_t *val) |
{ |
return atomic_add(val, 1); |
} |
static inline long atomic_postdec(atomic_t *val) |
{ |
return atomic_add(val, -1); |
} |
#endif |
/** @} |
/branches/arm/kernel/arch/ia64/include/ski/ski.h |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia64_SKI_H_ |
#define KERN_ia64_SKI_H_ |
#include <arch/types.h> |
#include <console/console.h> |
#define SKI_INIT_CONSOLE 20 |
#define SKI_GETCHAR 21 |
#define SKI_PUTCHAR 31 |
extern chardev_t ski_uconsole; |
extern void ski_init_console(void); |
extern void ski_kbd_grab(void); |
extern void ski_kbd_release(void); |
extern void kkbdpoll(void *arg); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia64/include/arch.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia64 |
/** @addtogroup ia64 |
* @{ |
*/ |
/** @file |
37,10 → 37,8 |
#define LOADED_PROG_STACK_PAGES_NO 2 |
#include <arch/drivers/ski.h> |
#include <arch/ski/ski.h> |
extern void arch_pre_main(void); |
#endif |
/** @} |
/branches/arm/kernel/arch/ia64/include/proc/task.h |
---|
31,19 → 31,14 |
*/ |
/** @file |
*/ |
#include <proc/task.h> |
#ifndef KERN_ia64_TASK_H_ |
#define KERN_ia64_TASK_H_ |
#include <adt/bitmap.h> |
typedef struct { |
bitmap_t *iomap; |
} task_arch_t; |
#define task_create_arch(t) { (t)->arch.iomap = NULL; } |
#define task_create_arch(t) |
#define task_destroy_arch(t) |
#endif |
/branches/arm/kernel/arch/ia64/include/register.h |
---|
40,11 → 40,11 |
#define PSR_I_MASK 0x4000 |
#define PSR_PK_MASK 0x8000 |
#define PSR_DT_MASK (1 << 17) |
#define PSR_RT_MASK (1 << 27) |
#define PSR_DT_MASK (1<<17) |
#define PSR_RT_MASK (1<<27) |
#define PSR_DFL_MASK (1 << 18) |
#define PSR_DFH_MASK (1 << 19) |
#define PSR_DFL_MASK (1<<18) |
#define PSR_DFH_MASK (1<<19) |
#define PSR_IT_MASK 0x0000001000000000 |
/branches/arm/kernel/arch/ia64/include/debug.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2005 Ondrej Palkovsky |
* Copyright (c) 2005 |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
/branches/arm/kernel/arch/ia32/include/syscall.h |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32/include/atomic.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
41,29 → 41,17 |
static inline void atomic_inc(atomic_t *val) { |
#ifdef CONFIG_SMP |
asm volatile ( |
"lock incl %[count]\n" |
: [count] "+m" (val->count) |
); |
asm volatile ("lock incl %0\n" : "+m" (val->count)); |
#else |
asm volatile ( |
"incl %[count]\n" |
: [count] "+m" (val->count) |
); |
asm volatile ("incl %0\n" : "+m" (val->count)); |
#endif /* CONFIG_SMP */ |
} |
static inline void atomic_dec(atomic_t *val) { |
#ifdef CONFIG_SMP |
asm volatile ( |
"lock decl %[count]\n" |
: [count] "+m" (val->count) |
); |
asm volatile ("lock decl %0\n" : "+m" (val->count)); |
#else |
asm volatile ( |
"decl %[count]\n" |
: [count] "+m" (val->count) |
); |
asm volatile ("decl %0\n" : "+m" (val->count)); |
#endif /* CONFIG_SMP */ |
} |
70,12 → 58,12 |
static inline long atomic_postinc(atomic_t *val) |
{ |
long r = 1; |
asm volatile ( |
"lock xaddl %[r], %[count]\n" |
: [count] "+m" (val->count), [r] "+r" (r) |
"lock xaddl %1, %0\n" |
: "+m" (val->count), "+r" (r) |
); |
return r; |
} |
84,23 → 72,23 |
long r = -1; |
asm volatile ( |
"lock xaddl %[r], %[count]\n" |
: [count] "+m" (val->count), [r] "+r"(r) |
"lock xaddl %1, %0\n" |
: "+m" (val->count), "+r"(r) |
); |
return r; |
} |
#define atomic_preinc(val) (atomic_postinc(val) + 1) |
#define atomic_predec(val) (atomic_postdec(val) - 1) |
#define atomic_preinc(val) (atomic_postinc(val) + 1) |
#define atomic_predec(val) (atomic_postdec(val) - 1) |
static inline uint32_t test_and_set(atomic_t *val) { |
uint32_t v; |
asm volatile ( |
"movl $1, %[v]\n" |
"xchgl %[v], %[count]\n" |
: [v] "=r" (v), [count] "+m" (val->count) |
"movl $1, %0\n" |
"xchgl %0, %1\n" |
: "=r" (v),"+m" (val->count) |
); |
return v; |
110,20 → 98,22 |
static inline void atomic_lock_arch(atomic_t *val) |
{ |
uint32_t tmp; |
preemption_disable(); |
asm volatile ( |
"0:\n" |
"pause\n" /* Pentium 4's HT love this instruction */ |
"mov %[count], %[tmp]\n" |
"testl %[tmp], %[tmp]\n" |
#ifdef CONFIG_HT |
"pause\n" /* Pentium 4's HT love this instruction */ |
#endif |
"mov %0, %1\n" |
"testl %1, %1\n" |
"jnz 0b\n" /* lightweight looping on locked spinlock */ |
"incl %[tmp]\n" /* now use the atomic operation */ |
"xchgl %[count], %[tmp]\n" |
"testl %[tmp], %[tmp]\n" |
"incl %1\n" /* now use the atomic operation */ |
"xchgl %0, %1\n" |
"testl %1, %1\n" |
"jnz 0b\n" |
: [count] "+m" (val->count), [tmp] "=&r" (tmp) |
: "+m" (val->count), "=&r"(tmp) |
); |
/* |
* Prevent critical section code from bleeding out this way up. |
/branches/arm/kernel/arch/ia32/include/mm/page.h |
---|
95,21 → 95,21 |
/* Get PTE flags accessors for each level. */ |
#define GET_PTL1_FLAGS_ARCH(ptl0, i) \ |
get_pt_flags((pte_t *) (ptl0), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl0), (index_t) (i)) |
#define GET_PTL2_FLAGS_ARCH(ptl1, i) \ |
PAGE_PRESENT |
#define GET_PTL3_FLAGS_ARCH(ptl2, i) \ |
PAGE_PRESENT |
#define GET_FRAME_FLAGS_ARCH(ptl3, i) \ |
get_pt_flags((pte_t *) (ptl3), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl3), (index_t) (i)) |
/* Set PTE flags accessors for each level. */ |
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ |
set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x)) |
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ |
set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x)) |
/* Macros for querying the last level entries. */ |
#define PTE_VALID_ARCH(p) \ |
145,7 → 145,7 |
/** When bit on this position is 1, a reserved bit was set in page directory. */ |
#define PFERR_CODE_RSVD (1 << 3) |
static inline int get_pt_flags(pte_t *pt, size_t i) |
static inline int get_pt_flags(pte_t *pt, index_t i) |
{ |
pte_t *p = &pt[i]; |
158,7 → 158,7 |
p->global << PAGE_GLOBAL_SHIFT); |
} |
static inline void set_pt_flags(pte_t *pt, size_t i, int flags) |
static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
{ |
pte_t *p = &pt[i]; |
/branches/arm/kernel/arch/ia32/include/mm/frame.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32mm |
/** @addtogroup ia32mm |
* @{ |
*/ |
/** @file |
35,8 → 35,8 |
#ifndef KERN_ia32_FRAME_H_ |
#define KERN_ia32_FRAME_H_ |
#define FRAME_WIDTH 12 /* 4K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#define FRAME_WIDTH 12 /* 4K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#ifdef KERNEL |
#ifndef __ASM__ |
/branches/arm/kernel/arch/ia32/include/mm/as.h |
---|
42,7 → 42,7 |
#define USER_ADDRESS_SPACE_START_ARCH ((unsigned long) 0x00000000) |
#define USER_ADDRESS_SPACE_END_ARCH ((unsigned long) 0x7fffffff) |
#define USTACK_ADDRESS_ARCH (USER_ADDRESS_SPACE_END_ARCH - (PAGE_SIZE - 1)) |
#define USTACK_ADDRESS_ARCH (USER_ADDRESS_SPACE_END_ARCH-(PAGE_SIZE-1)) |
typedef struct { |
} as_arch_t; |
/branches/arm/kernel/arch/ia32/include/mm/tlb.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32mm |
/** @addtogroup ia32mm |
* @{ |
*/ |
/** @file |
35,6 → 35,9 |
#ifndef KERN_ia32_TLB_H_ |
#define KERN_ia32_TLB_H_ |
#define tlb_arch_init() |
#define tlb_print() |
#endif |
/** @} |
/branches/arm/kernel/arch/ia32/include/barrier.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
46,8 → 46,8 |
* Provisions are made to prevent compiler from reordering instructions itself. |
*/ |
#define CS_ENTER_BARRIER() asm volatile ("" ::: "memory") |
#define CS_LEAVE_BARRIER() asm volatile ("" ::: "memory") |
#define CS_ENTER_BARRIER() asm volatile ("" ::: "memory") |
#define CS_LEAVE_BARRIER() asm volatile ("" ::: "memory") |
static inline void cpuid_serialization(void) |
{ |
58,30 → 58,30 |
); |
} |
#if defined(CONFIG_FENCES_P4) |
#define memory_barrier() asm volatile ("mfence\n" ::: "memory") |
#define read_barrier() asm volatile ("lfence\n" ::: "memory") |
#ifdef CONFIG_WEAK_MEMORY |
#define write_barrier() asm volatile ("sfence\n" ::: "memory") |
#else |
#define write_barrier() asm volatile ("" ::: "memory"); |
#endif |
#elif defined(CONFIG_FENCES_P3) |
#define memory_barrier() cpuid_serialization() |
#define read_barrier() cpuid_serialization() |
#ifdef CONFIG_WEAK_MEMORY |
#define write_barrier() asm volatile ("sfence\n" ::: "memory") |
#else |
#define write_barrier() asm volatile ("" ::: "memory"); |
#endif |
#ifdef CONFIG_FENCES_P4 |
# define memory_barrier() asm volatile ("mfence\n" ::: "memory") |
# define read_barrier() asm volatile ("lfence\n" ::: "memory") |
# ifdef CONFIG_WEAK_MEMORY |
# define write_barrier() asm volatile ("sfence\n" ::: "memory") |
# else |
# define write_barrier() asm volatile( "" ::: "memory"); |
# endif |
#elif CONFIG_FENCES_P3 |
# define memory_barrier() cpuid_serialization() |
# define read_barrier() cpuid_serialization() |
# ifdef CONFIG_WEAK_MEMORY |
# define write_barrier() asm volatile ("sfence\n" ::: "memory") |
# else |
# define write_barrier() asm volatile( "" ::: "memory"); |
# endif |
#else |
#define memory_barrier() cpuid_serialization() |
#define read_barrier() cpuid_serialization() |
#ifdef CONFIG_WEAK_MEMORY |
#define write_barrier() cpuid_serialization() |
#else |
#define write_barrier() asm volatile ("" ::: "memory"); |
#endif |
# define memory_barrier() cpuid_serialization() |
# define read_barrier() cpuid_serialization() |
# ifdef CONFIG_WEAK_MEMORY |
# define write_barrier() cpuid_serialization() |
# else |
# define write_barrier() asm volatile( "" ::: "memory"); |
# endif |
#endif |
/* |
90,8 → 90,8 |
* queueing in the store buffer drain to the memory (even though it would be |
* sufficient for them to drain to the D-cache). |
*/ |
#define smc_coherence(a) write_barrier() |
#define smc_coherence_block(a, l) write_barrier() |
#define smc_coherence(a) write_barrier() |
#define smc_coherence_block(a, l) write_barrier() |
#endif |
/branches/arm/kernel/arch/ia32/include/types.h |
---|
46,6 → 46,8 |
typedef unsigned long long uint64_t; |
typedef uint32_t size_t; |
typedef uint32_t count_t; |
typedef uint32_t index_t; |
typedef uint32_t uintptr_t; |
typedef uint32_t pfn_t; |
55,11 → 57,10 |
typedef uint32_t unative_t; |
typedef int32_t native_t; |
typedef struct { |
} fncptr_t; |
#define PRIp "x" /**< Format for uintptr_t. */ |
#define PRIs "u" /**< Format for size_t. */ |
#define PRIc "u" /**< Format for count_t. */ |
#define PRIi "u" /**< Format for index_t. */ |
#define PRId8 "d" /**< Format for int8_t. */ |
#define PRId16 "d" /**< Format for int16_t. */ |
/branches/arm/kernel/arch/ia32/include/smp/smp.h |
---|
39,10 → 39,10 |
/** SMP config opertaions interface. */ |
struct smp_config_operations { |
size_t (* cpu_count)(void); /**< Return number of detected processors. */ |
bool (* cpu_enabled)(size_t i); /**< Check whether the processor of index i is enabled. */ |
bool (*cpu_bootstrap)(size_t i); /**< Check whether the processor of index i is BSP. */ |
uint8_t (*cpu_apic_id)(size_t i); /**< Return APIC ID of the processor of index i. */ |
count_t (* cpu_count)(void); /**< Return number of detected processors. */ |
bool (* cpu_enabled)(index_t i); /**< Check whether the processor of index i is enabled. */ |
bool (*cpu_bootstrap)(index_t i); /**< Check whether the processor of index i is BSP. */ |
uint8_t (*cpu_apic_id)(index_t i); /**< Return APIC ID of the processor of index i. */ |
int (*irq_to_pin)(unsigned int irq); /**< Return mapping between irq and APIC pin. */ |
}; |
/branches/arm/kernel/arch/ia32/include/byteorder.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32_BYTEORDER_H_ |
#define KERN_ia32_BYTEORDER_H_ |
/* IA-32 is little-endian */ |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32/include/boot/memmap.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
35,29 → 35,24 |
#ifndef KERN_ia32_MEMMAP_H_ |
#define KERN_ia32_MEMMAP_H_ |
/* E820h memory range types */ |
/* E820h memory range types - other values*/ |
/* Free memory */ |
#define MEMMAP_MEMORY_AVAILABLE 1 |
/* Not available for OS */ |
#define MEMMAP_MEMORY_RESERVED 2 |
/* OS may use it after reading ACPI table */ |
#define MEMMAP_MEMORY_ACPI 3 |
/* Unusable, required to be saved and restored across an NVS sleep */ |
#define MEMMAP_MEMORY_NVS 4 |
/* Corrupted memory */ |
#define MEMMAP_MEMORY_UNUSABLE 5 |
/* Free memory */ |
#define MEMMAP_MEMORY_AVAILABLE 1 |
/* size of one entry */ |
#define MEMMAP_E820_RECORD_SIZE 20 |
/* maximum entries */ |
#define MEMMAP_E820_MAX_RECORDS 32 |
/* Not available for OS */ |
#define MEMMAP_MEMORY_RESERVED 2 |
/* OS may use it after reading ACPI table */ |
#define MEMMAP_MEMORY_ACPI 3 |
/* Unusable, required to be saved and restored across an NVS sleep */ |
#define MEMMAP_MEMORY_NVS 4 |
/* Corrupted memory */ |
#define MEMMAP_MEMORY_UNUSABLE 5 |
/* Size of one entry */ |
#define MEMMAP_E820_RECORD_SIZE 20 |
/* Maximum entries */ |
#define MEMMAP_E820_MAX_RECORDS 32 |
#ifndef __ASM__ |
#include <arch/types.h> |
/branches/arm/kernel/arch/ia32/include/boot/boot.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
35,24 → 35,15 |
#ifndef KERN_ia32_BOOT_H_ |
#define KERN_ia32_BOOT_H_ |
#define BOOT_OFFSET 0x108000 |
#define AP_BOOT_OFFSET 0x8000 |
#define BOOT_STACK_SIZE 0x400 |
#define BOOT_OFFSET 0x108000 |
#define AP_BOOT_OFFSET 0x8000 |
#define BOOT_STACK_SIZE 0x400 |
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002 |
#define MULTIBOOT_HEADER_FLAGS 0x00010003 |
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002 |
#define MULTIBOOT_HEADER_FLAGS 0x00010003 |
#ifndef __ASM__ |
#define MULTIBOOT_LOADER_MAGIC 0x2BADB002 |
#ifdef CONFIG_SMP |
/* This is only a symbol so the type is dummy. Obtain the value using &. */ |
extern int _hardcoded_unmapped_size; |
#endif /* CONFIG_SMP */ |
#endif /* __ASM__ */ |
#endif |
/** @} |
/branches/arm/kernel/arch/ia32/include/proc/task.h |
---|
40,7 → 40,7 |
typedef struct { |
/** I/O Permission bitmap Generation counter. */ |
size_t iomapver; |
count_t iomapver; |
/** I/O Permission bitmap. */ |
bitmap_t iomap; |
} task_arch_t; |
/branches/arm/kernel/arch/ia32/include/interrupt.h |
---|
72,6 → 72,10 |
uint32_t eax; |
uint32_t ecx; |
uint32_t edx; |
uint32_t esi; |
uint32_t edi; |
uint32_t ebp; |
uint32_t ebx; |
uint32_t gs; |
uint32_t fs; |
/branches/arm/kernel/arch/ia32/include/pm.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
35,59 → 35,61 |
#ifndef KERN_ia32_PM_H_ |
#define KERN_ia32_PM_H_ |
#define IDT_ITEMS 64 |
#define GDT_ITEMS 7 |
#define IDT_ITEMS 64 |
#define GDT_ITEMS 7 |
#define NULL_DES 0 |
#define KTEXT_DES 1 |
#define KDATA_DES 2 |
#define UTEXT_DES 3 |
#define UDATA_DES 4 |
#define TSS_DES 5 |
#define TLS_DES 6 /* Pointer to Thread-Local-Storage data */ |
#define VESA_INIT_SEGMENT 0x8000 |
#define NULL_DES 0 |
#define KTEXT_DES 1 |
#define KDATA_DES 2 |
#define UTEXT_DES 3 |
#define UDATA_DES 4 |
#define TSS_DES 5 |
#define TLS_DES 6 /* Pointer to Thread-Local-Storage data */ |
#ifdef CONFIG_FB |
#define VESA_INIT_SEGMENT 0x8000 |
#define VESA_INIT_DES 7 |
#define KTEXT32_DES KTEXT_DES |
#define VESA_INIT_SEGMENT 0x8000 |
#define VESA_INIT_DES 7 |
#undef GDT_ITEMS |
#define GDT_ITEMS 8 |
#define GDT_ITEMS 8 |
#endif /* CONFIG_FB */ |
#define gdtselector(des) ((des) << 3) |
#define PL_KERNEL 0 |
#define PL_USER 3 |
#define selector(des) ((des) << 3) |
#define AR_PRESENT (1 << 7) |
#define AR_DATA (2 << 3) |
#define AR_CODE (3 << 3) |
#define AR_WRITABLE (1 << 1) |
#define AR_INTERRUPT (0x0e) |
#define AR_TSS (0x09) |
#define PL_KERNEL 0 |
#define PL_USER 3 |
#define DPL_KERNEL (PL_KERNEL << 5) |
#define DPL_USER (PL_USER << 5) |
#define AR_PRESENT (1 << 7) |
#define AR_DATA (2 << 3) |
#define AR_CODE (3 << 3) |
#define AR_WRITABLE (1 << 1) |
#define AR_INTERRUPT (0xe) |
#define AR_TSS (0x9) |
#define TSS_BASIC_SIZE 104 |
#define TSS_IOMAP_SIZE (16 * 1024 + 1) /* 16K for bitmap + 1 terminating byte for convenience */ |
#define DPL_KERNEL (PL_KERNEL << 5) |
#define DPL_USER (PL_USER << 5) |
#define IO_PORTS (64 * 1024) |
#define TSS_BASIC_SIZE 104 |
#define TSS_IOMAP_SIZE (16 * 1024 + 1) /* 16K for bitmap + 1 terminating byte for convenience */ |
#define IO_PORTS (64 * 1024) |
#ifndef __ASM__ |
#include <arch/types.h> |
#include <arch/context.h> |
typedef struct { |
struct ptr_16_32 { |
uint16_t limit; |
uint32_t base; |
} __attribute__ ((packed)) ptr_16_32_t; |
} __attribute__ ((packed)); |
typedef struct ptr_16_32 ptr_16_32_t; |
typedef struct { |
struct descriptor { |
unsigned limit_0_15: 16; |
unsigned base_0_15: 16; |
unsigned base_16_23: 8; |
98,17 → 100,19 |
unsigned special: 1; |
unsigned granularity : 1; |
unsigned base_24_31: 8; |
} __attribute__ ((packed)) descriptor_t; |
} __attribute__ ((packed)); |
typedef struct descriptor descriptor_t; |
typedef struct { |
struct idescriptor { |
unsigned offset_0_15: 16; |
unsigned selector: 16; |
unsigned unused: 8; |
unsigned access: 8; |
unsigned offset_16_31: 16; |
} __attribute__ ((packed)) idescriptor_t; |
} __attribute__ ((packed)); |
typedef struct idescriptor idescriptor_t; |
typedef struct { |
struct tss { |
uint16_t link; |
unsigned : 16; |
uint32_t esp0; |
148,12 → 152,13 |
unsigned : 16; |
uint16_t iomap_base; |
uint8_t iomap[TSS_IOMAP_SIZE]; |
} __attribute__ ((packed)) tss_t; |
} __attribute__ ((packed)); |
typedef struct tss tss_t; |
extern ptr_16_32_t gdtr; |
extern ptr_16_32_t bootstrap_gdtr; |
extern ptr_16_32_t protected_ap_gdtr; |
extern tss_t *tss_p; |
extern struct tss *tss_p; |
extern descriptor_t gdt[]; |
/branches/arm/kernel/arch/ia32/include/asm.h |
---|
27,7 → 27,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
38,7 → 38,6 |
#include <arch/pm.h> |
#include <arch/types.h> |
#include <typedefs.h> |
#include <config.h> |
extern uint32_t interrupt_handler_size; |
56,16 → 55,11 |
/** Halt CPU |
* |
* Halt the current CPU. |
* |
* Halt the current CPU until interrupt event. |
*/ |
static inline void cpu_halt(void) |
{ |
asm volatile ( |
"0:\n" |
" hlt\n" |
" jmp 0b\n" |
); |
asm volatile ("hlt\n"); |
} |
static inline void cpu_sleep(void) |
74,22 → 68,16 |
} |
#define GEN_READ_REG(reg) static inline unative_t read_ ##reg (void) \ |
{ \ |
unative_t res; \ |
asm volatile ( \ |
"movl %%" #reg ", %[res]" \ |
: [res] "=r" (res) \ |
); \ |
return res; \ |
} |
{ \ |
unative_t res; \ |
asm volatile ("movl %%" #reg ", %0" : "=r" (res) ); \ |
return res; \ |
} |
#define GEN_WRITE_REG(reg) static inline void write_ ##reg (unative_t regn) \ |
{ \ |
asm volatile ( \ |
"movl %[regn], %%" #reg \ |
:: [regn] "r" (regn) \ |
); \ |
} |
{ \ |
asm volatile ("movl %0, %%" #reg : : "r" (regn)); \ |
} |
GEN_READ_REG(cr0) |
GEN_READ_REG(cr2) |
116,14 → 104,10 |
* |
* @param port Port to write to |
* @param val Value to write |
* |
*/ |
static inline void pio_write_8(ioport8_t *port, uint8_t val) |
static inline void outb(uint16_t port, uint8_t val) |
{ |
asm volatile ( |
"outb %b[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); |
} |
/** Word to port |
132,14 → 116,10 |
* |
* @param port Port to write to |
* @param val Value to write |
* |
*/ |
static inline void pio_write_16(ioport16_t *port, uint16_t val) |
static inline void outw(uint16_t port, uint16_t val) |
{ |
asm volatile ( |
"outw %w[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
asm volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); |
} |
/** Double word to port |
148,14 → 128,10 |
* |
* @param port Port to write to |
* @param val Value to write |
* |
*/ |
static inline void pio_write_32(ioport32_t *port, uint32_t val) |
static inline void outl(uint16_t port, uint32_t val) |
{ |
asm volatile ( |
"outl %[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
asm volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); |
} |
/** Byte from port |
164,18 → 140,12 |
* |
* @param port Port to read from |
* @return Value read |
* |
*/ |
static inline uint8_t pio_read_8(ioport8_t *port) |
static inline uint8_t inb(uint16_t port) |
{ |
uint8_t val; |
asm volatile ( |
"inb %w[port], %b[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) ); |
return val; |
} |
185,18 → 155,12 |
* |
* @param port Port to read from |
* @return Value read |
* |
*/ |
static inline uint16_t pio_read_16(ioport16_t *port) |
static inline uint16_t inw(uint16_t port) |
{ |
uint16_t val; |
asm volatile ( |
"inw %w[port], %w[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
asm volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port) ); |
return val; |
} |
206,18 → 170,12 |
* |
* @param port Port to read from |
* @return Value read |
* |
*/ |
static inline uint32_t pio_read_32(ioport32_t *port) |
static inline uint32_t inl(uint16_t port) |
{ |
uint32_t val; |
asm volatile ( |
"inl %w[port], %[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
asm volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) ); |
return val; |
} |
227,19 → 185,16 |
* value of EFLAGS. |
* |
* @return Old interrupt priority level. |
* |
*/ |
static inline ipl_t interrupts_enable(void) |
{ |
ipl_t v; |
asm volatile ( |
"pushf\n" |
"popl %[v]\n" |
"pushf\n\t" |
"popl %0\n\t" |
"sti\n" |
: [v] "=r" (v) |
: "=r" (v) |
); |
return v; |
} |
249,19 → 204,16 |
* value of EFLAGS. |
* |
* @return Old interrupt priority level. |
* |
*/ |
static inline ipl_t interrupts_disable(void) |
{ |
ipl_t v; |
asm volatile ( |
"pushf\n" |
"popl %[v]\n" |
"pushf\n\t" |
"popl %0\n\t" |
"cli\n" |
: [v] "=r" (v) |
: "=r" (v) |
); |
return v; |
} |
270,14 → 222,13 |
* Restore EFLAGS. |
* |
* @param ipl Saved interrupt priority level. |
* |
*/ |
static inline void interrupts_restore(ipl_t ipl) |
{ |
asm volatile ( |
"pushl %[ipl]\n" |
"pushl %0\n\t" |
"popf\n" |
:: [ipl] "r" (ipl) |
: : "r" (ipl) |
); |
} |
284,51 → 235,23 |
/** Return interrupt priority level. |
* |
* @return EFLAFS. |
* |
*/ |
static inline ipl_t interrupts_read(void) |
{ |
ipl_t v; |
asm volatile ( |
"pushf\n" |
"popl %[v]\n" |
: [v] "=r" (v) |
"pushf\n\t" |
"popl %0\n" |
: "=r" (v) |
); |
return v; |
} |
/** Write to MSR */ |
static inline void write_msr(uint32_t msr, uint64_t value) |
{ |
asm volatile ( |
"wrmsr" |
:: "c" (msr), "a" ((uint32_t) (value)), |
"d" ((uint32_t) (value >> 32)) |
); |
} |
static inline uint64_t read_msr(uint32_t msr) |
{ |
uint32_t ax, dx; |
asm volatile ( |
"rdmsr" |
: "=a" (ax), "=d" (dx) |
: "c" (msr) |
); |
return ((uint64_t) dx << 32) | ax; |
} |
/** Return base address of current stack |
* |
* Return the base address of the current stack. |
* The stack is assumed to be STACK_SIZE bytes long. |
* The stack must start on page boundary. |
* |
*/ |
static inline uintptr_t get_stack_base(void) |
{ |
335,8 → 258,8 |
uintptr_t v; |
asm volatile ( |
"andl %%esp, %[v]\n" |
: [v] "=r" (v) |
"andl %%esp, %0\n" |
: "=r" (v) |
: "0" (~(STACK_SIZE - 1)) |
); |
347,12 → 270,11 |
static inline uintptr_t * get_ip() |
{ |
uintptr_t *ip; |
asm volatile ( |
"mov %%eip, %[ip]" |
: [ip] "=r" (ip) |
); |
"mov %%eip, %0" |
: "=r" (ip) |
); |
return ip; |
} |
359,66 → 281,46 |
/** Invalidate TLB Entry. |
* |
* @param addr Address on a page whose TLB entry is to be invalidated. |
* |
*/ |
static inline void invlpg(uintptr_t addr) |
{ |
asm volatile ( |
"invlpg %[addr]\n" |
:: [addr] "m" (*(unative_t *) addr) |
); |
asm volatile ("invlpg %0\n" :: "m" (*(unative_t *)addr)); |
} |
/** Load GDTR register from memory. |
* |
* @param gdtr_reg Address of memory from where to load GDTR. |
* |
*/ |
static inline void gdtr_load(ptr_16_32_t *gdtr_reg) |
{ |
asm volatile ( |
"lgdtl %[gdtr_reg]\n" |
:: [gdtr_reg] "m" (*gdtr_reg) |
); |
asm volatile ("lgdtl %0\n" : : "m" (*gdtr_reg)); |
} |
/** Store GDTR register to memory. |
* |
* @param gdtr_reg Address of memory to where to load GDTR. |
* |
*/ |
static inline void gdtr_store(ptr_16_32_t *gdtr_reg) |
{ |
asm volatile ( |
"sgdtl %[gdtr_reg]\n" |
:: [gdtr_reg] "m" (*gdtr_reg) |
); |
asm volatile ("sgdtl %0\n" : : "m" (*gdtr_reg)); |
} |
/** Load IDTR register from memory. |
* |
* @param idtr_reg Address of memory from where to load IDTR. |
* |
*/ |
static inline void idtr_load(ptr_16_32_t *idtr_reg) |
{ |
asm volatile ( |
"lidtl %[idtr_reg]\n" |
:: [idtr_reg] "m" (*idtr_reg) |
); |
asm volatile ("lidtl %0\n" : : "m" (*idtr_reg)); |
} |
/** Load TR from descriptor table. |
* |
* @param sel Selector specifying descriptor of TSS segment. |
* |
*/ |
static inline void tr_load(uint16_t sel) |
{ |
asm volatile ( |
"ltr %[sel]" |
:: [sel] "r" (sel) |
); |
asm volatile ("ltr %0" : : "r" (sel)); |
} |
#endif |
/branches/arm/kernel/arch/ia32/include/cpuid.h |
---|
35,13 → 35,6 |
#ifndef KERN_ia32_CPUID_H_ |
#define KERN_ia32_CPUID_H_ |
#define INTEL_CPUID_LEVEL 0x00000000 |
#define INTEL_CPUID_STANDARD 0x00000001 |
#define INTEL_PSE 3 |
#define INTEL_SEP 11 |
#ifndef __ASM__ |
#include <arch/types.h> |
typedef struct { |
81,21 → 74,21 |
uint32_t val, ret; |
asm volatile ( |
"pushf\n" /* read flags */ |
"popl %[ret]\n" |
"movl %[ret], %[val]\n" |
"pushf\n" /* read flags */ |
"popl %0\n" |
"movl %0, %1\n" |
"btcl $21, %[val]\n" /* swap the ID bit */ |
"btcl $21, %1\n" /* swap the ID bit */ |
"pushl %[val]\n" /* propagate the change into flags */ |
"pushl %1\n" /* propagate the change into flags */ |
"popf\n" |
"pushf\n" |
"popl %[val]\n" |
"popl %1\n" |
"andl $(1 << 21), %[ret]\n" /* interrested only in ID bit */ |
"andl $(1 << 21), %[val]\n" |
"xorl %[val], %[ret]\n" |
: [ret] "=r" (ret), [val] "=r" (val) |
"andl $(1 << 21), %0\n" /* interrested only in ID bit */ |
"andl $(1 << 21), %1\n" |
"xorl %1, %0\n" |
: "=r" (ret), "=r" (val) |
); |
return ret; |
105,13 → 98,11 |
{ |
asm volatile ( |
"cpuid\n" |
: "=a" (info->cpuid_eax), "=b" (info->cpuid_ebx), |
"=c" (info->cpuid_ecx), "=d" (info->cpuid_edx) |
: "=a" (info->cpuid_eax), "=b" (info->cpuid_ebx), "=c" (info->cpuid_ecx), "=d" (info->cpuid_edx) |
: "a" (cmd) |
); |
} |
#endif /* !def __ASM__ */ |
#endif |
/** @} |
/branches/arm/kernel/arch/ia32/include/cpu.h |
---|
35,33 → 35,25 |
#ifndef KERN_ia32_CPU_H_ |
#define KERN_ia32_CPU_H_ |
#include <arch/pm.h> |
#include <arch/asm.h> |
#define EFLAGS_IF (1 << 9) |
#define EFLAGS_RF (1 << 16) |
#define CR4_OSFXSR_MASK (1<<9) |
/* Support for SYSENTER and SYSEXIT */ |
#define IA32_MSR_SYSENTER_CS 0x174 |
#define IA32_MSR_SYSENTER_ESP 0x175 |
#define IA32_MSR_SYSENTER_EIP 0x176 |
#ifndef __ASM__ |
#include <arch/pm.h> |
#include <arch/asm.h> |
typedef struct { |
unsigned int vendor; |
unsigned int family; |
unsigned int model; |
unsigned int stepping; |
tss_t *tss; |
int vendor; |
int family; |
int model; |
int stepping; |
struct tss *tss; |
size_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ |
count_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ |
} cpu_arch_t; |
#endif |
#define CR4_OSFXSR_MASK (1<<9) |
#endif |
/** @} |
/branches/arm/kernel/arch/ia32/include/fpu_context.h |
---|
37,6 → 37,7 |
#include <arch/types.h> |
#define ARCH_HAS_FPU |
#define FPU_CONTEXT_ALIGN 16 |
void fpu_fxsr(void); |
/branches/arm/kernel/arch/ia32/include/arch.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2009 Martin Decky |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
35,10 → 35,6 |
#ifndef KERN_ia32_ARCH_H_ |
#define KERN_ia32_ARCH_H_ |
#include <genarch/multiboot/multiboot.h> |
extern void arch_pre_main(uint32_t, const multiboot_info_t *); |
#endif |
/** @} |
/branches/arm/kernel/arch/ia32/include/drivers/i8254.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
/branches/arm/kernel/arch/ia32/include/drivers/ega.h |
---|
0,0 → 1,48 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32_EGA_H_ |
#define KERN_ia32_EGA_H_ |
#define VIDEORAM 0xb8000 |
#define ROW 80 |
#define ROWS 25 |
#define SCREEN (ROW * ROWS) |
extern void ega_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32/include/drivers/vesa.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
36,7 → 36,6 |
#define KERN_ia32_VESA_H_ |
extern int vesa_present(void); |
extern void vesa_redraw(void); |
extern void vesa_init(void); |
#endif |
/branches/arm/kernel/arch/ia32/include/drivers/i8259.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
38,13 → 38,13 |
#include <arch/types.h> |
#include <arch/interrupt.h> |
#define PIC_PIC0PORT1 ((ioport8_t *) 0x20) |
#define PIC_PIC0PORT2 ((ioport8_t *) 0x21) |
#define PIC_PIC1PORT1 ((ioport8_t *) 0xa0) |
#define PIC_PIC1PORT2 ((ioport8_t *) 0xa1) |
#define PIC_PIC0PORT1 0x20 |
#define PIC_PIC0PORT2 0x21 |
#define PIC_PIC1PORT1 0xa0 |
#define PIC_PIC1PORT2 0xa1 |
#define PIC_NEEDICW4 (1 << 0) |
#define PIC_ICW1 (1 << 4) |
#define PIC_NEEDICW4 (1<<0) |
#define PIC_ICW1 (1<<4) |
extern void i8259_init(void); |
extern void pic_enable_irqs(uint16_t irqmask); |
/branches/arm/kernel/arch/ia32/include/drivers/i8042.h |
---|
0,0 → 1,71 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
*/ |
/** |
* This file implements ia32 specific access to i8042 registers. |
*/ |
#ifndef KERN_ia32_I8042_H_ |
#define KERN_ia32_I8042_H_ |
#include <arch/asm.h> |
#include <arch/types.h> |
#define i8042_DATA 0x60 |
#define i8042_STATUS 0x64 |
static inline void i8042_data_write(uint8_t data) |
{ |
outb(i8042_DATA, data); |
} |
static inline uint8_t i8042_data_read(void) |
{ |
return inb(i8042_DATA); |
} |
static inline uint8_t i8042_status_read(void) |
{ |
return inb(i8042_STATUS); |
} |
static inline void i8042_command_write(uint8_t command) |
{ |
outb(i8042_STATUS, command); |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32/Makefile.inc |
---|
29,6 → 29,10 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf32-i386 |
BFD_ARCH = i386 |
BFD = binary |
35,8 → 39,7 |
TARGET = i686-pc-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/i686 |
BITS = 32 |
ENDIANESS = LE |
DEFS += -DMACHINE=$(MACHINE) -D__32_BITS__ |
CMN1 = -m32 |
GCC_CFLAGS += $(CMN1) |
46,61 → 49,115 |
## Accepted CPUs |
# |
ifeq ($(PROCESSOR),athlon_xp) |
ifeq ($(MACHINE),athlon-xp) |
FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-3dnow |
CMN2 = -march=athlon-xp |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += -xarch=ssea |
DEFS += -DCONFIG_FENCES_P3 |
CONFIG_SMP = n |
CONFIG_HT = n |
endif |
ifeq ($(PROCESSOR),athlon_mp) |
ifeq ($(MACHINE),athlon-mp) |
FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-3dnow |
CMN2 = -march=athlon-mp |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += xarch=ssea |
DEFS += -DCONFIG_FENCES_P3 |
CONFIG_HT = n |
endif |
ifeq ($(PROCESSOR),pentium3) |
ifeq ($(MACHINE),pentium3) |
FPU_NO_CFLAGS = -mno-mmx -mno-sse |
CMN2 = -march=pentium3 |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += -xarch=sse |
DEFS += -DCONFIG_FENCES_P3 |
CONFIG_HT = n |
endif |
ifeq ($(PROCESSOR),pentium4) |
CMN2 = -march=pentium4 |
SUNCC_CFLAGS += -xarch=sse2 |
endif |
ifeq ($(PROCESSOR),core) |
ifeq ($(MACHINE),core) |
FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-sse2 -mno-sse3 |
CMN2 = -march=prescott |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += -xarch=sse3 |
DEFS += -DCONFIG_FENCES_P4 |
endif |
ifeq ($(MACHINE),pentium4) |
FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-sse2 |
GCC_CFLAGS += -march=pentium4 |
ICC_CFLAGS += -march=pentium4 |
SUNCC_CFLAGS += -xarch=sse2 |
DEFS += -DCONFIG_FENCES_P4 |
endif |
FPU_NO_CFLAGS = -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
## Own configuration directives |
# |
CONFIG_ACPI = y |
## Compile with hierarchical page tables support. |
# |
CONFIG_PAGE_PT = y |
DEFS += -DCONFIG_PAGE_PT |
## Compile with i8042 controller support |
# |
CONFIG_I8042 = y |
DEFS += -DCONFIG_I8042 |
## Accepted configuration directives |
# |
ifeq ($(CONFIG_SMP),y) |
DEFS += -DCONFIG_SMP |
endif |
ifeq ($(CONFIG_HT),y) |
DEFS += -DCONFIG_HT |
endif |
ifeq ($(CONFIG_SIMICS_FIX),y) |
DEFS += -DCONFIG_SIMICS_FIX |
endif |
## Compile with support for software integer division. |
# |
CONFIG_SOFTINT = y |
ARCH_SOURCES = \ |
arch/$(KARCH)/src/context.S \ |
arch/$(KARCH)/src/debug/panic.s \ |
arch/$(KARCH)/src/delay.s \ |
arch/$(KARCH)/src/asm.S \ |
arch/$(KARCH)/src/proc/scheduler.c \ |
arch/$(KARCH)/src/proc/task.c \ |
arch/$(KARCH)/src/proc/thread.c \ |
arch/$(KARCH)/src/bios/bios.c \ |
arch/$(KARCH)/src/smp/ap.S \ |
arch/$(KARCH)/src/smp/apic.c \ |
arch/$(KARCH)/src/smp/mps.c \ |
arch/$(KARCH)/src/smp/smp.c \ |
arch/$(KARCH)/src/atomic.S \ |
arch/$(KARCH)/src/smp/ipi.c \ |
arch/$(KARCH)/src/ia32.c \ |
arch/$(KARCH)/src/interrupt.c \ |
arch/$(KARCH)/src/pm.c \ |
arch/$(KARCH)/src/userspace.c \ |
arch/$(KARCH)/src/cpu/cpu.c \ |
arch/$(KARCH)/src/mm/as.c \ |
arch/$(KARCH)/src/mm/frame.c \ |
arch/$(KARCH)/src/mm/page.c \ |
arch/$(KARCH)/src/mm/tlb.c \ |
arch/$(KARCH)/src/ddi/ddi.c \ |
arch/$(KARCH)/src/drivers/i8254.c \ |
arch/$(KARCH)/src/drivers/i8259.c \ |
arch/$(KARCH)/src/drivers/vesa.c \ |
arch/$(KARCH)/src/boot/boot.S \ |
arch/$(KARCH)/src/boot/memmap.c \ |
arch/$(KARCH)/src/fpu_context.c \ |
arch/$(KARCH)/src/debugger.c \ |
arch/$(KARCH)/src/syscall.c |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/debug/panic.s \ |
arch/$(ARCH)/src/delay.s \ |
arch/$(ARCH)/src/asm.S \ |
arch/$(ARCH)/src/proc/scheduler.c \ |
arch/$(ARCH)/src/proc/task.c \ |
arch/$(ARCH)/src/proc/thread.c \ |
arch/$(ARCH)/src/bios/bios.c \ |
arch/$(ARCH)/src/smp/ap.S \ |
arch/$(ARCH)/src/smp/apic.c \ |
arch/$(ARCH)/src/smp/mps.c \ |
arch/$(ARCH)/src/smp/smp.c \ |
arch/$(ARCH)/src/atomic.S \ |
arch/$(ARCH)/src/smp/ipi.c \ |
arch/$(ARCH)/src/ia32.c \ |
arch/$(ARCH)/src/interrupt.c \ |
arch/$(ARCH)/src/pm.c \ |
arch/$(ARCH)/src/userspace.c \ |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/drivers/i8254.c \ |
arch/$(ARCH)/src/drivers/i8259.c \ |
arch/$(ARCH)/src/drivers/ega.c \ |
arch/$(ARCH)/src/drivers/vesa.c \ |
arch/$(ARCH)/src/boot/boot.S \ |
arch/$(ARCH)/src/boot/memmap.c \ |
arch/$(ARCH)/src/fpu_context.c \ |
arch/$(ARCH)/src/debugger.c |
/branches/arm/kernel/arch/ia32/src/syscall.c |
---|
File deleted |
/branches/arm/kernel/arch/ia32/src/asm.S |
---|
147,46 → 147,6 |
popfl |
.endm |
/* |
* The SYSENTER syscall mechanism can be used for syscalls with |
* four or fewer arguments. To pass these four arguments, we |
* use four registers: EDX, ECX, EBX, ESI. The syscall number |
* is passed in EAX. We use EDI to remember the return address |
* and EBP to remember the stack. The INT-based syscall mechanism |
* can actually handle six arguments plus the syscall number |
* entirely in registers. |
*/ |
.global sysenter_handler |
sysenter_handler: |
sti |
pushl %ebp # remember user stack |
pushl %edi # remember return user address |
pushl %gs # remember TLS |
pushl %eax # syscall number |
subl $8, %esp # unused sixth and fifth argument |
pushl %esi # fourth argument |
pushl %ebx # third argument |
pushl %ecx # second argument |
pushl %edx # first argument |
movw $16, %ax |
movw %ax, %ds |
movw %ax, %es |
cld |
call syscall_handler |
addl $28, %esp # remove arguments from stack |
pop %gs # restore TLS |
pop %edx # prepare return EIP for SYSEXIT |
pop %ecx # prepare userspace ESP for SYSEXIT |
sysexit # return to userspace |
## Declare interrupt handlers |
# |
# Declare interrupt handlers for n interrupt |
268,6 → 228,14 |
pushl %fs |
pushl %gs |
#ifdef CONFIG_DEBUG_ALLREGS |
pushl %ebx |
pushl %ebp |
pushl %edi |
pushl %esi |
#else |
subl $16, %esp |
#endif |
pushl %edx |
pushl %ecx |
pushl %eax |
289,6 → 257,14 |
popl %eax |
popl %ecx |
popl %edx |
#ifdef CONFIG_DEBUG_ALLREGS |
popl %esi |
popl %edi |
popl %ebp |
popl %ebx |
#else |
addl $16, %esp |
#endif |
popl %gs |
popl %fs |
/branches/arm/kernel/arch/ia32/src/mm/frame.c |
---|
54,57 → 54,26 |
static void init_e820_memory(pfn_t minconf) |
{ |
unsigned int i; |
pfn_t start, conf; |
size_t size; |
for (i = 0; i < e820counter; i++) { |
uint64_t base = e820table[i].base_address; |
uint64_t size = e820table[i].size; |
#ifdef __32_BITS__ |
/* Ignore physical memory above 4 GB */ |
if ((base >> 32) != 0) |
continue; |
/* Clip regions above 4 GB */ |
if (((base + size) >> 32) != 0) |
size = 0xffffffff - base; |
#endif |
pfn_t pfn; |
size_t count; |
if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) { |
/* To be safe, make available zone possibly smaller */ |
pfn = ADDR2PFN(ALIGN_UP(base, FRAME_SIZE)); |
count = SIZE2FRAMES(ALIGN_DOWN(size, FRAME_SIZE)); |
start = ADDR2PFN(ALIGN_UP(e820table[i].base_address, FRAME_SIZE)); |
size = SIZE2FRAMES(ALIGN_DOWN(e820table[i].size, FRAME_SIZE)); |
pfn_t conf; |
if ((minconf < pfn) || (minconf >= pfn + count)) |
conf = pfn; |
if ((minconf < start) || (minconf >= start + size)) |
conf = start; |
else |
conf = minconf; |
zone_create(pfn, count, conf, ZONE_AVAILABLE); |
zone_create(start, size, conf, 0); |
// XXX this has to be removed |
if (last_frame < ALIGN_UP(base + size, FRAME_SIZE)) |
last_frame = ALIGN_UP(base + size, FRAME_SIZE); |
} |
if (e820table[i].type == MEMMAP_MEMORY_RESERVED) { |
/* To be safe, make reserved zone possibly larger */ |
pfn = ADDR2PFN(ALIGN_DOWN(base, FRAME_SIZE)); |
count = SIZE2FRAMES(ALIGN_UP(size, FRAME_SIZE)); |
zone_create(pfn, count, 0, ZONE_RESERVED); |
} |
if (e820table[i].type == MEMMAP_MEMORY_ACPI) { |
/* To be safe, make firmware zone possibly larger */ |
pfn = ADDR2PFN(ALIGN_DOWN(base, (uintptr_t) FRAME_SIZE)); |
count = SIZE2FRAMES(ALIGN_UP(size, (uintptr_t) FRAME_SIZE)); |
zone_create(pfn, count, 0, ZONE_FIRMWARE); |
} |
if (last_frame < ALIGN_UP(e820table[i].base_address + |
e820table[i].size, FRAME_SIZE)) |
last_frame = |
ALIGN_UP(e820table[i].base_address + e820table[i].size, FRAME_SIZE); |
} |
} |
} |
144,14 → 113,16 |
if (config.cpu_active == 1) { |
minconf = 1; |
#ifdef CONFIG_SMP |
minconf = max(minconf, |
ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size + |
hardcoded_unmapped_kdata_size)); |
#endif |
#ifdef CONFIG_SIMICS_FIX |
minconf = max(minconf, ADDR2PFN(0x10000)); |
#endif |
init_e820_memory(minconf); |
/* Reserve frame 0 (BIOS data) */ |
frame_mark_unavailable(0, 1); |
160,7 → 131,12 |
frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, |
(hardcoded_unmapped_ktext_size + |
hardcoded_unmapped_kdata_size) >> FRAME_WIDTH); |
#ifdef CONFIG_SIMICS_FIX |
/* Don't know why, but these addresses help */ |
frame_mark_unavailable(0xd000 >> FRAME_WIDTH, 3); |
#endif |
#endif |
} |
} |
/branches/arm/kernel/arch/ia32/src/mm/page.c |
---|
53,7 → 53,7 |
{ |
uintptr_t cur; |
int flags; |
if (config.cpu_active == 1) { |
page_mapping_operations = &pt_mapping_operations; |
66,12 → 66,12 |
flags |= PAGE_GLOBAL; |
page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
} |
exc_register(14, "page_fault", (iroutine) page_fault); |
write_cr3((uintptr_t) AS_KERNEL->genarch.page_table); |
} else |
write_cr3((uintptr_t) AS_KERNEL->genarch.page_table); |
paging_on(); |
} |
79,7 → 79,7 |
uintptr_t hw_map(uintptr_t physaddr, size_t size) |
{ |
if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) |
panic("Unable to map physical memory %p (%d bytes).", physaddr, size) |
panic("Unable to map physical memory %p (%d bytes)", physaddr, size) |
uintptr_t virtaddr = PA2KA(last_frame); |
pfn_t i; |
101,8 → 101,8 |
page = read_cr2(); |
if (istate->error_word & PFERR_CODE_RSVD) |
panic("Reserved bit set in page directory."); |
panic("Reserved bit set in page directory.\n"); |
if (istate->error_word & PFERR_CODE_RW) |
access = PF_ACCESS_WRITE; |
else |
109,11 → 109,11 |
access = PF_ACCESS_READ; |
if (as_page_fault(page, access, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate, "Page fault: %#x.", page); |
fault_if_from_uspace(istate, "Page fault: %#x", page); |
decode_istate(istate); |
printf("page fault address: %#lx\n", page); |
panic("Page fault."); |
panic("page fault\n"); |
} |
} |
/branches/arm/kernel/arch/ia32/src/mm/tlb.c |
---|
59,7 → 59,7 |
* @param page Address of the first page whose entry is to be invalidated. |
* @param cnt Number of entries to invalidate. |
*/ |
void tlb_invalidate_pages(asid_t asid __attribute__((unused)), uintptr_t page, size_t cnt) |
void tlb_invalidate_pages(asid_t asid __attribute__((unused)), uintptr_t page, count_t cnt) |
{ |
unsigned int i; |
67,13 → 67,5 |
invlpg(page + i * PAGE_SIZE); |
} |
void tlb_arch_init(void) |
{ |
} |
void tlb_print(void) |
{ |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32/src/drivers/ega.c |
---|
0,0 → 1,155 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
* @{ |
*/ |
/** |
* @file |
* @brief EGA driver. |
*/ |
#include <arch/drivers/ega.h> |
#include <putchar.h> |
#include <mm/page.h> |
#include <mm/as.h> |
#include <arch/mm/page.h> |
#include <synch/spinlock.h> |
#include <arch/types.h> |
#include <arch/asm.h> |
#include <memstr.h> |
#include <console/chardev.h> |
#include <console/console.h> |
#include <sysinfo/sysinfo.h> |
#include <ddi/ddi.h> |
/* |
* The EGA driver. |
* Simple and short. Function for displaying characters and "scrolling". |
*/ |
static parea_t ega_parea; /**< Physical memory area for EGA video RAM. */ |
SPINLOCK_INITIALIZE(egalock); |
static uint32_t ega_cursor; |
static uint8_t *videoram; |
static void ega_putchar(chardev_t *d, const char ch); |
chardev_t ega_console; |
static chardev_operations_t ega_ops = { |
.write = ega_putchar |
}; |
static void ega_move_cursor(void); |
void ega_init(void) |
{ |
uint8_t hi, lo; |
videoram = (uint8_t *) hw_map(VIDEORAM, SCREEN * 2); |
outb(0x3d4, 0xe); |
hi = inb(0x3d5); |
outb(0x3d4, 0xf); |
lo = inb(0x3d5); |
ega_cursor = (hi << 8) | lo; |
chardev_initialize("ega_out", &ega_console, &ega_ops); |
stdout = &ega_console; |
ega_parea.pbase = VIDEORAM; |
ega_parea.vbase = (uintptr_t) videoram; |
ega_parea.frames = 1; |
ega_parea.cacheable = false; |
ddi_parea_register(&ega_parea); |
sysinfo_set_item_val("fb", NULL, true); |
sysinfo_set_item_val("fb.kind", NULL, 2); |
sysinfo_set_item_val("fb.width", NULL, ROW); |
sysinfo_set_item_val("fb.height", NULL, ROWS); |
sysinfo_set_item_val("fb.address.physical", NULL, VIDEORAM); |
} |
static void ega_display_char(char ch) |
{ |
videoram[ega_cursor * 2] = ch; |
} |
/* |
* This function takes care of scrolling. |
*/ |
static void ega_check_cursor(void) |
{ |
if (ega_cursor < SCREEN) |
return; |
memcpy((void *) videoram, (void *) (videoram + ROW * 2), (SCREEN - ROW) * 2); |
memsetw(videoram + (SCREEN - ROW) * 2, ROW, 0x0720); |
ega_cursor = ega_cursor - ROW; |
} |
void ega_putchar(chardev_t *d __attribute__((unused)), const char ch) |
{ |
ipl_t ipl; |
ipl = interrupts_disable(); |
spinlock_lock(&egalock); |
switch (ch) { |
case '\n': |
ega_cursor = (ega_cursor + ROW) - ega_cursor % ROW; |
break; |
case '\t': |
ega_cursor = (ega_cursor + 8) - ega_cursor % 8; |
break; |
case '\b': |
if (ega_cursor % ROW) |
ega_cursor--; |
break; |
default: |
ega_display_char(ch); |
ega_cursor++; |
break; |
} |
ega_check_cursor(); |
ega_move_cursor(); |
spinlock_unlock(&egalock); |
interrupts_restore(ipl); |
} |
void ega_move_cursor(void) |
{ |
outb(0x3d4, 0xe); |
outb(0x3d5, (uint8_t) ((ega_cursor >> 8) & 0xff)); |
outb(0x3d4, 0xf); |
outb(0x3d5, (uint8_t) (ega_cursor & 0xff)); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32/src/drivers/i8259.c |
---|
49,28 → 49,28 |
void i8259_init(void) |
{ |
/* ICW1: this is ICW1, ICW4 to follow */ |
pio_write_8(PIC_PIC0PORT1, PIC_ICW1 | PIC_NEEDICW4); |
outb(PIC_PIC0PORT1, PIC_ICW1 | PIC_NEEDICW4); |
/* ICW2: IRQ 0 maps to INT IRQBASE */ |
pio_write_8(PIC_PIC0PORT2, IVT_IRQBASE); |
outb(PIC_PIC0PORT2, IVT_IRQBASE); |
/* ICW3: pic1 using IRQ IRQ_PIC1 */ |
pio_write_8(PIC_PIC0PORT2, 1 << IRQ_PIC1); |
outb(PIC_PIC0PORT2, 1 << IRQ_PIC1); |
/* ICW4: i8086 mode */ |
pio_write_8(PIC_PIC0PORT2, 1); |
outb(PIC_PIC0PORT2, 1); |
/* ICW1: ICW1, ICW4 to follow */ |
pio_write_8(PIC_PIC1PORT1, PIC_ICW1 | PIC_NEEDICW4); |
outb(PIC_PIC1PORT1, PIC_ICW1 | PIC_NEEDICW4); |
/* ICW2: IRQ 8 maps to INT (IVT_IRQBASE + 8) */ |
pio_write_8(PIC_PIC1PORT2, IVT_IRQBASE + 8); |
outb(PIC_PIC1PORT2, IVT_IRQBASE + 8); |
/* ICW3: pic1 is known as IRQ_PIC1 */ |
pio_write_8(PIC_PIC1PORT2, IRQ_PIC1); |
outb(PIC_PIC1PORT2, IRQ_PIC1); |
/* ICW4: i8086 mode */ |
pio_write_8(PIC_PIC1PORT2, 1); |
outb(PIC_PIC1PORT2, 1); |
/* |
* Register interrupt handler for the PIC spurious interrupt. |
94,12 → 94,12 |
uint8_t x; |
if (irqmask & 0xff) { |
x = pio_read_8(PIC_PIC0PORT2); |
pio_write_8(PIC_PIC0PORT2, (uint8_t) (x & (~(irqmask & 0xff)))); |
x = inb(PIC_PIC0PORT2); |
outb(PIC_PIC0PORT2, (uint8_t) (x & (~(irqmask & 0xff)))); |
} |
if (irqmask >> 8) { |
x = pio_read_8(PIC_PIC1PORT2); |
pio_write_8(PIC_PIC1PORT2, (uint8_t) (x & (~(irqmask >> 8)))); |
x = inb(PIC_PIC1PORT2); |
outb(PIC_PIC1PORT2, (uint8_t) (x & (~(irqmask >> 8)))); |
} |
} |
108,19 → 108,19 |
uint8_t x; |
if (irqmask & 0xff) { |
x = pio_read_8(PIC_PIC0PORT2); |
pio_write_8(PIC_PIC0PORT2, (uint8_t) (x | (irqmask & 0xff))); |
x = inb(PIC_PIC0PORT2); |
outb(PIC_PIC0PORT2, (uint8_t) (x | (irqmask & 0xff))); |
} |
if (irqmask >> 8) { |
x = pio_read_8(PIC_PIC1PORT2); |
pio_write_8(PIC_PIC1PORT2, (uint8_t) (x | (irqmask >> 8))); |
x = inb(PIC_PIC1PORT2); |
outb(PIC_PIC1PORT2, (uint8_t) (x | (irqmask >> 8))); |
} |
} |
void pic_eoi(void) |
{ |
pio_write_8((ioport8_t *)0x20, 0x20); |
pio_write_8((ioport8_t *)0xa0, 0x20); |
outb(0x20, 0x20); |
outb(0xa0, 0x20); |
} |
void pic_spurious(int n __attribute__((unused)), istate_t *istate __attribute__((unused))) |
/branches/arm/kernel/arch/ia32/src/drivers/i8254.c |
---|
26,12 → 26,12 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** |
* @file |
* @brief i8254 chip driver. |
* @brief i8254 chip driver. |
* |
* Low level time functions. |
*/ |
53,8 → 53,8 |
#include <ddi/irq.h> |
#include <ddi/device.h> |
#define CLK_PORT1 ((ioport8_t *)0x40) |
#define CLK_PORT4 ((ioport8_t *)0x43) |
#define CLK_PORT1 0x40 |
#define CLK_PORT4 0x43 |
#define CLK_CONST 1193180 |
#define MAGIC_NUMBER 1194 |
61,12 → 61,12 |
static irq_t i8254_irq; |
static irq_ownership_t i8254_claim(irq_t *irq) |
static irq_ownership_t i8254_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
static void i8254_irq_handler(irq_t *irq) |
static void i8254_irq_handler(irq_t *irq, void *arg __attribute__((unused)), ...) |
{ |
/* |
* This IRQ is responsible for kernel preemption. |
94,10 → 94,10 |
void i8254_normal_operation(void) |
{ |
pio_write_8(CLK_PORT4, 0x36); |
outb(CLK_PORT4, 0x36); |
pic_disable_irqs(1 << IRQ_CLK); |
pio_write_8(CLK_PORT1, (CLK_CONST / HZ) & 0xf); |
pio_write_8(CLK_PORT1, (CLK_CONST / HZ) >> 8); |
outb(CLK_PORT1, (CLK_CONST / HZ) & 0xf); |
outb(CLK_PORT1, (CLK_CONST / HZ) >> 8); |
pic_enable_irqs(1 << IRQ_CLK); |
} |
114,36 → 114,36 |
* One-shot timer. Count-down from 0xffff at 1193180Hz |
* MAGIC_NUMBER is the magic value for 1ms. |
*/ |
pio_write_8(CLK_PORT4, 0x30); |
pio_write_8(CLK_PORT1, 0xff); |
pio_write_8(CLK_PORT1, 0xff); |
outb(CLK_PORT4, 0x30); |
outb(CLK_PORT1, 0xff); |
outb(CLK_PORT1, 0xff); |
do { |
/* will read both status and count */ |
pio_write_8(CLK_PORT4, 0xc2); |
not_ok = (uint8_t) ((pio_read_8(CLK_PORT1) >> 6) & 1); |
t1 = pio_read_8(CLK_PORT1); |
t1 |= pio_read_8(CLK_PORT1) << 8; |
outb(CLK_PORT4, 0xc2); |
not_ok = (uint8_t) ((inb(CLK_PORT1) >> 6) & 1); |
t1 = inb(CLK_PORT1); |
t1 |= inb(CLK_PORT1) << 8; |
} while (not_ok); |
asm_delay_loop(LOOPS); |
pio_write_8(CLK_PORT4, 0xd2); |
t2 = pio_read_8(CLK_PORT1); |
t2 |= pio_read_8(CLK_PORT1) << 8; |
outb(CLK_PORT4, 0xd2); |
t2 = inb(CLK_PORT1); |
t2 |= inb(CLK_PORT1) << 8; |
/* |
* We want to determine the overhead of the calibrating mechanism. |
*/ |
pio_write_8(CLK_PORT4, 0xd2); |
o1 = pio_read_8(CLK_PORT1); |
o1 |= pio_read_8(CLK_PORT1) << 8; |
outb(CLK_PORT4, 0xd2); |
o1 = inb(CLK_PORT1); |
o1 |= inb(CLK_PORT1) << 8; |
asm_fake_loop(LOOPS); |
pio_write_8(CLK_PORT4, 0xd2); |
o2 = pio_read_8(CLK_PORT1); |
o2 |= pio_read_8(CLK_PORT1) << 8; |
outb(CLK_PORT4, 0xd2); |
o2 = inb(CLK_PORT1); |
o2 |= inb(CLK_PORT1) << 8; |
CPU->delay_loop_const = |
((MAGIC_NUMBER * LOOPS) / 1000) / ((t1 - t2) - (o1 - o2)) + |
/branches/arm/kernel/arch/ia32/src/drivers/vesa.c |
---|
56,20 → 56,12 |
uint16_t vesa_bpp; |
uint16_t vesa_scanline; |
uint8_t vesa_red_mask; |
uint8_t vesa_red_pos; |
uint8_t vesa_green_mask; |
uint8_t vesa_green_pos; |
uint8_t vesa_blue_mask; |
uint8_t vesa_blue_pos; |
int vesa_present(void) |
{ |
if ((vesa_width != 0xffff) && (vesa_height != 0xffff)) |
if (vesa_width != 0xffff) |
return true; |
if (vesa_height != 0xffff) |
return true; |
return false; |
} |
82,12 → 74,7 |
visual = VISUAL_INDIRECT_8; |
break; |
case 16: |
if ((vesa_red_mask == 5) && (vesa_red_pos == 10) |
&& (vesa_green_mask == 5) && (vesa_green_pos == 5) |
&& (vesa_blue_mask == 5) && (vesa_blue_pos == 0)) |
visual = VISUAL_RGB_5_5_5; |
else |
visual = VISUAL_RGB_5_6_5; |
visual = VISUAL_RGB_5_6_5; |
break; |
case 24: |
visual = VISUAL_RGB_8_8_8; |
96,25 → 83,12 |
visual = VISUAL_RGB_0_8_8_8; |
break; |
default: |
panic("Unsupported bits per pixel."); |
panic("Unsupported bits per pixel"); |
} |
fb_properties_t vesa_props = { |
.addr = vesa_ph_addr, |
.offset = 0, |
.x = vesa_width, |
.y = vesa_height, |
.scan = vesa_scanline, |
.visual = visual, |
}; |
fb_init(&vesa_props); |
fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_scanline, visual); |
} |
void vesa_redraw(void) |
{ |
fb_redraw(); |
} |
#endif |
/** @} |
/branches/arm/kernel/arch/ia32/src/userspace.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
47,8 → 47,10 |
*/ |
void userspace(uspace_arg_t *kernel_uarg) |
{ |
ipl_t ipl = interrupts_disable(); |
ipl_t ipl; |
ipl = interrupts_disable(); |
asm volatile ( |
/* |
* Clear nested task flag. |
58,33 → 60,35 |
"and $0xffffbfff, %%eax\n" |
"push %%eax\n" |
"popfl\n" |
/* Set up GS register (TLS) */ |
"movl %[tls_des], %%gs\n" |
"pushl %[udata_des]\n" |
"pushl %[stack_size]\n" |
"pushl %[ipl]\n" |
"pushl %[utext_des]\n" |
"pushl %[entry]\n" |
"movl %[uarg], %%eax\n" |
"movl %6, %%gs\n" |
"pushl %0\n" |
"pushl %1\n" |
"pushl %2\n" |
"pushl %3\n" |
"pushl %4\n" |
"movl %5, %%eax\n" |
/* %ebx is defined to hold pcb_ptr - set it to 0 */ |
"xorl %%ebx, %%ebx\n" |
"xorl %%ebx, %%ebx\n" |
"iret\n" |
: |
: [udata_des] "i" (gdtselector(UDATA_DES) | PL_USER), |
[stack_size] "r" ((uint8_t *) kernel_uarg->uspace_stack + THREAD_STACK_SIZE), |
[ipl] "r" (ipl), |
[utext_des] "i" (gdtselector(UTEXT_DES) | PL_USER), |
[entry] "r" (kernel_uarg->uspace_entry), |
[uarg] "r" (kernel_uarg->uspace_uarg), |
[tls_des] "r" (gdtselector(TLS_DES)) |
: |
: "i" (selector(UDATA_DES) | PL_USER), |
"r" ((uint8_t *) kernel_uarg->uspace_stack + |
THREAD_STACK_SIZE), |
"r" (ipl), |
"i" (selector(UTEXT_DES) | PL_USER), |
"r" (kernel_uarg->uspace_entry), |
"r" (kernel_uarg->uspace_uarg), |
"r" (selector(TLS_DES)) |
: "eax"); |
/* Unreachable */ |
while (1); |
for(;;) |
; |
} |
/** @} |
/branches/arm/kernel/arch/ia32/src/smp/smp.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
75,12 → 75,12 |
l_apic_address = (uintptr_t) frame_alloc(ONE_FRAME, |
FRAME_ATOMIC | FRAME_KA); |
if (!l_apic_address) |
panic("Cannot allocate address for l_apic."); |
panic("cannot allocate address for l_apic\n"); |
io_apic_address = (uintptr_t) frame_alloc(ONE_FRAME, |
FRAME_ATOMIC | FRAME_KA); |
if (!io_apic_address) |
panic("Cannot allocate address for io_apic."); |
panic("cannot allocate address for io_apic\n"); |
if (config.cpu_count > 1) { |
page_mapping_insert(AS_KERNEL, l_apic_address, |
122,8 → 122,8 |
* Save 0xa to address 0xf of the CMOS RAM. |
* BIOS will not do the POST after the INIT signal. |
*/ |
pio_write_8((ioport8_t *)0x70, 0xf); |
pio_write_8((ioport8_t *)0x71, 0xa); |
outb(0x70, 0xf); |
outb(0x71, 0xa); |
pic_disable_irqs(0xffff); |
apic_init(); |
131,8 → 131,8 |
uint8_t apic = l_apic_id(); |
for (i = 0; i < ops->cpu_count(); i++) { |
descriptor_t *gdt_new; |
struct descriptor *gdt_new; |
/* |
* Skip processors marked unusable. |
*/ |
154,19 → 154,14 |
/* |
* Prepare new GDT for CPU in question. |
*/ |
/* XXX Flag FRAME_LOW_4_GiB was removed temporarily, |
* it needs to be replaced by a generic fuctionality of |
* the memory subsystem |
*/ |
gdt_new = (descriptor_t *) malloc(GDT_ITEMS * |
sizeof(descriptor_t), FRAME_ATOMIC); |
gdt_new = (struct descriptor *) malloc(GDT_ITEMS * |
sizeof(struct descriptor), FRAME_ATOMIC | FRAME_LOW_4_GiB); |
if (!gdt_new) |
panic("Cannot allocate memory for GDT."); |
panic("couldn't allocate memory for GDT\n"); |
memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(descriptor_t)); |
memsetb(&gdt_new[TSS_DES], sizeof(descriptor_t), 0); |
protected_ap_gdtr.limit = GDT_ITEMS * sizeof(descriptor_t); |
memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor)); |
memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0); |
protected_ap_gdtr.limit = GDT_ITEMS * sizeof(struct descriptor); |
protected_ap_gdtr.base = KA2PA((uintptr_t) gdt_new); |
gdtr.base = (uintptr_t) gdt_new; |
/branches/arm/kernel/arch/ia32/src/smp/mps.c |
---|
86,10 → 86,10 |
/* |
* Implementation of IA-32 SMP configuration interface. |
*/ |
static size_t get_cpu_count(void); |
static bool is_cpu_enabled(size_t i); |
static bool is_bsp(size_t i); |
static uint8_t get_cpu_apic_id(size_t i); |
static count_t get_cpu_count(void); |
static bool is_cpu_enabled(index_t i); |
static bool is_bsp(index_t i); |
static uint8_t get_cpu_apic_id(index_t i); |
static int mps_irq_to_pin(unsigned int irq); |
struct smp_config_operations mps_config_operations = { |
100,24 → 100,24 |
.irq_to_pin = mps_irq_to_pin |
}; |
size_t get_cpu_count(void) |
count_t get_cpu_count(void) |
{ |
return processor_entry_cnt; |
} |
bool is_cpu_enabled(size_t i) |
bool is_cpu_enabled(index_t i) |
{ |
ASSERT(i < processor_entry_cnt); |
return (bool) ((processor_entries[i].cpu_flags & 0x01) == 0x01); |
} |
bool is_bsp(size_t i) |
bool is_bsp(index_t i) |
{ |
ASSERT(i < processor_entry_cnt); |
return (bool) ((processor_entries[i].cpu_flags & 0x02) == 0x02); |
} |
uint8_t get_cpu_apic_id(size_t i) |
uint8_t get_cpu_apic_id(index_t i) |
{ |
ASSERT(i < processor_entry_cnt); |
return processor_entries[i].l_apic_id; |
/branches/arm/kernel/arch/ia32/src/smp/apic.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
132,12 → 132,12 |
#endif |
} |
static irq_ownership_t l_apic_timer_claim(irq_t *irq) |
static irq_ownership_t l_apic_timer_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
static void l_apic_timer_irq_handler(irq_t *irq) |
static void l_apic_timer_irq_handler(irq_t *irq, void *arg __attribute__((unused)), ...) |
{ |
/* |
* Holding a spinlock could prevent clock() from preempting |
/branches/arm/kernel/arch/ia32/src/pm.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32 |
/** @addtogroup ia32 |
* @{ |
*/ |
/** @file |
112,7 → 112,7 |
void tss_initialize(tss_t *t) |
{ |
memsetb(t, sizeof(tss_t), 0); |
memsetb(t, sizeof(struct tss), 0); |
} |
/* |
127,7 → 127,7 |
d = &idt[i]; |
d->unused = 0; |
d->selector = gdtselector(KTEXT_DES); |
d->selector = selector(KTEXT_DES); |
d->access = AR_PRESENT | AR_INTERRUPT; /* masking interrupt */ |
154,7 → 154,7 |
"and $0xffff8fff, %%eax\n" |
"push %%eax\n" |
"popfl\n" |
::: "eax" |
: : : "eax" |
); |
} |
165,7 → 165,7 |
"mov %%cr0, %%eax\n" |
"and $0xfffbffff, %%eax\n" |
"mov %%eax, %%cr0\n" |
::: "eax" |
: : : "eax" |
); |
} |
198,7 → 198,7 |
else { |
tss_p = (tss_t *) malloc(sizeof(tss_t), FRAME_ATOMIC); |
if (!tss_p) |
panic("Cannot allocate TSS."); |
panic("could not allocate TSS\n"); |
} |
tss_initialize(tss_p); |
214,7 → 214,7 |
* As of this moment, the current CPU has its own GDT pointing |
* to its own TSS. We just need to load the TR register. |
*/ |
tr_load(gdtselector(TSS_DES)); |
tr_load(selector(TSS_DES)); |
clean_IOPL_NT_flags(); /* Disable I/O on nonprivileged levels and clear NT flag. */ |
clean_AM_flag(); /* Disable alignment check */ |
232,5 → 232,28 |
gdtr_load(&cpugdtr); |
} |
/* Reboot the machine by initiating |
* a triple fault |
*/ |
void arch_reboot(void) |
{ |
preemption_disable(); |
ipl_t ipl = interrupts_disable(); |
memsetb(idt, sizeof(idt), 0); |
ptr_16_32_t idtr; |
idtr.limit = sizeof(idt); |
idtr.base = (uintptr_t) idt; |
idtr_load(&idtr); |
interrupts_restore(ipl); |
asm volatile ( |
"int $0x03\n" |
"cli\n" |
"hlt\n" |
); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32/src/boot/vesa_prot.inc |
---|
File deleted |
/branches/arm/kernel/arch/ia32/src/boot/vesa_real.inc |
---|
File deleted |
/branches/arm/kernel/arch/ia32/src/boot/vesa_ret.inc |
---|
File deleted |
/branches/arm/kernel/arch/ia32/src/boot/boot.S |
---|
31,7 → 31,6 |
#include <arch/boot/memmap.h> |
#include <arch/mm/page.h> |
#include <arch/pm.h> |
#include <arch/cpuid.h> |
#define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) |
43,41 → 42,40 |
multiboot_header: |
.long MULTIBOOT_HEADER_MAGIC |
.long MULTIBOOT_HEADER_FLAGS |
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) # checksum |
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) # checksum |
.long multiboot_header |
.long unmapped_ktext_start |
.long 0 |
.long 0 |
.long multiboot_image_start |
multiboot_image_start: |
cld |
movl $START_STACK, %esp # initialize stack pointer |
lgdt KA2PA(bootstrap_gdtr) # initialize Global Descriptor Table register |
movw $gdtselector(KDATA_DES), %cx |
movl $START_STACK, %esp # initialize stack pointer |
lgdt KA2PA(bootstrap_gdtr) # initialize Global Descriptor Table register |
movw $selector(KDATA_DES), %cx |
movw %cx, %es |
movw %cx, %fs |
movw %cx, %gs |
movw %cx, %ds # kernel data + stack |
movw %cx, %ds # kernel data + stack |
movw %cx, %ss |
jmpl $gdtselector(KTEXT_DES), $multiboot_meeting_point |
jmpl $selector(KTEXT_DES), $multiboot_meeting_point |
multiboot_meeting_point: |
movl %eax, grub_eax # save parameters from GRUB |
movl %eax, grub_eax # save parameters from GRUB |
movl %ebx, grub_ebx |
movl $(INTEL_CPUID_LEVEL), %eax |
cpuid |
cmp $0x0, %eax # any function > 0? |
xorl %eax, %eax |
cpuid |
cmp $0x0, %eax # any function > 0? |
jbe pse_unsupported |
movl $(INTEL_CPUID_STANDARD), %eax |
movl $0x1, %eax # Basic function code 1 |
cpuid |
bt $(INTEL_PSE), %edx |
bt $3, %edx # Test if PSE is supported |
jc pse_supported |
pse_unsupported: |
movl $pse_msg, %esi |
jmp error_halt |
84,31 → 82,138 |
pse_supported: |
bt $(INTEL_SEP), %edx |
jc sep_supported |
#ifdef CONFIG_FB |
mov $vesa_init, %esi |
mov $VESA_INIT_SEGMENT << 4, %edi |
mov $e_vesa_init - vesa_init, %ecx |
rep movsb |
mov $VESA_INIT_SEGMENT << 4, %edi |
jmpl *%edi |
movl $sep_msg, %esi |
jmp error_halt |
vesa_meeting_point: |
sep_supported: |
#include "vesa_prot.inc" |
# map kernel and turn paging on |
call map_kernel |
mov %esi, KA2PA(vesa_ph_addr) |
mov %di, KA2PA(vesa_height) |
shr $16, %edi |
mov %di, KA2PA(vesa_width) |
mov %bx, KA2PA(vesa_scanline) |
shr $16, %ebx |
mov %bx, KA2PA(vesa_bpp) |
#endif |
# call arch_pre_main(grub_eax, grub_ebx) |
pushl grub_ebx |
pushl grub_eax |
call arch_pre_main |
call map_kernel # map kernel and turn paging on |
call main_bsp |
movl grub_eax, %eax |
movl grub_ebx, %ebx |
cmpl $MULTIBOOT_LOADER_MAGIC, %eax # compare GRUB signature |
je valid_boot |
xorl %ecx, %ecx # no memory map available |
movl %ecx, e820counter |
jmp invalid_boot |
valid_boot: |
movl (%ebx), %eax # ebx = physical address of struct multiboot_info |
bt $3, %eax # mbi->flags[3] (mods_count, mods_addr valid) |
jc mods_valid |
xorl %ecx, %ecx |
movl %ecx, init |
jmp mods_end |
mods_valid: |
movl 20(%ebx), %ecx # mbi->mods_count |
movl %ecx, init |
cmpl $0, %ecx |
je mods_end |
movl 24(%ebx), %esi # mbi->mods_addr |
movl $init, %edi |
mods_loop: |
movl 0(%esi), %edx # mods->mod_start |
addl $0x80000000, %edx |
movl %edx, 4(%edi) |
movl 4(%esi), %edx |
subl 0(%esi), %edx # mods->mod_end - mods->mod_start |
movl %edx, 8(%edi) |
addl $16, %esi |
addl $8 , %edi |
loop mods_loop |
mods_end: |
bt $6, %eax # mbi->flags[6] (mmap_length, mmap_addr valid) |
jc mmap_valid |
xorl %edx, %edx |
jmp mmap_invalid |
mmap_valid: |
movl 44(%ebx), %ecx # mbi->mmap_length |
movl 48(%ebx), %esi # mbi->mmap_addr |
movl $e820table, %edi |
xorl %edx, %edx |
mmap_loop: |
cmpl $0, %ecx |
jle mmap_end |
movl 4(%esi), %eax # mmap->base_addr_low |
movl %eax, (%edi) |
movl 8(%esi), %eax # mmap->base_addr_high |
movl %eax, 4(%edi) |
movl 12(%esi), %eax # mmap->length_low |
movl %eax, 8(%edi) |
movl 16(%esi), %eax # mmap->length_high |
movl %eax, 12(%edi) |
movl 20(%esi), %eax # mmap->type |
movl %eax, 16(%edi) |
movl (%esi), %eax # mmap->size |
addl $0x4, %eax |
addl %eax, %esi |
subl %eax, %ecx |
addl $MEMMAP_E820_RECORD_SIZE, %edi |
incl %edx |
jmp mmap_loop |
mmap_end: |
mmap_invalid: |
movl %edx, e820counter |
invalid_boot: |
# not reached |
#ifdef CONFIG_SMP |
# copy AP bootstrap routines below 1 MB |
movl $BOOT_OFFSET, %esi |
movl $AP_BOOT_OFFSET, %edi |
movl $_hardcoded_unmapped_size, %ecx |
rep movsb |
#endif |
call main_bsp # never returns |
cli |
hlt0: |
hlt |
jmp hlt0 |
hlt |
.global map_kernel |
map_kernel: |
117,8 → 222,8 |
# For simplicity, we map the entire 4G space. |
# |
movl %cr4, %ecx |
orl $(1 << 4), %ecx # turn PSE on |
andl $(~(1 << 5)), %ecx # turn PAE off |
orl $(1 << 4), %ecx # turn PSE on |
andl $(~(1 << 5)), %ecx # turn PAE off |
movl %ecx, %cr4 |
movl $(page_directory + 0), %esi |
125,31 → 230,30 |
movl $(page_directory + 2048), %edi |
xorl %ecx, %ecx |
xorl %ebx, %ebx |
floop: |
movl $((1 << 7) | (1 << 1) | (1 << 0)), %eax |
orl %ebx, %eax |
movl %eax, (%esi, %ecx, 4) # mapping 0x00000000 + %ecx * 4M => 0x00000000 + %ecx * 4M |
movl %eax, (%edi, %ecx, 4) # mapping 0x80000000 + %ecx * 4M => 0x00000000 + %ecx * 4M |
addl $(4 * 1024 * 1024), %ebx |
incl %ecx |
cmpl $512, %ecx |
jl floop |
0: |
movl $((1 << 7) | (1 << 1) | (1 << 0)), %eax |
orl %ebx, %eax |
movl %eax, (%esi, %ecx, 4) # mapping 0x00000000 + %ecx * 4M => 0x00000000 + %ecx * 4M |
movl %eax, (%edi, %ecx, 4) # mapping 0x80000000 + %ecx * 4M => 0x00000000 + %ecx * 4M |
addl $(4 * 1024 * 1024), %ebx |
incl %ecx |
cmpl $512, %ecx |
jl 0b |
movl %esi, %cr3 |
movl %cr0, %ebx |
orl $(1 << 31), %ebx # turn paging on |
orl $(1 << 31), %ebx # turn paging on |
movl %ebx, %cr0 |
ret |
# Print string from %esi to EGA display (in red) and halt |
error_halt: |
movl $0xb8000, %edi # base of EGA text mode memory |
movl $0xb8000, %edi # base of EGA text mode memory |
xorl %eax, %eax |
movw $0x3d4, %dx # read bits 8 - 15 of the cursor address |
movw $0x3d4, %dx # read bits 8 - 15 of the cursor address |
movb $0xe, %al |
outb %al, %dx |
157,7 → 261,7 |
inb %dx, %al |
shl $8, %ax |
movw $0x3d4, %dx # read bits 0 - 7 of the cursor address |
movw $0x3d4, %dx # read bits 0 - 7 of the cursor address |
movb $0xf, %al |
outb %al, %dx |
166,9 → 270,7 |
cmp $1920, %ax |
jbe cursor_ok |
movw $1920, %ax # sanity check for the cursor on the last line |
movw $1920, %ax # sanity check for the cursor on the last line |
cursor_ok: |
movw %ax, %bx |
175,7 → 277,7 |
shl $1, %eax |
addl %eax, %edi |
movw $0x0c00, %ax # black background, light red foreground |
movw $0x0c00, %ax # black background, light red foreground |
ploop: |
lodsb |
182,11 → 284,11 |
cmp $0, %al |
je ploop_end |
stosw |
inc %bx |
inc %bx |
jmp ploop |
ploop_end: |
movw $0x3d4, %dx # write bits 8 - 15 of the cursor address |
movw $0x3d4, %dx # write bits 8 - 15 of the cursor address |
movb $0xe, %al |
outb %al, %dx |
194,7 → 296,7 |
movb %bh, %al |
outb %al, %dx |
movw $0x3d4, %dx # write bits 0 - 7 of the cursor address |
movw $0x3d4, %dx # write bits 0 - 7 of the cursor address |
movb $0xf, %al |
outb %al, %dx |
201,14 → 303,240 |
movw $0x3d5, %dx |
movb %bl, %al |
outb %al, %dx |
cli |
hlt1: |
hlt |
jmp hlt1 |
hlt |
#include "vesa_real.inc" |
#ifdef CONFIG_FB |
vesa_init: |
jmp $selector(VESA_INIT_DES), $vesa_init_real - vesa_init |
.code16 |
vesa_init_real: |
mov %cr0, %eax |
and $~1, %eax |
mov %eax, %cr0 |
jmp $VESA_INIT_SEGMENT, $vesa_init_real2 - vesa_init |
vesa_init_real2: |
mov $VESA_INIT_SEGMENT, %bx |
mov %bx, %es |
mov %bx, %fs |
mov %bx, %gs |
mov %bx, %ds |
mov %bx, %ss |
movl %esp, %eax |
movl $0x0000fffc, %esp |
movl $0x0000fffc, %ebp |
pushl %eax |
#define VESA_INFO_SIZE 1024 |
#define VESA_MODE_ATTRIBUTES_OFFSET 0 |
#define VESA_MODE_LIST_PTR_OFFSET 14 |
#define VESA_MODE_SCANLINE_OFFSET 16 |
#define VESA_MODE_WIDTH_OFFSET 18 |
#define VESA_MODE_HEIGHT_OFFSET 20 |
#define VESA_MODE_BPP_OFFSET 25 |
#define VESA_MODE_PHADDR_OFFSET 40 |
#define VESA_END_OF_MODES 0xffff |
#define VESA_OK 0x4f |
#define VESA_GET_INFO 0x4f00 |
#define VESA_GET_MODE_INFO 0x4f01 |
#define VESA_SET_MODE 0x4f02 |
#define VESA_SET_PALETTE 0x4f09 |
#if CONFIG_VESA_BPP == 24 |
#define CONFIG_VESA_BPP_VARIANT 32 |
#endif |
mov $VESA_GET_INFO, %ax |
mov $e_vesa_init - vesa_init, %di |
push %di |
int $0x10 |
pop %di |
cmp $VESA_OK, %al |
jnz 0f |
mov 2 + VESA_MODE_LIST_PTR_OFFSET(%di), %si |
mov %si, %gs |
mov VESA_MODE_LIST_PTR_OFFSET(%di), %si |
add $VESA_INFO_SIZE, %di |
1:# Try next mode |
mov %gs:(%si), %cx |
cmp $VESA_END_OF_MODES, %cx |
jz 0f |
inc %si |
inc %si |
push %cx |
push %di |
push %si |
mov $VESA_GET_MODE_INFO, %ax |
int $0x10 |
pop %si |
pop %di |
pop %cx |
cmp $VESA_OK, %al |
jnz 0f |
mov $CONFIG_VESA_WIDTH, %ax |
cmp VESA_MODE_WIDTH_OFFSET(%di), %ax |
jnz 1b |
mov $CONFIG_VESA_HEIGHT, %ax |
cmp VESA_MODE_HEIGHT_OFFSET(%di), %ax |
jnz 1b |
mov $CONFIG_VESA_BPP, %al |
cmp VESA_MODE_BPP_OFFSET(%di), %al |
#ifdef CONFIG_VESA_BPP_VARIANT |
jz 2f |
mov $CONFIG_VESA_BPP_VARIANT, %al |
cmp VESA_MODE_BPP_OFFSET(%di), %al |
#endif |
jnz 1b |
2: |
mov %cx, %bx |
or $0xc000, %bx |
push %di |
mov $VESA_SET_MODE, %ax |
int $0x10 |
pop %di |
cmp $VESA_OK, %al |
jnz 0f |
#if CONFIG_VESA_BPP == 8 |
# Set 3:2:3 VGA palette |
mov VESA_MODE_ATTRIBUTES_OFFSET(%di), %ax |
push %di |
mov $vga323 - vesa_init, %di |
mov $0x100, %ecx |
bt $5, %ax # Test if VGA compatible registers are present |
jnc vga_compat |
# Try VESA routine to set palette |
mov $VESA_SET_PALETTE, %ax |
xor %bl, %bl |
xor %dx, %dx |
int $0x10 |
jmp vga_not_compat |
vga_compat: |
# Try VGA registers to set palette |
movw $0x3c6, %dx # Set palette mask |
movb $0xff, %al |
outb %al, %dx |
movw $0x3c8, %dx # First index to set |
xor %al, %al |
outb %al, %dx |
movw $0x3c9, %dx # Data port |
vga_loop: |
movb %es:2(%di), %al |
outb %al, %dx |
movb %es:1(%di), %al |
outb %al, %dx |
movb %es:(%di), %al |
outb %al, %dx |
addw $4, %di |
loop vga_loop |
vga_not_compat: |
pop %di |
#endif |
mov VESA_MODE_PHADDR_OFFSET(%di), %esi |
mov VESA_MODE_WIDTH_OFFSET(%di), %ax |
shl $16, %eax |
mov VESA_MODE_HEIGHT_OFFSET(%di), %ax |
mov VESA_MODE_BPP_OFFSET(%di), %bl |
xor %bh, %bh |
shl $16, %ebx |
mov VESA_MODE_SCANLINE_OFFSET(%di), %bx |
mov %eax, %edi |
8: |
mov %cr0, %eax |
or $1, %eax |
mov %eax, %cr0 |
jmp 9f |
9: |
ljmpl $selector(KTEXT_DES), $(vesa_init_protect - vesa_init + VESA_INIT_SEGMENT << 4) |
0:# No prefered mode found |
mov $0x111, %cx |
push %di |
push %cx |
mov $VESA_GET_MODE_INFO, %ax |
int $0x10 |
pop %cx |
pop %di |
cmp $VESA_OK, %al |
jnz 1f |
jz 2b # Force relative jump |
1: |
mov $0x0003, %ax |
int $0x10 |
mov $0xffffffff, %edi # EGA text mode used, because of problems with VESA |
xor %ax, %ax |
jz 8b # Force relative jump |
vga323: |
#include "vga323.pal" |
.code32 |
vesa_init_protect: |
movw $selector(KDATA_DES), %cx |
movw %cx, %es |
movw %cx, %fs |
movw %cx, %gs |
movw %cx, %ds # kernel data + stack |
movw %cx, %ss |
movl $START_STACK, %esp # initialize stack pointer |
jmpl $selector(KTEXT_DES), $vesa_meeting_point |
.align 4 |
e_vesa_init: |
#endif |
.section K_DATA_START, "aw", @progbits |
.align 4096 |
223,6 → 551,3 |
pse_msg: |
.asciz "Page Size Extension not supported. System halted." |
sep_msg: |
.asciz "SYSENTER/SYSEXIT not supported. System halted." |
/branches/arm/kernel/arch/ia32/src/boot/vga323.pal |
---|
1,256 → 1,256 |
.byte 0x00, 0x00, 0x00, 0x00 |
.byte 0x09, 0x00, 0x00, 0x00 |
.byte 0x12, 0x00, 0x00, 0x00 |
.byte 0x1b, 0x00, 0x00, 0x00 |
.byte 0x24, 0x00, 0x00, 0x00 |
.byte 0x2d, 0x00, 0x00, 0x00 |
.byte 0x36, 0x00, 0x00, 0x00 |
.byte 0x3f, 0x00, 0x00, 0x00 |
.byte 0x00, 0x15, 0x00, 0x00 |
.byte 0x09, 0x15, 0x00, 0x00 |
.byte 0x12, 0x15, 0x00, 0x00 |
.byte 0x1b, 0x15, 0x00, 0x00 |
.byte 0x24, 0x15, 0x00, 0x00 |
.byte 0x2d, 0x15, 0x00, 0x00 |
.byte 0x36, 0x15, 0x00, 0x00 |
.byte 0x3f, 0x15, 0x00, 0x00 |
.byte 0x00, 0x2a, 0x00, 0x00 |
.byte 0x09, 0x2a, 0x00, 0x00 |
.byte 0x12, 0x2a, 0x00, 0x00 |
.byte 0x1b, 0x2a, 0x00, 0x00 |
.byte 0x24, 0x2a, 0x00, 0x00 |
.byte 0x2d, 0x2a, 0x00, 0x00 |
.byte 0x36, 0x2a, 0x00, 0x00 |
.byte 0x3f, 0x2a, 0x00, 0x00 |
.byte 0x00, 0x3f, 0x00, 0x00 |
.byte 0x09, 0x3f, 0x00, 0x00 |
.byte 0x12, 0x3f, 0x00, 0x00 |
.byte 0x1b, 0x3f, 0x00, 0x00 |
.byte 0x24, 0x3f, 0x00, 0x00 |
.byte 0x2d, 0x3f, 0x00, 0x00 |
.byte 0x36, 0x3f, 0x00, 0x00 |
.byte 0x3f, 0x3f, 0x00, 0x00 |
.byte 0x00, 0x00, 0x09, 0x00 |
.byte 0x09, 0x00, 0x09, 0x00 |
.byte 0x12, 0x00, 0x09, 0x00 |
.byte 0x1b, 0x00, 0x09, 0x00 |
.byte 0x24, 0x00, 0x09, 0x00 |
.byte 0x2d, 0x00, 0x09, 0x00 |
.byte 0x36, 0x00, 0x09, 0x00 |
.byte 0x3f, 0x00, 0x09, 0x00 |
.byte 0x00, 0x15, 0x09, 0x00 |
.byte 0x09, 0x15, 0x09, 0x00 |
.byte 0x12, 0x15, 0x09, 0x00 |
.byte 0x1b, 0x15, 0x09, 0x00 |
.byte 0x24, 0x15, 0x09, 0x00 |
.byte 0x2d, 0x15, 0x09, 0x00 |
.byte 0x36, 0x15, 0x09, 0x00 |
.byte 0x3f, 0x15, 0x09, 0x00 |
.byte 0x00, 0x2a, 0x09, 0x00 |
.byte 0x09, 0x2a, 0x09, 0x00 |
.byte 0x12, 0x2a, 0x09, 0x00 |
.byte 0x1b, 0x2a, 0x09, 0x00 |
.byte 0x24, 0x2a, 0x09, 0x00 |
.byte 0x2d, 0x2a, 0x09, 0x00 |
.byte 0x36, 0x2a, 0x09, 0x00 |
.byte 0x3f, 0x2a, 0x09, 0x00 |
.byte 0x00, 0x3f, 0x09, 0x00 |
.byte 0x09, 0x3f, 0x09, 0x00 |
.byte 0x12, 0x3f, 0x09, 0x00 |
.byte 0x1b, 0x3f, 0x09, 0x00 |
.byte 0x24, 0x3f, 0x09, 0x00 |
.byte 0x2d, 0x3f, 0x09, 0x00 |
.byte 0x36, 0x3f, 0x09, 0x00 |
.byte 0x3f, 0x3f, 0x09, 0x00 |
.byte 0x00, 0x00, 0x12, 0x00 |
.byte 0x09, 0x00, 0x12, 0x00 |
.byte 0x12, 0x00, 0x12, 0x00 |
.byte 0x1b, 0x00, 0x12, 0x00 |
.byte 0x24, 0x00, 0x12, 0x00 |
.byte 0x2d, 0x00, 0x12, 0x00 |
.byte 0x36, 0x00, 0x12, 0x00 |
.byte 0x3f, 0x00, 0x12, 0x00 |
.byte 0x00, 0x15, 0x12, 0x00 |
.byte 0x09, 0x15, 0x12, 0x00 |
.byte 0x12, 0x15, 0x12, 0x00 |
.byte 0x1b, 0x15, 0x12, 0x00 |
.byte 0x24, 0x15, 0x12, 0x00 |
.byte 0x2d, 0x15, 0x12, 0x00 |
.byte 0x36, 0x15, 0x12, 0x00 |
.byte 0x3f, 0x15, 0x12, 0x00 |
.byte 0x00, 0x2a, 0x12, 0x00 |
.byte 0x09, 0x2a, 0x12, 0x00 |
.byte 0x12, 0x2a, 0x12, 0x00 |
.byte 0x1b, 0x2a, 0x12, 0x00 |
.byte 0x24, 0x2a, 0x12, 0x00 |
.byte 0x2d, 0x2a, 0x12, 0x00 |
.byte 0x36, 0x2a, 0x12, 0x00 |
.byte 0x3f, 0x2a, 0x12, 0x00 |
.byte 0x00, 0x3f, 0x12, 0x00 |
.byte 0x09, 0x3f, 0x12, 0x00 |
.byte 0x12, 0x3f, 0x12, 0x00 |
.byte 0x1b, 0x3f, 0x12, 0x00 |
.byte 0x24, 0x3f, 0x12, 0x00 |
.byte 0x2d, 0x3f, 0x12, 0x00 |
.byte 0x36, 0x3f, 0x12, 0x00 |
.byte 0x3f, 0x3f, 0x12, 0x00 |
.byte 0x00, 0x00, 0x1b, 0x00 |
.byte 0x09, 0x00, 0x1b, 0x00 |
.byte 0x12, 0x00, 0x1b, 0x00 |
.byte 0x1b, 0x00, 0x1b, 0x00 |
.byte 0x24, 0x00, 0x1b, 0x00 |
.byte 0x2d, 0x00, 0x1b, 0x00 |
.byte 0x36, 0x00, 0x1b, 0x00 |
.byte 0x3f, 0x00, 0x1b, 0x00 |
.byte 0x00, 0x15, 0x1b, 0x00 |
.byte 0x09, 0x15, 0x1b, 0x00 |
.byte 0x12, 0x15, 0x1b, 0x00 |
.byte 0x1b, 0x15, 0x1b, 0x00 |
.byte 0x24, 0x15, 0x1b, 0x00 |
.byte 0x2d, 0x15, 0x1b, 0x00 |
.byte 0x36, 0x15, 0x1b, 0x00 |
.byte 0x3f, 0x15, 0x1b, 0x00 |
.byte 0x00, 0x2a, 0x1b, 0x00 |
.byte 0x09, 0x2a, 0x1b, 0x00 |
.byte 0x12, 0x2a, 0x1b, 0x00 |
.byte 0x1b, 0x2a, 0x1b, 0x00 |
.byte 0x24, 0x2a, 0x1b, 0x00 |
.byte 0x2d, 0x2a, 0x1b, 0x00 |
.byte 0x36, 0x2a, 0x1b, 0x00 |
.byte 0x3f, 0x2a, 0x1b, 0x00 |
.byte 0x00, 0x3f, 0x1b, 0x00 |
.byte 0x09, 0x3f, 0x1b, 0x00 |
.byte 0x12, 0x3f, 0x1b, 0x00 |
.byte 0x1b, 0x3f, 0x1b, 0x00 |
.byte 0x24, 0x3f, 0x1b, 0x00 |
.byte 0x2d, 0x3f, 0x1b, 0x00 |
.byte 0x36, 0x3f, 0x1b, 0x00 |
.byte 0x3f, 0x3f, 0x1b, 0x00 |
.byte 0x00, 0x00, 0x24, 0x00 |
.byte 0x09, 0x00, 0x24, 0x00 |
.byte 0x12, 0x00, 0x24, 0x00 |
.byte 0x1b, 0x00, 0x24, 0x00 |
.byte 0x24, 0x00, 0x24, 0x00 |
.byte 0x2d, 0x00, 0x24, 0x00 |
.byte 0x36, 0x00, 0x24, 0x00 |
.byte 0x3f, 0x00, 0x24, 0x00 |
.byte 0x00, 0x15, 0x24, 0x00 |
.byte 0x09, 0x15, 0x24, 0x00 |
.byte 0x12, 0x15, 0x24, 0x00 |
.byte 0x1b, 0x15, 0x24, 0x00 |
.byte 0x24, 0x15, 0x24, 0x00 |
.byte 0x2d, 0x15, 0x24, 0x00 |
.byte 0x36, 0x15, 0x24, 0x00 |
.byte 0x3f, 0x15, 0x24, 0x00 |
.byte 0x00, 0x2a, 0x24, 0x00 |
.byte 0x09, 0x2a, 0x24, 0x00 |
.byte 0x12, 0x2a, 0x24, 0x00 |
.byte 0x1b, 0x2a, 0x24, 0x00 |
.byte 0x24, 0x2a, 0x24, 0x00 |
.byte 0x2d, 0x2a, 0x24, 0x00 |
.byte 0x36, 0x2a, 0x24, 0x00 |
.byte 0x3f, 0x2a, 0x24, 0x00 |
.byte 0x00, 0x3f, 0x24, 0x00 |
.byte 0x09, 0x3f, 0x24, 0x00 |
.byte 0x12, 0x3f, 0x24, 0x00 |
.byte 0x1b, 0x3f, 0x24, 0x00 |
.byte 0x24, 0x3f, 0x24, 0x00 |
.byte 0x2d, 0x3f, 0x24, 0x00 |
.byte 0x36, 0x3f, 0x24, 0x00 |
.byte 0x3f, 0x3f, 0x24, 0x00 |
.byte 0x00, 0x00, 0x2d, 0x00 |
.byte 0x09, 0x00, 0x2d, 0x00 |
.byte 0x12, 0x00, 0x2d, 0x00 |
.byte 0x1b, 0x00, 0x2d, 0x00 |
.byte 0x24, 0x00, 0x2d, 0x00 |
.byte 0x2d, 0x00, 0x2d, 0x00 |
.byte 0x36, 0x00, 0x2d, 0x00 |
.byte 0x3f, 0x00, 0x2d, 0x00 |
.byte 0x00, 0x15, 0x2d, 0x00 |
.byte 0x09, 0x15, 0x2d, 0x00 |
.byte 0x12, 0x15, 0x2d, 0x00 |
.byte 0x1b, 0x15, 0x2d, 0x00 |
.byte 0x24, 0x15, 0x2d, 0x00 |
.byte 0x2d, 0x15, 0x2d, 0x00 |
.byte 0x36, 0x15, 0x2d, 0x00 |
.byte 0x3f, 0x15, 0x2d, 0x00 |
.byte 0x00, 0x2a, 0x2d, 0x00 |
.byte 0x09, 0x2a, 0x2d, 0x00 |
.byte 0x12, 0x2a, 0x2d, 0x00 |
.byte 0x1b, 0x2a, 0x2d, 0x00 |
.byte 0x24, 0x2a, 0x2d, 0x00 |
.byte 0x2d, 0x2a, 0x2d, 0x00 |
.byte 0x36, 0x2a, 0x2d, 0x00 |
.byte 0x3f, 0x2a, 0x2d, 0x00 |
.byte 0x00, 0x3f, 0x2d, 0x00 |
.byte 0x09, 0x3f, 0x2d, 0x00 |
.byte 0x12, 0x3f, 0x2d, 0x00 |
.byte 0x1b, 0x3f, 0x2d, 0x00 |
.byte 0x24, 0x3f, 0x2d, 0x00 |
.byte 0x2d, 0x3f, 0x2d, 0x00 |
.byte 0x36, 0x3f, 0x2d, 0x00 |
.byte 0x3f, 0x3f, 0x2d, 0x00 |
.byte 0x00, 0x00, 0x36, 0x00 |
.byte 0x09, 0x00, 0x36, 0x00 |
.byte 0x12, 0x00, 0x36, 0x00 |
.byte 0x1b, 0x00, 0x36, 0x00 |
.byte 0x24, 0x00, 0x36, 0x00 |
.byte 0x2d, 0x00, 0x36, 0x00 |
.byte 0x36, 0x00, 0x36, 0x00 |
.byte 0x3f, 0x00, 0x36, 0x00 |
.byte 0x00, 0x15, 0x36, 0x00 |
.byte 0x09, 0x15, 0x36, 0x00 |
.byte 0x12, 0x15, 0x36, 0x00 |
.byte 0x1b, 0x15, 0x36, 0x00 |
.byte 0x24, 0x15, 0x36, 0x00 |
.byte 0x2d, 0x15, 0x36, 0x00 |
.byte 0x36, 0x15, 0x36, 0x00 |
.byte 0x3f, 0x15, 0x36, 0x00 |
.byte 0x00, 0x2a, 0x36, 0x00 |
.byte 0x09, 0x2a, 0x36, 0x00 |
.byte 0x12, 0x2a, 0x36, 0x00 |
.byte 0x1b, 0x2a, 0x36, 0x00 |
.byte 0x24, 0x2a, 0x36, 0x00 |
.byte 0x2d, 0x2a, 0x36, 0x00 |
.byte 0x36, 0x2a, 0x36, 0x00 |
.byte 0x3f, 0x2a, 0x36, 0x00 |
.byte 0x00, 0x3f, 0x36, 0x00 |
.byte 0x09, 0x3f, 0x36, 0x00 |
.byte 0x12, 0x3f, 0x36, 0x00 |
.byte 0x1b, 0x3f, 0x36, 0x00 |
.byte 0x24, 0x3f, 0x36, 0x00 |
.byte 0x2d, 0x3f, 0x36, 0x00 |
.byte 0x36, 0x3f, 0x36, 0x00 |
.byte 0x3f, 0x3f, 0x36, 0x00 |
.byte 0x00, 0x00, 0x3f, 0x00 |
.byte 0x09, 0x00, 0x3f, 0x00 |
.byte 0x12, 0x00, 0x3f, 0x00 |
.byte 0x1b, 0x00, 0x3f, 0x00 |
.byte 0x24, 0x00, 0x3f, 0x00 |
.byte 0x2d, 0x00, 0x3f, 0x00 |
.byte 0x36, 0x00, 0x3f, 0x00 |
.byte 0x3f, 0x00, 0x3f, 0x00 |
.byte 0x00, 0x15, 0x3f, 0x00 |
.byte 0x09, 0x15, 0x3f, 0x00 |
.byte 0x12, 0x15, 0x3f, 0x00 |
.byte 0x1b, 0x15, 0x3f, 0x00 |
.byte 0x24, 0x15, 0x3f, 0x00 |
.byte 0x2d, 0x15, 0x3f, 0x00 |
.byte 0x36, 0x15, 0x3f, 0x00 |
.byte 0x3f, 0x15, 0x3f, 0x00 |
.byte 0x00, 0x2a, 0x3f, 0x00 |
.byte 0x09, 0x2a, 0x3f, 0x00 |
.byte 0x12, 0x2a, 0x3f, 0x00 |
.byte 0x1b, 0x2a, 0x3f, 0x00 |
.byte 0x24, 0x2a, 0x3f, 0x00 |
.byte 0x2d, 0x2a, 0x3f, 0x00 |
.byte 0x36, 0x2a, 0x3f, 0x00 |
.byte 0x3f, 0x2a, 0x3f, 0x00 |
.byte 0x00, 0x3f, 0x3f, 0x00 |
.byte 0x09, 0x3f, 0x3f, 0x00 |
.byte 0x12, 0x3f, 0x3f, 0x00 |
.byte 0x1b, 0x3f, 0x3f, 0x00 |
.byte 0x24, 0x3f, 0x3f, 0x00 |
.byte 0x2d, 0x3f, 0x3f, 0x00 |
.byte 0x36, 0x3f, 0x3f, 0x00 |
.byte 0x3f, 0x3f, 0x3f, 0x00 |
.byte 0x36, 0x3f, 0x3f, 0x00 |
.byte 0x2d, 0x3f, 0x3f, 0x00 |
.byte 0x24, 0x3f, 0x3f, 0x00 |
.byte 0x1b, 0x3f, 0x3f, 0x00 |
.byte 0x12, 0x3f, 0x3f, 0x00 |
.byte 0x09, 0x3f, 0x3f, 0x00 |
.byte 0x00, 0x3f, 0x3f, 0x00 |
.byte 0x3f, 0x2a, 0x3f, 0x00 |
.byte 0x36, 0x2a, 0x3f, 0x00 |
.byte 0x2d, 0x2a, 0x3f, 0x00 |
.byte 0x24, 0x2a, 0x3f, 0x00 |
.byte 0x1b, 0x2a, 0x3f, 0x00 |
.byte 0x12, 0x2a, 0x3f, 0x00 |
.byte 0x09, 0x2a, 0x3f, 0x00 |
.byte 0x00, 0x2a, 0x3f, 0x00 |
.byte 0x3f, 0x15, 0x3f, 0x00 |
.byte 0x36, 0x15, 0x3f, 0x00 |
.byte 0x2d, 0x15, 0x3f, 0x00 |
.byte 0x24, 0x15, 0x3f, 0x00 |
.byte 0x1b, 0x15, 0x3f, 0x00 |
.byte 0x12, 0x15, 0x3f, 0x00 |
.byte 0x09, 0x15, 0x3f, 0x00 |
.byte 0x00, 0x15, 0x3f, 0x00 |
.byte 0x3f, 0x00, 0x3f, 0x00 |
.byte 0x36, 0x00, 0x3f, 0x00 |
.byte 0x2d, 0x00, 0x3f, 0x00 |
.byte 0x24, 0x00, 0x3f, 0x00 |
.byte 0x1b, 0x00, 0x3f, 0x00 |
.byte 0x12, 0x00, 0x3f, 0x00 |
.byte 0x09, 0x00, 0x3f, 0x00 |
.byte 0x00, 0x00, 0x3f, 0x00 |
.byte 0x3f, 0x3f, 0x36, 0x00 |
.byte 0x36, 0x3f, 0x36, 0x00 |
.byte 0x2d, 0x3f, 0x36, 0x00 |
.byte 0x24, 0x3f, 0x36, 0x00 |
.byte 0x1b, 0x3f, 0x36, 0x00 |
.byte 0x12, 0x3f, 0x36, 0x00 |
.byte 0x09, 0x3f, 0x36, 0x00 |
.byte 0x00, 0x3f, 0x36, 0x00 |
.byte 0x3f, 0x2a, 0x36, 0x00 |
.byte 0x36, 0x2a, 0x36, 0x00 |
.byte 0x2d, 0x2a, 0x36, 0x00 |
.byte 0x24, 0x2a, 0x36, 0x00 |
.byte 0x1b, 0x2a, 0x36, 0x00 |
.byte 0x12, 0x2a, 0x36, 0x00 |
.byte 0x09, 0x2a, 0x36, 0x00 |
.byte 0x00, 0x2a, 0x36, 0x00 |
.byte 0x3f, 0x15, 0x36, 0x00 |
.byte 0x36, 0x15, 0x36, 0x00 |
.byte 0x2d, 0x15, 0x36, 0x00 |
.byte 0x24, 0x15, 0x36, 0x00 |
.byte 0x1b, 0x15, 0x36, 0x00 |
.byte 0x12, 0x15, 0x36, 0x00 |
.byte 0x09, 0x15, 0x36, 0x00 |
.byte 0x00, 0x15, 0x36, 0x00 |
.byte 0x3f, 0x00, 0x36, 0x00 |
.byte 0x36, 0x00, 0x36, 0x00 |
.byte 0x2d, 0x00, 0x36, 0x00 |
.byte 0x24, 0x00, 0x36, 0x00 |
.byte 0x1b, 0x00, 0x36, 0x00 |
.byte 0x12, 0x00, 0x36, 0x00 |
.byte 0x09, 0x00, 0x36, 0x00 |
.byte 0x00, 0x00, 0x36, 0x00 |
.byte 0x3f, 0x3f, 0x2d, 0x00 |
.byte 0x36, 0x3f, 0x2d, 0x00 |
.byte 0x2d, 0x3f, 0x2d, 0x00 |
.byte 0x24, 0x3f, 0x2d, 0x00 |
.byte 0x1b, 0x3f, 0x2d, 0x00 |
.byte 0x12, 0x3f, 0x2d, 0x00 |
.byte 0x09, 0x3f, 0x2d, 0x00 |
.byte 0x00, 0x3f, 0x2d, 0x00 |
.byte 0x3f, 0x2a, 0x2d, 0x00 |
.byte 0x36, 0x2a, 0x2d, 0x00 |
.byte 0x2d, 0x2a, 0x2d, 0x00 |
.byte 0x24, 0x2a, 0x2d, 0x00 |
.byte 0x1b, 0x2a, 0x2d, 0x00 |
.byte 0x12, 0x2a, 0x2d, 0x00 |
.byte 0x09, 0x2a, 0x2d, 0x00 |
.byte 0x00, 0x2a, 0x2d, 0x00 |
.byte 0x3f, 0x15, 0x2d, 0x00 |
.byte 0x36, 0x15, 0x2d, 0x00 |
.byte 0x2d, 0x15, 0x2d, 0x00 |
.byte 0x24, 0x15, 0x2d, 0x00 |
.byte 0x1b, 0x15, 0x2d, 0x00 |
.byte 0x12, 0x15, 0x2d, 0x00 |
.byte 0x09, 0x15, 0x2d, 0x00 |
.byte 0x00, 0x15, 0x2d, 0x00 |
.byte 0x3f, 0x00, 0x2d, 0x00 |
.byte 0x36, 0x00, 0x2d, 0x00 |
.byte 0x2d, 0x00, 0x2d, 0x00 |
.byte 0x24, 0x00, 0x2d, 0x00 |
.byte 0x1b, 0x00, 0x2d, 0x00 |
.byte 0x12, 0x00, 0x2d, 0x00 |
.byte 0x09, 0x00, 0x2d, 0x00 |
.byte 0x00, 0x00, 0x2d, 0x00 |
.byte 0x3f, 0x3f, 0x24, 0x00 |
.byte 0x36, 0x3f, 0x24, 0x00 |
.byte 0x2d, 0x3f, 0x24, 0x00 |
.byte 0x24, 0x3f, 0x24, 0x00 |
.byte 0x1b, 0x3f, 0x24, 0x00 |
.byte 0x12, 0x3f, 0x24, 0x00 |
.byte 0x09, 0x3f, 0x24, 0x00 |
.byte 0x00, 0x3f, 0x24, 0x00 |
.byte 0x3f, 0x2a, 0x24, 0x00 |
.byte 0x36, 0x2a, 0x24, 0x00 |
.byte 0x2d, 0x2a, 0x24, 0x00 |
.byte 0x24, 0x2a, 0x24, 0x00 |
.byte 0x1b, 0x2a, 0x24, 0x00 |
.byte 0x12, 0x2a, 0x24, 0x00 |
.byte 0x09, 0x2a, 0x24, 0x00 |
.byte 0x00, 0x2a, 0x24, 0x00 |
.byte 0x3f, 0x15, 0x24, 0x00 |
.byte 0x36, 0x15, 0x24, 0x00 |
.byte 0x2d, 0x15, 0x24, 0x00 |
.byte 0x24, 0x15, 0x24, 0x00 |
.byte 0x1b, 0x15, 0x24, 0x00 |
.byte 0x12, 0x15, 0x24, 0x00 |
.byte 0x09, 0x15, 0x24, 0x00 |
.byte 0x00, 0x15, 0x24, 0x00 |
.byte 0x3f, 0x00, 0x24, 0x00 |
.byte 0x36, 0x00, 0x24, 0x00 |
.byte 0x2d, 0x00, 0x24, 0x00 |
.byte 0x24, 0x00, 0x24, 0x00 |
.byte 0x1b, 0x00, 0x24, 0x00 |
.byte 0x12, 0x00, 0x24, 0x00 |
.byte 0x09, 0x00, 0x24, 0x00 |
.byte 0x00, 0x00, 0x24, 0x00 |
.byte 0x3f, 0x3f, 0x1b, 0x00 |
.byte 0x36, 0x3f, 0x1b, 0x00 |
.byte 0x2d, 0x3f, 0x1b, 0x00 |
.byte 0x24, 0x3f, 0x1b, 0x00 |
.byte 0x1b, 0x3f, 0x1b, 0x00 |
.byte 0x12, 0x3f, 0x1b, 0x00 |
.byte 0x09, 0x3f, 0x1b, 0x00 |
.byte 0x00, 0x3f, 0x1b, 0x00 |
.byte 0x3f, 0x2a, 0x1b, 0x00 |
.byte 0x36, 0x2a, 0x1b, 0x00 |
.byte 0x2d, 0x2a, 0x1b, 0x00 |
.byte 0x24, 0x2a, 0x1b, 0x00 |
.byte 0x1b, 0x2a, 0x1b, 0x00 |
.byte 0x12, 0x2a, 0x1b, 0x00 |
.byte 0x09, 0x2a, 0x1b, 0x00 |
.byte 0x00, 0x2a, 0x1b, 0x00 |
.byte 0x3f, 0x15, 0x1b, 0x00 |
.byte 0x36, 0x15, 0x1b, 0x00 |
.byte 0x2d, 0x15, 0x1b, 0x00 |
.byte 0x24, 0x15, 0x1b, 0x00 |
.byte 0x1b, 0x15, 0x1b, 0x00 |
.byte 0x12, 0x15, 0x1b, 0x00 |
.byte 0x09, 0x15, 0x1b, 0x00 |
.byte 0x00, 0x15, 0x1b, 0x00 |
.byte 0x3f, 0x00, 0x1b, 0x00 |
.byte 0x36, 0x00, 0x1b, 0x00 |
.byte 0x2d, 0x00, 0x1b, 0x00 |
.byte 0x24, 0x00, 0x1b, 0x00 |
.byte 0x1b, 0x00, 0x1b, 0x00 |
.byte 0x12, 0x00, 0x1b, 0x00 |
.byte 0x09, 0x00, 0x1b, 0x00 |
.byte 0x00, 0x00, 0x1b, 0x00 |
.byte 0x3f, 0x3f, 0x12, 0x00 |
.byte 0x36, 0x3f, 0x12, 0x00 |
.byte 0x2d, 0x3f, 0x12, 0x00 |
.byte 0x24, 0x3f, 0x12, 0x00 |
.byte 0x1b, 0x3f, 0x12, 0x00 |
.byte 0x12, 0x3f, 0x12, 0x00 |
.byte 0x09, 0x3f, 0x12, 0x00 |
.byte 0x00, 0x3f, 0x12, 0x00 |
.byte 0x3f, 0x2a, 0x12, 0x00 |
.byte 0x36, 0x2a, 0x12, 0x00 |
.byte 0x2d, 0x2a, 0x12, 0x00 |
.byte 0x24, 0x2a, 0x12, 0x00 |
.byte 0x1b, 0x2a, 0x12, 0x00 |
.byte 0x12, 0x2a, 0x12, 0x00 |
.byte 0x09, 0x2a, 0x12, 0x00 |
.byte 0x00, 0x2a, 0x12, 0x00 |
.byte 0x3f, 0x15, 0x12, 0x00 |
.byte 0x36, 0x15, 0x12, 0x00 |
.byte 0x2d, 0x15, 0x12, 0x00 |
.byte 0x24, 0x15, 0x12, 0x00 |
.byte 0x1b, 0x15, 0x12, 0x00 |
.byte 0x12, 0x15, 0x12, 0x00 |
.byte 0x09, 0x15, 0x12, 0x00 |
.byte 0x00, 0x15, 0x12, 0x00 |
.byte 0x3f, 0x00, 0x12, 0x00 |
.byte 0x36, 0x00, 0x12, 0x00 |
.byte 0x2d, 0x00, 0x12, 0x00 |
.byte 0x24, 0x00, 0x12, 0x00 |
.byte 0x1b, 0x00, 0x12, 0x00 |
.byte 0x12, 0x00, 0x12, 0x00 |
.byte 0x09, 0x00, 0x12, 0x00 |
.byte 0x00, 0x00, 0x12, 0x00 |
.byte 0x3f, 0x3f, 0x09, 0x00 |
.byte 0x36, 0x3f, 0x09, 0x00 |
.byte 0x2d, 0x3f, 0x09, 0x00 |
.byte 0x24, 0x3f, 0x09, 0x00 |
.byte 0x1b, 0x3f, 0x09, 0x00 |
.byte 0x12, 0x3f, 0x09, 0x00 |
.byte 0x09, 0x3f, 0x09, 0x00 |
.byte 0x00, 0x3f, 0x09, 0x00 |
.byte 0x3f, 0x2a, 0x09, 0x00 |
.byte 0x36, 0x2a, 0x09, 0x00 |
.byte 0x2d, 0x2a, 0x09, 0x00 |
.byte 0x24, 0x2a, 0x09, 0x00 |
.byte 0x1b, 0x2a, 0x09, 0x00 |
.byte 0x12, 0x2a, 0x09, 0x00 |
.byte 0x09, 0x2a, 0x09, 0x00 |
.byte 0x00, 0x2a, 0x09, 0x00 |
.byte 0x3f, 0x15, 0x09, 0x00 |
.byte 0x36, 0x15, 0x09, 0x00 |
.byte 0x2d, 0x15, 0x09, 0x00 |
.byte 0x24, 0x15, 0x09, 0x00 |
.byte 0x1b, 0x15, 0x09, 0x00 |
.byte 0x12, 0x15, 0x09, 0x00 |
.byte 0x09, 0x15, 0x09, 0x00 |
.byte 0x00, 0x15, 0x09, 0x00 |
.byte 0x3f, 0x00, 0x09, 0x00 |
.byte 0x36, 0x00, 0x09, 0x00 |
.byte 0x2d, 0x00, 0x09, 0x00 |
.byte 0x24, 0x00, 0x09, 0x00 |
.byte 0x1b, 0x00, 0x09, 0x00 |
.byte 0x12, 0x00, 0x09, 0x00 |
.byte 0x09, 0x00, 0x09, 0x00 |
.byte 0x00, 0x00, 0x09, 0x00 |
.byte 0x3f, 0x3f, 0x00, 0x00 |
.byte 0x36, 0x3f, 0x00, 0x00 |
.byte 0x2d, 0x3f, 0x00, 0x00 |
.byte 0x24, 0x3f, 0x00, 0x00 |
.byte 0x1b, 0x3f, 0x00, 0x00 |
.byte 0x12, 0x3f, 0x00, 0x00 |
.byte 0x09, 0x3f, 0x00, 0x00 |
.byte 0x00, 0x3f, 0x00, 0x00 |
.byte 0x3f, 0x2a, 0x00, 0x00 |
.byte 0x36, 0x2a, 0x00, 0x00 |
.byte 0x2d, 0x2a, 0x00, 0x00 |
.byte 0x24, 0x2a, 0x00, 0x00 |
.byte 0x1b, 0x2a, 0x00, 0x00 |
.byte 0x12, 0x2a, 0x00, 0x00 |
.byte 0x09, 0x2a, 0x00, 0x00 |
.byte 0x00, 0x2a, 0x00, 0x00 |
.byte 0x3f, 0x15, 0x00, 0x00 |
.byte 0x36, 0x15, 0x00, 0x00 |
.byte 0x2d, 0x15, 0x00, 0x00 |
.byte 0x24, 0x15, 0x00, 0x00 |
.byte 0x1b, 0x15, 0x00, 0x00 |
.byte 0x12, 0x15, 0x00, 0x00 |
.byte 0x09, 0x15, 0x00, 0x00 |
.byte 0x00, 0x15, 0x00, 0x00 |
.byte 0x3f, 0x00, 0x00, 0x00 |
.byte 0x36, 0x00, 0x00, 0x00 |
.byte 0x2d, 0x00, 0x00, 0x00 |
.byte 0x24, 0x00, 0x00, 0x00 |
.byte 0x1b, 0x00, 0x00, 0x00 |
.byte 0x12, 0x00, 0x00, 0x00 |
.byte 0x09, 0x00, 0x00, 0x00 |
.byte 0x00, 0x00, 0x00, 0x00 |
/branches/arm/kernel/arch/ia32/src/ia32.c |
---|
1,7 → 1,5 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2009 Jiri Svoboda |
* Copyright (c) 2009 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
40,12 → 38,9 |
#include <arch/pm.h> |
#include <genarch/multiboot/multiboot.h> |
#include <genarch/drivers/legacy/ia32/io.h> |
#include <genarch/drivers/ega/ega.h> |
#include <arch/drivers/ega.h> |
#include <arch/drivers/vesa.h> |
#include <genarch/drivers/i8042/i8042.h> |
#include <genarch/kbrd/kbrd.h> |
#include <genarch/kbd/i8042.h> |
#include <arch/drivers/i8254.h> |
#include <arch/drivers/i8259.h> |
65,30 → 60,12 |
#include <proc/thread.h> |
#include <syscall/syscall.h> |
#include <console/console.h> |
#include <sysinfo/sysinfo.h> |
#include <arch/boot/boot.h> |
#include <ddi/device.h> |
#ifdef CONFIG_SMP |
#include <arch/smp/apic.h> |
#endif |
/** Perform ia32-specific initialization before main_bsp() is called. |
* |
* @param signature Should contain the multiboot signature. |
* @param mi Pointer to the multiboot information structure. |
*/ |
void arch_pre_main(uint32_t signature, const multiboot_info_t *mi) |
{ |
/* Parse multiboot information obtained from the bootloader. */ |
multiboot_info_parse(signature, mi); |
#ifdef CONFIG_SMP |
/* Copy AP bootstrap routines below 1 MB. */ |
memcpy((void *) AP_BOOT_OFFSET, (void *) BOOT_OFFSET, |
(size_t) &_hardcoded_unmapped_size); |
#endif |
} |
void arch_pre_mm_init(void) |
{ |
pm_init(); |
110,17 → 87,13 |
/* hard clock */ |
i8254_init(); |
#ifdef CONFIG_FB |
if (vesa_present()) |
if (vesa_present()) |
vesa_init(); |
else |
#endif |
#ifdef CONFIG_EGA |
ega_init(EGA_BASE, EGA_VIDEORAM); /* video */ |
#else |
{} |
#endif |
ega_init(); /* video */ |
/* Enable debugger */ |
debugger_init(); |
150,33 → 123,10 |
void arch_post_smp_init(void) |
{ |
#ifdef CONFIG_PC_KBD |
/* |
* Initialize the i8042 controller. Then initialize the keyboard |
* module and connect it to i8042. Enable keyboard interrupts. |
*/ |
i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
if (i8042_instance) { |
kbrd_instance_t *kbrd_instance = kbrd_init(); |
if (kbrd_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *kbrd = kbrd_wire(kbrd_instance, sink); |
i8042_wire(i8042_instance, kbrd); |
trap_virtual_enable_irqs(1 << IRQ_KBD); |
} |
} |
/* |
* This is the necessary evil until the userspace driver is entirely |
* self-sufficient. |
*/ |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
sysinfo_set_item_val("kbd.address.physical", NULL, |
(uintptr_t) I8042_BASE); |
sysinfo_set_item_val("kbd.address.kernel", NULL, |
(uintptr_t) I8042_BASE); |
#endif |
devno_t kbd = device_assign_devno(); |
devno_t mouse = device_assign_devno(); |
/* keyboard controller */ |
i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE); |
} |
void calibrate_delay_loop(void) |
209,45 → 159,15 |
*/ |
void arch_grab_console(void) |
{ |
#ifdef CONFIG_FB |
if (vesa_present()) |
vesa_redraw(); |
else |
#endif |
#ifdef CONFIG_EGA |
ega_redraw(); |
#else |
{} |
#endif |
i8042_grab(); |
} |
/** Return console to userspace |
* |
*/ |
void arch_release_console(void) |
{ |
i8042_release(); |
} |
/** Construct function pointer |
* |
* @param fptr function pointer structure |
* @param addr function address |
* @param caller calling function address |
* |
* @return address of the function pointer |
* |
*/ |
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
{ |
return addr; |
} |
void arch_reboot(void) |
{ |
#ifdef CONFIG_PC_KBD |
i8042_cpu_reset((i8042_t *) I8042_BASE); |
#endif |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32/src/ddi/ddi.c |
---|
57,7 → 57,7 |
*/ |
int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size) |
{ |
size_t bits; |
count_t bits; |
bits = ioaddr + size; |
if (bits > IO_PORTS) |
99,7 → 99,7 |
/* |
* Enable the range and we are done. |
*/ |
bitmap_clear_range(&task->arch.iomap, (size_t) ioaddr, (size_t) size); |
bitmap_clear_range(&task->arch.iomap, (index_t) ioaddr, (count_t) size); |
/* |
* Increment I/O Permission bitmap generation counter. |
118,10 → 118,10 |
*/ |
void io_perm_bitmap_install(void) |
{ |
size_t bits; |
count_t bits; |
ptr_16_32_t cpugdtr; |
descriptor_t *gdt_p; |
size_t ver; |
count_t ver; |
/* First, copy the I/O Permission Bitmap. */ |
spinlock_lock(&TASK->lock); |
156,7 → 156,7 |
* type must be changed to describe inactive TSS. |
*/ |
gdt_p[TSS_DES].access = AR_PRESENT | AR_TSS | DPL_KERNEL; |
tr_load(gdtselector(TSS_DES)); |
tr_load(selector(TSS_DES)); |
/* |
* Update the generation count so that faults caused by |
/branches/arm/kernel/arch/ia32/src/proc/scheduler.c |
---|
38,6 → 38,7 |
#include <proc/thread.h> |
#include <arch.h> |
#include <arch/context.h> /* SP_DELTA */ |
#include <arch/debugger.h> |
#include <arch/pm.h> |
#include <arch/asm.h> |
#include <arch/ddi/ddi.h> |
57,18 → 58,21 |
*/ |
void before_thread_runs_arch(void) |
{ |
uintptr_t kstk = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE - |
CPU->arch.tss->esp0 = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE - |
SP_DELTA]; |
/* Set kernel stack for CP3 -> CPL0 switch via SYSENTER */ |
write_msr(IA32_MSR_SYSENTER_ESP, kstk); |
/* Set kernel stack for CPL3 -> CPL0 switch via interrupt */ |
CPU->arch.tss->esp0 = kstk; |
CPU->arch.tss->ss0 = gdtselector(KDATA_DES); |
CPU->arch.tss->ss0 = selector(KDATA_DES); |
/* Set up TLS in GS register */ |
set_tls_desc(THREAD->arch.tls); |
#ifdef CONFIG_DEBUG_AS_WATCHPOINT |
/* Set watchpoint on AS to ensure that nobody sets it to zero */ |
if (CPU->id < BKPOINTS_MAX) { |
the_t *the = THE; |
breakpoint_add(&((the_t *) the->thread->kstack)->as, |
BKPOINT_WRITE | BKPOINT_CHECK_ZERO, the->cpu->id); |
} |
#endif |
} |
void after_thread_ran_arch(void) |
/branches/arm/kernel/arch/ia32/src/interrupt.c |
---|
44,6 → 44,7 |
#include <mm/tlb.h> |
#include <mm/as.h> |
#include <arch.h> |
#include <symtab.h> |
#include <proc/thread.h> |
#include <proc/task.h> |
#include <synch/spinlock.h> |
51,7 → 52,6 |
#include <ipc/sysipc.h> |
#include <interrupt.h> |
#include <ddi/irq.h> |
#include <symtab.h> |
/* |
* Interrupt and exception dispatching. |
63,9 → 63,10 |
void decode_istate(istate_t *istate) |
{ |
char *symbol; |
char *symbol = get_symtab_entry(istate->eip); |
symbol = symtab_fmt_name_lookup(istate->eip); |
if (!symbol) |
symbol = ""; |
if (CPU) |
printf("----------------EXCEPTION OCCURED (cpu%u)----------------\n", CPU->id); |
76,6 → 77,9 |
printf("ERROR_WORD=%#lx\n", istate->error_word); |
printf("%%cs=%#lx,flags=%#lx\n", istate->cs, istate->eflags); |
printf("%%eax=%#lx, %%ecx=%#lx, %%edx=%#lx, %%esp=%p\n", istate->eax, istate->ecx, istate->edx, &istate->stack[0]); |
#ifdef CONFIG_DEBUG_ALLREGS |
printf("%%esi=%#lx, %%edi=%#lx, %%ebp=%#lx, %%ebx=%#lx\n", istate->esi, istate->edi, istate->ebp, istate->ebx); |
#endif |
printf("stack: %#lx, %#lx, %#lx, %#lx\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]); |
printf(" %#lx, %#lx, %#lx, %#lx\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]); |
} |
85,16 → 89,16 |
if (eoi_function) |
eoi_function(); |
else |
panic("No eoi_function."); |
panic("no eoi_function\n"); |
} |
static void null_interrupt(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "Unserviced interrupt: %d.", n); |
fault_if_from_uspace(istate, "unserviced interrupt: %d", n); |
decode_istate(istate); |
panic("Unserviced interrupt: %d.", n); |
panic("unserviced interrupt: %d\n", n); |
} |
/** General Protection Fault. */ |
101,7 → 105,7 |
static void gp_fault(int n __attribute__((unused)), istate_t *istate) |
{ |
if (TASK) { |
size_t ver; |
count_t ver; |
spinlock_lock(&TASK->lock); |
ver = TASK->arch.iomapver; |
118,19 → 122,19 |
io_perm_bitmap_install(); |
return; |
} |
fault_if_from_uspace(istate, "General protection fault."); |
fault_if_from_uspace(istate, "general protection fault"); |
} |
decode_istate(istate); |
panic("General protection fault."); |
panic("general protection fault\n"); |
} |
static void ss_fault(int n __attribute__((unused)), istate_t *istate) |
{ |
fault_if_from_uspace(istate, "Stack fault."); |
fault_if_from_uspace(istate, "stack fault"); |
decode_istate(istate); |
panic("Stack fault."); |
panic("stack fault\n"); |
} |
static void simd_fp_exception(int n __attribute__((unused)), istate_t *istate) |
137,15 → 141,15 |
{ |
uint32_t mxcsr; |
asm ( |
"stmxcsr %[mxcsr]\n" |
: [mxcsr] "=m" (mxcsr) |
"stmxcsr %0;\n" |
: "=m" (mxcsr) |
); |
fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zx.", |
fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zx", |
(unative_t) mxcsr); |
decode_istate(istate); |
printf("MXCSR: %#lx\n", mxcsr); |
panic("SIMD FP exception(19)."); |
panic("SIMD FP exception(19)\n"); |
} |
static void nm_fault(int n __attribute__((unused)), istate_t *istate __attribute__((unused))) |
153,8 → 157,8 |
#ifdef CONFIG_FPU_LAZY |
scheduler_fpu_lazy_request(); |
#else |
fault_if_from_uspace(istate, "FPU fault."); |
panic("FPU fault."); |
fault_if_from_uspace(istate, "fpu fault"); |
panic("fpu fault"); |
#endif |
} |
187,7 → 191,7 |
trap_virtual_eoi(); |
ack = true; |
} |
irq->handler(irq); |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
/* |
229,7 → 233,7 |
if (enable_irqs_function) |
enable_irqs_function(irqmask); |
else |
panic("No enable_irqs_function."); |
panic("no enable_irqs_function\n"); |
} |
void trap_virtual_disable_irqs(uint16_t irqmask) |
237,7 → 241,7 |
if (disable_irqs_function) |
disable_irqs_function(irqmask); |
else |
panic("No disable_irqs_function."); |
panic("no disable_irqs_function\n"); |
} |
/** @} |
/branches/arm/kernel/arch/ia32/src/cpu/cpu.c |
---|
42,23 → 42,22 |
#include <fpu_context.h> |
#include <arch/smp/apic.h> |
#include <arch/syscall.h> |
/* |
* Identification of CPUs. |
* Contains only non-MP-Specification specific SMP code. |
*/ |
#define AMD_CPUID_EBX 0x68747541 |
#define AMD_CPUID_ECX 0x444d4163 |
#define AMD_CPUID_EDX 0x69746e65 |
#define AMD_CPUID_EBX 0x68747541 |
#define AMD_CPUID_ECX 0x444d4163 |
#define AMD_CPUID_EDX 0x69746e65 |
#define INTEL_CPUID_EBX 0x756e6547 |
#define INTEL_CPUID_ECX 0x6c65746e |
#define INTEL_CPUID_EDX 0x49656e69 |
#define INTEL_CPUID_EBX 0x756e6547 |
#define INTEL_CPUID_ECX 0x6c65746e |
#define INTEL_CPUID_EDX 0x49656e69 |
enum vendor { |
VendorUnknown = 0, |
VendorUnknown=0, |
VendorAMD, |
VendorIntel |
}; |
65,17 → 64,19 |
static char *vendor_str[] = { |
"Unknown Vendor", |
"AMD", |
"Intel" |
"AuthenticAMD", |
"GenuineIntel" |
}; |
void fpu_disable(void) |
{ |
asm volatile ( |
"mov %%cr0, %%eax\n" |
"or $8, %%eax\n" |
"mov %%eax, %%cr0\n" |
::: "%eax" |
"mov %%cr0,%%eax;" |
"or $8,%%eax;" |
"mov %%eax,%%cr0;" |
: |
: |
:"%eax" |
); |
} |
82,11 → 83,13 |
void fpu_enable(void) |
{ |
asm volatile ( |
"mov %%cr0, %%eax\n" |
"and $0xffFFffF7, %%eax\n" |
"mov %%eax,%%cr0\n" |
::: "%eax" |
); |
"mov %%cr0,%%eax;" |
"and $0xffFFffF7,%%eax;" |
"mov %%eax,%%cr0;" |
: |
: |
:"%eax" |
); |
} |
void cpu_arch_init(void) |
98,11 → 101,11 |
CPU->arch.tss = tss_p; |
CPU->arch.tss->iomap_base = &CPU->arch.tss->iomap[0] - ((uint8_t *) CPU->arch.tss); |
CPU->fpu_owner = NULL; |
cpuid(1, &info); |
fi.word = info.cpuid_edx; |
efi.word = info.cpuid_ecx; |
109,20 → 112,17 |
if (fi.bits.fxsr) |
fpu_fxsr(); |
else |
fpu_fsr(); |
fpu_fsr(); |
if (fi.bits.sse) { |
asm volatile ( |
"mov %%cr4, %[help]\n" |
"or %[mask], %[help]\n" |
"mov %[help], %%cr4\n" |
: [help] "+r" (help) |
: [mask] "i" (CR4_OSFXSR_MASK | (1 << 10)) |
"mov %%cr4,%0\n" |
"or %1,%0\n" |
"mov %0,%%cr4\n" |
: "+r" (help) |
: "i" (CR4_OSFXSR_MASK|(1<<10)) |
); |
} |
/* Setup fast SYSENTER/SYSEXIT syscalls */ |
syscall_setup_cpu(); |
} |
void cpu_identify(void) |
136,31 → 136,29 |
/* |
* Check for AMD processor. |
*/ |
if ((info.cpuid_ebx == AMD_CPUID_EBX) |
&& (info.cpuid_ecx == AMD_CPUID_ECX) |
&& (info.cpuid_edx == AMD_CPUID_EDX)) |
if (info.cpuid_ebx==AMD_CPUID_EBX && info.cpuid_ecx==AMD_CPUID_ECX && info.cpuid_edx==AMD_CPUID_EDX) { |
CPU->arch.vendor = VendorAMD; |
} |
/* |
* Check for Intel processor. |
*/ |
if ((info.cpuid_ebx == INTEL_CPUID_EBX) |
&& (info.cpuid_ecx == INTEL_CPUID_ECX) |
&& (info.cpuid_edx == INTEL_CPUID_EDX)) |
if (info.cpuid_ebx==INTEL_CPUID_EBX && info.cpuid_ecx==INTEL_CPUID_ECX && info.cpuid_edx==INTEL_CPUID_EDX) { |
CPU->arch.vendor = VendorIntel; |
} |
cpuid(1, &info); |
CPU->arch.family = (info.cpuid_eax >> 8) & 0x0f; |
CPU->arch.model = (info.cpuid_eax >> 4) & 0x0f; |
CPU->arch.stepping = (info.cpuid_eax >> 0) & 0x0f; |
CPU->arch.family = (info.cpuid_eax>>8)&0xf; |
CPU->arch.model = (info.cpuid_eax>>4)&0xf; |
CPU->arch.stepping = (info.cpuid_eax>>0)&0xf; |
} |
} |
void cpu_print_report(cpu_t* cpu) |
void cpu_print_report(cpu_t* m) |
{ |
printf("cpu%u: (%s family=%u model=%u stepping=%u) %" PRIu16 " MHz\n", |
cpu->id, vendor_str[cpu->arch.vendor], cpu->arch.family, |
cpu->arch.model, cpu->arch.stepping, cpu->frequency_mhz); |
printf("cpu%d: (%s family=%d model=%d stepping=%d) %dMHz\n", |
m->id, vendor_str[m->arch.vendor], m->arch.family, m->arch.model, m->arch.stepping, |
m->frequency_mhz); |
} |
/** @} |
/branches/arm/kernel/arch/ia32/src/fpu_context.c |
---|
44,43 → 44,46 |
static void fpu_context_f_save(fpu_context_t *fctx) |
{ |
asm volatile ( |
"fnsave %[fctx]" |
: [fctx] "=m" (*fctx) |
); |
"fnsave %0" |
: "=m"(*fctx) |
); |
} |
static void fpu_context_f_restore(fpu_context_t *fctx) |
{ |
asm volatile ( |
"frstor %[fctx]" |
: [fctx] "=m" (*fctx) |
); |
"frstor %0" |
: "=m"(*fctx) |
); |
} |
static void fpu_context_fx_save(fpu_context_t *fctx) |
{ |
asm volatile ( |
"fxsave %[fctx]" |
: [fctx] "=m" (*fctx) |
); |
"fxsave %0" |
: "=m"(*fctx) |
); |
} |
static void fpu_context_fx_restore(fpu_context_t *fctx) |
{ |
asm volatile ( |
"fxrstor %[fctx]" |
: [fctx] "=m" (*fctx) |
); |
"fxrstor %0" |
: "=m"(*fctx) |
); |
} |
/* Setup using fxsr instruction */ |
/* |
Setup using fxsr instruction |
*/ |
void fpu_fxsr(void) |
{ |
fpu_save=fpu_context_fx_save; |
fpu_restore=fpu_context_fx_restore; |
} |
/* Setup using not fxsr instruction */ |
/* |
Setup using not fxsr instruction |
*/ |
void fpu_fsr(void) |
{ |
fpu_save = fpu_context_f_save; |
99,18 → 102,16 |
void fpu_init() |
{ |
uint32_t help0 = 0; |
uint32_t help1 = 0; |
uint32_t help0 = 0, help1 = 0; |
asm volatile ( |
"fninit\n" |
"stmxcsr %[help0]\n" |
"mov %[help0], %[help1]\n" |
"or %[magic], %[help1]\n" |
"mov %[help1], %[help0]\n" |
"ldmxcsr %[help0]\n" |
: [help0] "+m" (help0), [help1] "+r" (help1) |
: [magic] "i" (0x1f80) |
"fninit;\n" |
"stmxcsr %0\n" |
"mov %0,%1;\n" |
"or %2,%1;\n" |
"mov %1,%0;\n" |
"ldmxcsr %0;\n" |
: "+m" (help0), "+r" (help1) |
: "i" (0x1f80) |
); |
} |
/branches/arm/kernel/arch/ia32/src/atomic.S |
---|
42,7 → 42,9 |
movl 12(%esp),%ebx |
0: |
#ifdef CONFIG_HT |
pause # Pentium 4's with HT love this instruction |
#endif |
movl (%ebx),%eax |
testl %eax,%eax |
jnz 0b # lightweight looping while it is locked |
/branches/arm/kernel/arch/ia32/_link.ld.in |
---|
1,11 → 1,11 |
/** IA-32 linker script |
* |
* |
* umapped section: |
* kernel text |
* kernel data |
* kernel text |
* kernel data |
* mapped section: |
* kernel text |
* kernel data |
* kernel text |
* kernel data |
*/ |
#include <arch/boot/boot.h> |
28,9 → 28,9 |
ktext_end = .; |
kdata_start = .; |
*(.data); /* initialized data */ |
*(.rodata*); /* string literals */ |
*(COMMON); /* global variables */ |
*(.data); /* initialized data */ |
*(.rodata*); /* string literals */ |
*(COMMON); /* global variables */ |
hardcoded_load_address = .; |
LONG(PA2KA(BOOT_OFFSET)); |
hardcoded_ktext_size = .; |
42,23 → 42,23 |
hardcoded_unmapped_kdata_size = .; |
LONG(unmapped_kdata_end - unmapped_kdata_start); |
symbol_table = .; |
*(symtab.*); /* Symbol table, must be LAST symbol! */ |
*(.bss); /* uninitialized static variables */ |
*(symtab.*); /* Symbol table, must be LAST symbol! */ |
*(.bss); /* uninitialized static variables */ |
kdata_end = .; |
} |
/DISCARD/ : { |
*(.note.GNU-stack); |
*(.note.GNU-stack); |
*(.comment); |
} |
#ifdef CONFIG_SMP |
#ifdef CONFIG_SMP |
_hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start); |
ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET; |
ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET; |
protected_ap_gdtr = PA2KA(ap_gdtr); |
#endif /* CONFIG_SMP */ |
} |
/branches/arm/kernel/arch/amd64/include/atomic.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64 |
/** @addtogroup amd64 |
* @{ |
*/ |
/** @file |
41,29 → 41,17 |
static inline void atomic_inc(atomic_t *val) { |
#ifdef CONFIG_SMP |
asm volatile ( |
"lock incq %[count]\n" |
: [count] "+m" (val->count) |
); |
asm volatile ("lock incq %0\n" : "+m" (val->count)); |
#else |
asm volatile ( |
"incq %[count]\n" |
: [count] "+m" (val->count) |
); |
asm volatile ("incq %0\n" : "+m" (val->count)); |
#endif /* CONFIG_SMP */ |
} |
static inline void atomic_dec(atomic_t *val) { |
#ifdef CONFIG_SMP |
asm volatile ( |
"lock decq %[count]\n" |
: [count] "+m" (val->count) |
); |
asm volatile ("lock decq %0\n" : "+m" (val->count)); |
#else |
asm volatile ( |
"decq %[count]\n" |
: [count] "+m" (val->count) |
); |
asm volatile ("decq %0\n" : "+m" (val->count)); |
#endif /* CONFIG_SMP */ |
} |
70,12 → 58,12 |
static inline long atomic_postinc(atomic_t *val) |
{ |
long r = 1; |
asm volatile ( |
"lock xaddq %[r], %[count]\n" |
: [count] "+m" (val->count), [r] "+r" (r) |
"lock xaddq %1, %0\n" |
: "+m" (val->count), "+r" (r) |
); |
return r; |
} |
84,23 → 72,23 |
long r = -1; |
asm volatile ( |
"lock xaddq %[r], %[count]\n" |
: [count] "+m" (val->count), [r] "+r" (r) |
"lock xaddq %1, %0\n" |
: "+m" (val->count), "+r" (r) |
); |
return r; |
} |
#define atomic_preinc(val) (atomic_postinc(val) + 1) |
#define atomic_predec(val) (atomic_postdec(val) - 1) |
#define atomic_preinc(val) (atomic_postinc(val) + 1) |
#define atomic_predec(val) (atomic_postdec(val) - 1) |
static inline uint64_t test_and_set(atomic_t *val) { |
uint64_t v; |
asm volatile ( |
"movq $1, %[v]\n" |
"xchgq %[v], %[count]\n" |
: [v] "=r" (v), [count] "+m" (val->count) |
"movq $1, %0\n" |
"xchgq %0, %1\n" |
: "=r" (v), "+m" (val->count) |
); |
return v; |
111,20 → 99,22 |
static inline void atomic_lock_arch(atomic_t *val) |
{ |
uint64_t tmp; |
preemption_disable(); |
asm volatile ( |
"0:\n" |
#ifdef CONFIG_HT |
"pause\n" |
"mov %[count], %[tmp]\n" |
"testq %[tmp], %[tmp]\n" |
#endif |
"mov %0, %1\n" |
"testq %1, %1\n" |
"jnz 0b\n" /* lightweight looping on locked spinlock */ |
"incq %[tmp]\n" /* now use the atomic operation */ |
"xchgq %[count], %[tmp]\n" |
"testq %[tmp], %[tmp]\n" |
"incq %1\n" /* now use the atomic operation */ |
"xchgq %0, %1\n" |
"testq %1, %1\n" |
"jnz 0b\n" |
: [count] "+m" (val->count), [tmp] "=&r" (tmp) |
: "+m" (val->count), "=&r" (tmp) |
); |
/* |
* Prevent critical section code from bleeding out this way up. |
/branches/arm/kernel/arch/amd64/include/mm/page.h |
---|
112,33 → 112,33 |
#define SET_PTL0_ADDRESS_ARCH(ptl0) \ |
(write_cr3((uintptr_t) (ptl0))) |
#define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \ |
set_pt_addr((pte_t *) (ptl0), (size_t) (i), a) |
set_pt_addr((pte_t *) (ptl0), (index_t) (i), a) |
#define SET_PTL2_ADDRESS_ARCH(ptl1, i, a) \ |
set_pt_addr((pte_t *) (ptl1), (size_t) (i), a) |
set_pt_addr((pte_t *) (ptl1), (index_t) (i), a) |
#define SET_PTL3_ADDRESS_ARCH(ptl2, i, a) \ |
set_pt_addr((pte_t *) (ptl2), (size_t) (i), a) |
set_pt_addr((pte_t *) (ptl2), (index_t) (i), a) |
#define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \ |
set_pt_addr((pte_t *) (ptl3), (size_t) (i), a) |
set_pt_addr((pte_t *) (ptl3), (index_t) (i), a) |
/* Get PTE flags accessors for each level. */ |
#define GET_PTL1_FLAGS_ARCH(ptl0, i) \ |
get_pt_flags((pte_t *) (ptl0), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl0), (index_t) (i)) |
#define GET_PTL2_FLAGS_ARCH(ptl1, i) \ |
get_pt_flags((pte_t *) (ptl1), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl1), (index_t) (i)) |
#define GET_PTL3_FLAGS_ARCH(ptl2, i) \ |
get_pt_flags((pte_t *) (ptl2), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl2), (index_t) (i)) |
#define GET_FRAME_FLAGS_ARCH(ptl3, i) \ |
get_pt_flags((pte_t *) (ptl3), (size_t) (i)) |
get_pt_flags((pte_t *) (ptl3), (index_t) (i)) |
/* Set PTE flags accessors for each level. */ |
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ |
set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x)) |
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) \ |
set_pt_flags((pte_t *) (ptl1), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl1), (index_t) (i), (x)) |
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) \ |
set_pt_flags((pte_t *) (ptl2), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl2), (index_t) (i), (x)) |
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ |
set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x)) |
/* Macros for querying the last-level PTE entries. */ |
#define PTE_VALID_ARCH(p) \ |
176,7 → 176,7 |
*/ |
#define PFERR_CODE_ID (1 << 4) |
static inline int get_pt_flags(pte_t *pt, size_t i) |
static inline int get_pt_flags(pte_t *pt, index_t i) |
{ |
pte_t *p = &pt[i]; |
189,7 → 189,7 |
p->global << PAGE_GLOBAL_SHIFT); |
} |
static inline void set_pt_addr(pte_t *pt, size_t i, uintptr_t a) |
static inline void set_pt_addr(pte_t *pt, index_t i, uintptr_t a) |
{ |
pte_t *p = &pt[i]; |
197,7 → 197,7 |
p->addr_32_51 = a >> 32; |
} |
static inline void set_pt_flags(pte_t *pt, size_t i, int flags) |
static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
{ |
pte_t *p = &pt[i]; |
/branches/arm/kernel/arch/amd64/include/mm/frame.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64mm |
/** @addtogroup amd64mm |
* @{ |
*/ |
/** @file |
39,8 → 39,8 |
#include <arch/types.h> |
#endif /* __ASM__ */ |
#define FRAME_WIDTH 12 /* 4K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#define FRAME_WIDTH 12 /* 4K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#ifndef __ASM__ |
extern uintptr_t last_frame; |
/branches/arm/kernel/arch/amd64/include/mm/tlb.h |
---|
35,6 → 35,9 |
#ifndef KERN_amd64_TLB_H_ |
#define KERN_amd64_TLB_H_ |
#define tlb_arch_init() |
#define tlb_print() |
#endif |
/** @} |
/branches/arm/kernel/arch/amd64/include/types.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64 |
/** @addtogroup amd64 |
* @{ |
*/ |
/** @file |
46,6 → 46,8 |
typedef unsigned long long uint64_t; |
typedef uint64_t size_t; |
typedef uint64_t count_t; |
typedef uint64_t index_t; |
typedef uint64_t uintptr_t; |
typedef uint64_t pfn_t; |
55,12 → 57,11 |
typedef uint64_t unative_t; |
typedef int64_t native_t; |
typedef struct { |
} fncptr_t; |
/**< Formats for uintptr_t, size_t */ |
/**< Formats for uintptr_t, size_t, count_t and index_t */ |
#define PRIp "llx" |
#define PRIs "llu" |
#define PRIc "llu" |
#define PRIi "llu" |
/**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */ |
#define PRId8 "d" |
/branches/arm/kernel/arch/amd64/include/byteorder.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_amd64_BYTEORDER_H_ |
#define KERN_amd64_BYTEORDER_H_ |
/* AMD64 is little-endian */ |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/amd64/include/cpu.h |
---|
35,9 → 35,9 |
#ifndef KERN_amd64_CPU_H_ |
#define KERN_amd64_CPU_H_ |
#define RFLAGS_IF (1 << 9) |
#define RFLAGS_DF (1 << 10) |
#define RFLAGS_RF (1 << 16) |
#define RFLAGS_IF (1 << 9) |
#define RFLAGS_DF (1 << 10) |
#define RFLAGS_RF (1 << 16) |
#define EFER_MSR_NUM 0xc0000080 |
#define AMD_SCE_FLAG 0 |
62,15 → 62,17 |
int family; |
int model; |
int stepping; |
tss_t *tss; |
struct tss *tss; |
size_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ |
count_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ |
} cpu_arch_t; |
struct star_msr { |
}; |
struct lstar_msr { |
}; |
extern void set_efer_flag(int flag); |
/branches/arm/kernel/arch/amd64/include/cpuid.h |
---|
35,15 → 35,14 |
#ifndef KERN_amd64_CPUID_H_ |
#define KERN_amd64_CPUID_H_ |
#define AMD_CPUID_EXTENDED 0x80000001 |
#define AMD_EXT_NOEXECUTE 20 |
#define AMD_EXT_LONG_MODE 29 |
#define AMD_CPUID_EXTENDED 0x80000001 |
#define AMD_EXT_NOEXECUTE 20 |
#define AMD_EXT_LONG_MODE 29 |
#define INTEL_CPUID_LEVEL 0x00000000 |
#define INTEL_CPUID_STANDARD 0x00000001 |
#define INTEL_CPUID_EXTENDED 0x80000000 |
#define INTEL_SSE2 26 |
#define INTEL_FXSAVE 24 |
#define INTEL_CPUID_STANDARD 0x00000001 |
#define INTEL_CPUID_EXTENDED 0x80000000 |
#define INTEL_SSE2 26 |
#define INTEL_FXSAVE 24 |
#ifndef __ASM__ |
/branches/arm/kernel/arch/amd64/include/proc/task.h |
---|
40,7 → 40,7 |
typedef struct { |
/** I/O Permission bitmap Generation counter. */ |
size_t iomapver; |
count_t iomapver; |
/** I/O Permission bitmap. */ |
bitmap_t iomap; |
} task_arch_t; |
/branches/arm/kernel/arch/amd64/include/interrupt.h |
---|
71,6 → 71,7 |
/** This is passed to interrupt handlers */ |
typedef struct { |
uint64_t rax; |
uint64_t rbx; |
uint64_t rcx; |
uint64_t rdx; |
uint64_t rsi; |
79,6 → 80,11 |
uint64_t r9; |
uint64_t r10; |
uint64_t r11; |
uint64_t r12; |
uint64_t r13; |
uint64_t r14; |
uint64_t r15; |
uint64_t rbp; |
uint64_t error_word; |
uint64_t rip; |
uint64_t cs; |
/branches/arm/kernel/arch/amd64/include/asm.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64 |
/** @addtogroup amd64 |
* @{ |
*/ |
/** @file |
36,8 → 36,6 |
#define KERN_amd64_ASM_H_ |
#include <config.h> |
#include <arch/types.h> |
#include <typedefs.h> |
extern void asm_delay_loop(uint32_t t); |
extern void asm_fake_loop(uint32_t t); |
47,17 → 45,12 |
* Return the base address of the current stack. |
* The stack is assumed to be STACK_SIZE bytes long. |
* The stack must start on page boundary. |
* |
*/ |
static inline uintptr_t get_stack_base(void) |
{ |
uintptr_t v; |
asm volatile ( |
"andq %%rsp, %[v]\n" |
: [v] "=r" (v) |
: "0" (~((uint64_t) STACK_SIZE-1)) |
); |
asm volatile ("andq %%rsp, %0\n" : "=r" (v) : "0" (~((uint64_t)STACK_SIZE-1))); |
return v; |
} |
69,11 → 62,7 |
static inline void cpu_halt(void) |
{ |
asm volatile ( |
"0:\n" |
" hlt\n" |
" jmp 0b\n" |
); |
asm volatile ("hlt\n"); |
} |
83,63 → 72,15 |
* |
* @param port Port to read from |
* @return Value read |
* |
*/ |
static inline uint8_t pio_read_8(ioport8_t *port) |
static inline uint8_t inb(uint16_t port) |
{ |
uint8_t val; |
asm volatile ( |
"inb %w[port], %b[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
return val; |
} |
/** Word from port |
* |
* Get word from port |
* |
* @param port Port to read from |
* @return Value read |
* |
*/ |
static inline uint16_t pio_read_16(ioport16_t *port) |
{ |
uint16_t val; |
asm volatile ( |
"inw %w[port], %w[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port)); |
return val; |
} |
/** Double word from port |
* |
* Get double word from port |
* |
* @param port Port to read from |
* @return Value read |
* |
*/ |
static inline uint32_t pio_read_32(ioport32_t *port) |
{ |
uint32_t val; |
asm volatile ( |
"inl %w[port], %[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
return val; |
} |
/** Byte to port |
* |
* Output byte to port |
146,48 → 87,12 |
* |
* @param port Port to write to |
* @param val Value to write |
* |
*/ |
static inline void pio_write_8(ioport8_t *port, uint8_t val) |
static inline void outb(uint16_t port, uint8_t val) |
{ |
asm volatile ( |
"outb %b[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port)); |
} |
/** Word to port |
* |
* Output word to port |
* |
* @param port Port to write to |
* @param val Value to write |
* |
*/ |
static inline void pio_write_16(ioport16_t *port, uint16_t val) |
{ |
asm volatile ( |
"outw %w[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
} |
/** Double word to port |
* |
* Output double word to port |
* |
* @param port Port to write to |
* @param val Value to write |
* |
*/ |
static inline void pio_write_32(ioport32_t *port, uint32_t val) |
{ |
asm volatile ( |
"outl %[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
} |
/** Swap Hidden part of GS register with visible one */ |
static inline void swapgs(void) |
{ |
200,18 → 105,15 |
* value of EFLAGS. |
* |
* @return Old interrupt priority level. |
* |
*/ |
static inline ipl_t interrupts_enable(void) { |
ipl_t v; |
asm volatile ( |
__asm__ volatile ( |
"pushfq\n" |
"popq %[v]\n" |
"popq %0\n" |
"sti\n" |
: [v] "=r" (v) |
: "=r" (v) |
); |
return v; |
} |
221,18 → 123,15 |
* value of EFLAGS. |
* |
* @return Old interrupt priority level. |
* |
*/ |
static inline ipl_t interrupts_disable(void) { |
ipl_t v; |
asm volatile ( |
__asm__ volatile ( |
"pushfq\n" |
"popq %[v]\n" |
"popq %0\n" |
"cli\n" |
: [v] "=r" (v) |
); |
: "=r" (v) |
); |
return v; |
} |
241,14 → 140,13 |
* Restore EFLAGS. |
* |
* @param ipl Saved interrupt priority level. |
* |
*/ |
static inline void interrupts_restore(ipl_t ipl) { |
asm volatile ( |
"pushq %[ipl]\n" |
__asm__ volatile ( |
"pushq %0\n" |
"popfq\n" |
:: [ipl] "r" (ipl) |
); |
: : "r" (ipl) |
); |
} |
/** Return interrupt priority level. |
256,17 → 154,14 |
* Return EFLAFS. |
* |
* @return Current interrupt priority level. |
* |
*/ |
static inline ipl_t interrupts_read(void) { |
ipl_t v; |
asm volatile ( |
__asm__ volatile ( |
"pushfq\n" |
"popq %[v]\n" |
: [v] "=r" (v) |
"popq %0\n" |
: "=r" (v) |
); |
return v; |
} |
273,25 → 168,21 |
/** Write to MSR */ |
static inline void write_msr(uint32_t msr, uint64_t value) |
{ |
asm volatile ( |
"wrmsr\n" |
:: "c" (msr), |
"a" ((uint32_t) (value)), |
"d" ((uint32_t) (value >> 32)) |
); |
__asm__ volatile ( |
"wrmsr;" : : "c" (msr), |
"a" ((uint32_t)(value)), |
"d" ((uint32_t)(value >> 32)) |
); |
} |
static inline unative_t read_msr(uint32_t msr) |
{ |
uint32_t ax, dx; |
asm volatile ( |
"rdmsr\n" |
: "=a" (ax), "=d" (dx) |
: "c" (msr) |
); |
return ((uint64_t) dx << 32) | ax; |
__asm__ volatile ( |
"rdmsr;" : "=a"(ax), "=d"(dx) : "c" (msr) |
); |
return ((uint64_t)dx << 32) | ax; |
} |
298,29 → 189,29 |
/** Enable local APIC |
* |
* Enable local APIC in MSR. |
* |
*/ |
static inline void enable_l_apic_in_msr() |
{ |
asm volatile ( |
__asm__ volatile ( |
"movl $0x1b, %%ecx\n" |
"rdmsr\n" |
"orl $(1 << 11),%%eax\n" |
"orl $(1<<11),%%eax\n" |
"orl $(0xfee00000),%%eax\n" |
"wrmsr\n" |
::: "%eax","%ecx","%edx" |
); |
: |
: |
:"%eax","%ecx","%edx" |
); |
} |
static inline uintptr_t * get_ip() |
{ |
uintptr_t *ip; |
asm volatile ( |
"mov %%rip, %[ip]" |
: [ip] "=r" (ip) |
); |
__asm__ volatile ( |
"mov %%rip, %0" |
: "=r" (ip) |
); |
return ip; |
} |
327,84 → 218,59 |
/** Invalidate TLB Entry. |
* |
* @param addr Address on a page whose TLB entry is to be invalidated. |
* |
*/ |
static inline void invlpg(uintptr_t addr) |
{ |
asm volatile ( |
"invlpg %[addr]\n" |
:: [addr] "m" (*((unative_t *) addr)) |
); |
__asm__ volatile ("invlpg %0\n" :: "m" (*((unative_t *)addr))); |
} |
/** Load GDTR register from memory. |
* |
* @param gdtr_reg Address of memory from where to load GDTR. |
* |
*/ |
static inline void gdtr_load(ptr_16_64_t *gdtr_reg) |
static inline void gdtr_load(struct ptr_16_64 *gdtr_reg) |
{ |
asm volatile ( |
"lgdtq %[gdtr_reg]\n" |
:: [gdtr_reg] "m" (*gdtr_reg) |
); |
__asm__ volatile ("lgdtq %0\n" : : "m" (*gdtr_reg)); |
} |
/** Store GDTR register to memory. |
* |
* @param gdtr_reg Address of memory to where to load GDTR. |
* |
*/ |
static inline void gdtr_store(ptr_16_64_t *gdtr_reg) |
static inline void gdtr_store(struct ptr_16_64 *gdtr_reg) |
{ |
asm volatile ( |
"sgdtq %[gdtr_reg]\n" |
:: [gdtr_reg] "m" (*gdtr_reg) |
); |
__asm__ volatile ("sgdtq %0\n" : : "m" (*gdtr_reg)); |
} |
/** Load IDTR register from memory. |
* |
* @param idtr_reg Address of memory from where to load IDTR. |
* |
*/ |
static inline void idtr_load(ptr_16_64_t *idtr_reg) |
static inline void idtr_load(struct ptr_16_64 *idtr_reg) |
{ |
asm volatile ( |
"lidtq %[idtr_reg]\n" |
:: [idtr_reg] "m" (*idtr_reg)); |
__asm__ volatile ("lidtq %0\n" : : "m" (*idtr_reg)); |
} |
/** Load TR from descriptor table. |
* |
* @param sel Selector specifying descriptor of TSS segment. |
* |
*/ |
static inline void tr_load(uint16_t sel) |
{ |
asm volatile ( |
"ltr %[sel]" |
:: [sel] "r" (sel) |
); |
__asm__ volatile ("ltr %0" : : "r" (sel)); |
} |
#define GEN_READ_REG(reg) static inline unative_t read_ ##reg (void) \ |
{ \ |
unative_t res; \ |
asm volatile ( \ |
"movq %%" #reg ", %[res]" \ |
: [res] "=r" (res) \ |
); \ |
return res; \ |
} |
{ \ |
unative_t res; \ |
__asm__ volatile ("movq %%" #reg ", %0" : "=r" (res) ); \ |
return res; \ |
} |
#define GEN_WRITE_REG(reg) static inline void write_ ##reg (unative_t regn) \ |
{ \ |
asm volatile ( \ |
"movq %[regn], %%" #reg \ |
:: [regn] "r" (regn) \ |
); \ |
} |
{ \ |
__asm__ volatile ("movq %0, %%" #reg : : "r" (regn)); \ |
} |
GEN_READ_REG(cr0) |
GEN_READ_REG(cr2) |
/branches/arm/kernel/arch/amd64/include/pm.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64 |
/** @addtogroup amd64 |
* @{ |
*/ |
/** @file |
36,60 → 36,63 |
#define KERN_amd64_PM_H_ |
#ifndef __ASM__ |
#include <arch/types.h> |
#include <arch/context.h> |
# include <arch/types.h> |
# include <arch/context.h> |
#endif |
#define IDT_ITEMS 64 |
#define GDT_ITEMS 8 |
#define IDT_ITEMS 64 |
#define GDT_ITEMS 8 |
#define NULL_DES 0 |
/* Warning: Do not reorder the following items, unless you look into syscall.c! */ |
#define KTEXT_DES 1 |
#define KDATA_DES 2 |
#define UDATA_DES 3 |
#define UTEXT_DES 4 |
#define KTEXT32_DES 5 |
/* End of warning */ |
#define TSS_DES 6 |
#define NULL_DES 0 |
/* Warning: Do not reorder next items, unless you look into syscall.c!!! */ |
#define KTEXT_DES 1 |
#define KDATA_DES 2 |
#define UDATA_DES 3 |
#define UTEXT_DES 4 |
#define KTEXT32_DES 5 |
/* EndOfWarning */ |
#define TSS_DES 6 |
#ifdef CONFIG_FB |
#define VESA_INIT_DES 8 |
#define VESA_INIT_SEGMENT 0x8000 |
#define VESA_INIT_DES 8 |
#define VESA_INIT_SEGMENT 0x8000 |
#undef GDT_ITEMS |
#define GDT_ITEMS 9 |
#undef GDT_ITEMS |
#define GDT_ITEMS 9 |
#endif /*CONFIG_FB*/ |
#endif /* CONFIG_FB */ |
#define gdtselector(des) ((des) << 3) |
#define idtselector(des) ((des) << 4) |
#define PL_KERNEL 0 |
#define PL_USER 3 |
#define gdtselector(des) ((des) << 3) |
#define idtselector(des) ((des) << 4) |
#define AR_PRESENT ( 1 << 7) |
#define AR_DATA (2 << 3) |
#define AR_CODE (3 << 3) |
#define AR_WRITABLE (1 << 1) |
#define AR_READABLE (1 << 1) |
#define AR_TSS (0x09) |
#define AR_INTERRUPT (0x0e) |
#define AR_TRAP (0x0f) |
#define PL_KERNEL 0 |
#define PL_USER 3 |
#define DPL_KERNEL (PL_KERNEL << 5) |
#define DPL_USER (PL_USER << 5) |
#define AR_PRESENT (1<<7) |
#define AR_DATA (2<<3) |
#define AR_CODE (3<<3) |
#define AR_WRITABLE (1<<1) |
#define AR_READABLE (1<<1) |
#define AR_TSS (0x9) |
#define AR_INTERRUPT (0xe) |
#define AR_TRAP (0xf) |
#define TSS_BASIC_SIZE 104 |
#define TSS_IOMAP_SIZE (16 * 1024 + 1) /* 16K for bitmap + 1 terminating byte for convenience */ |
#define DPL_KERNEL (PL_KERNEL<<5) |
#define DPL_USER (PL_USER<<5) |
#define IO_PORTS (64 * 1024) |
#define TSS_BASIC_SIZE 104 |
#define TSS_IOMAP_SIZE (16*1024+1) /* 16K for bitmap + 1 terminating byte for convenience */ |
#define IO_PORTS (64*1024) |
#ifndef __ASM__ |
typedef struct { |
struct descriptor { |
unsigned limit_0_15: 16; |
unsigned base_0_15: 16; |
unsigned base_16_23: 8; |
100,9 → 103,10 |
unsigned special: 1; |
unsigned granularity : 1; |
unsigned base_24_31: 8; |
} __attribute__ ((packed)) descriptor_t; |
} __attribute__ ((packed)); |
typedef struct descriptor descriptor_t; |
typedef struct { |
struct tss_descriptor { |
unsigned limit_0_15: 16; |
unsigned base_0_15: 16; |
unsigned base_16_23: 8; |
117,9 → 121,10 |
unsigned base_24_31: 8; |
unsigned base_32_63 : 32; |
unsigned : 32; |
} __attribute__ ((packed)) tss_descriptor_t; |
} __attribute__ ((packed)); |
typedef struct tss_descriptor tss_descriptor_t; |
typedef struct { |
struct idescriptor { |
unsigned offset_0_15: 16; |
unsigned selector: 16; |
unsigned ist:3; |
130,19 → 135,22 |
unsigned offset_16_31: 16; |
unsigned offset_32_63: 32; |
unsigned : 32; |
} __attribute__ ((packed)) idescriptor_t; |
} __attribute__ ((packed)); |
typedef struct idescriptor idescriptor_t; |
typedef struct { |
struct ptr_16_64 { |
uint16_t limit; |
uint64_t base; |
} __attribute__ ((packed)) ptr_16_64_t; |
} __attribute__ ((packed)); |
typedef struct ptr_16_64 ptr_16_64_t; |
typedef struct { |
struct ptr_16_32 { |
uint16_t limit; |
uint32_t base; |
} __attribute__ ((packed)) ptr_16_32_t; |
} __attribute__ ((packed)); |
typedef struct ptr_16_32 ptr_16_32_t; |
typedef struct { |
struct tss { |
uint32_t reserve1; |
uint64_t rsp0; |
uint64_t rsp1; |
159,7 → 167,8 |
uint16_t reserve4; |
uint16_t iomap_base; |
uint8_t iomap[TSS_IOMAP_SIZE]; |
} __attribute__ ((packed)) tss_t; |
} __attribute__ ((packed)); |
typedef struct tss tss_t; |
extern tss_t *tss_p; |
/branches/arm/kernel/arch/amd64/include/syscall.h |
---|
35,6 → 35,8 |
#ifndef KERN_amd64_SYSCALL_H_ |
#define KERN_amd64_SYSCALL_H_ |
#include <arch/types.h> |
extern void syscall_setup_cpu(void); |
#endif |
/branches/arm/kernel/arch/amd64/include/boot/boot.h |
---|
42,17 → 42,8 |
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002 |
#define MULTIBOOT_HEADER_FLAGS 0x00010003 |
#ifndef __ASM__ |
#define MULTIBOOT_LOADER_MAGIC 0x2BADB002 |
#ifdef CONFIG_SMP |
/* This is only a symbol so the type is dummy. Obtain the value using &. */ |
extern int _hardcoded_unmapped_size; |
#endif /* CONFIG_SMP */ |
#endif /* __ASM__ */ |
#endif |
/** @} |
/branches/arm/kernel/arch/amd64/include/arch.h |
---|
35,10 → 35,6 |
#ifndef KERN_amd64_ARCH_H_ |
#define KERN_amd64_ARCH_H_ |
#include <genarch/multiboot/multiboot.h> |
extern void arch_pre_main(uint32_t, const multiboot_info_t *); |
#endif |
/** @} |
/branches/arm/kernel/arch/amd64/include/drivers |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/kernel/arch/amd64/include/drivers/vesa.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2006-2006 Jakub Vana |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_amd64_VESA_H_ |
#define KERN_amd64_VESA_H_ |
int vesa_present(void); |
void vesa_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/amd64/include/drivers/i8254.h |
---|
0,0 → 1,0 |
link ../../../ia32/include/drivers/i8254.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/amd64/include/drivers/i8259.h |
---|
0,0 → 1,0 |
link ../../../ia32/include/drivers/i8259.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/amd64/include/drivers/ega.h |
---|
0,0 → 1,0 |
link ../../../ia32/include/drivers/ega.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/amd64/include/drivers/i8042.h |
---|
0,0 → 1,0 |
link ../../../ia32/include/drivers/i8042.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/amd64/Makefile.inc |
---|
29,6 → 29,10 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf64-x86-64 |
BFD_ARCH = i386:x86-64 |
BFD = binary |
41,51 → 45,83 |
ICC_CFLAGS += $(CMN1) |
SUNCC_CFLAGS += -m64 -xmodel=kernel |
BITS = 64 |
ENDIANESS = LE |
DEFS += -DMACHINE=$(MACHINE) -D__64_BITS__ |
## Accepted CPUs |
# |
ifeq ($(PROCESSOR),opteron) |
ifeq ($(MACHINE),opteron) |
CMN2 := -march=opteron |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += -xtarget=opteron |
DEFS += -DFENCES=p4 |
endif |
## Own configuration directives |
# |
CONFIG_ACPI = y |
## Compile with hierarchical page tables support. |
# |
CONFIG_PAGE_PT = y |
DEFS += -DCONFIG_PAGE_PT |
## Compile with i8042 support. |
# |
CONFIG_I8042 = y |
DEFS += -DCONFIG_I8042 |
## Accepted configuration directives |
# |
ifeq ($(CONFIG_SMP),y) |
DEFS += -DCONFIG_SMP |
endif |
ifeq ($(CONFIG_HT),y) |
DEFS += -DCONFIG_HT |
endif |
ifeq ($(CONFIG_SIMICS_FIX),y) |
DEFS += -DCONFIG_SIMICS_FIX |
endif |
ARCH_SOURCES = \ |
arch/$(KARCH)/src/fpu_context.c \ |
arch/$(KARCH)/src/boot/boot.S \ |
arch/$(KARCH)/src/boot/memmap.c \ |
arch/$(KARCH)/src/pm.c \ |
arch/$(KARCH)/src/context.S \ |
arch/$(KARCH)/src/ddi/ddi.c \ |
arch/$(KARCH)/src/drivers/vesa.c \ |
arch/$(KARCH)/src/drivers/i8254.c \ |
arch/$(KARCH)/src/drivers/i8259.c \ |
arch/$(KARCH)/src/delay.S \ |
arch/$(KARCH)/src/amd64.c \ |
arch/$(KARCH)/src/bios/bios.c \ |
arch/$(KARCH)/src/interrupt.c \ |
arch/$(KARCH)/src/mm/as.c \ |
arch/$(KARCH)/src/mm/frame.c \ |
arch/$(KARCH)/src/mm/page.c \ |
arch/$(KARCH)/src/mm/tlb.c \ |
arch/$(KARCH)/src/asm_utils.S \ |
arch/$(KARCH)/src/cpu/cpu.c \ |
arch/$(KARCH)/src/proc/scheduler.c \ |
arch/$(KARCH)/src/proc/task.c \ |
arch/$(KARCH)/src/proc/thread.c \ |
arch/$(KARCH)/src/userspace.c \ |
arch/$(KARCH)/src/syscall.c \ |
arch/$(KARCH)/src/debugger.c |
arch/$(ARCH)/src/fpu_context.c \ |
arch/$(ARCH)/src/boot/boot.S \ |
arch/$(ARCH)/src/boot/memmap.c \ |
arch/$(ARCH)/src/pm.c \ |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/drivers/ega.c \ |
arch/$(ARCH)/src/drivers/vesa.c \ |
arch/$(ARCH)/src/drivers/i8254.c \ |
arch/$(ARCH)/src/drivers/i8259.c \ |
arch/$(ARCH)/src/delay.S \ |
arch/$(ARCH)/src/amd64.c \ |
arch/$(ARCH)/src/bios/bios.c \ |
arch/$(ARCH)/src/interrupt.c \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/asm_utils.S \ |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/proc/scheduler.c \ |
arch/$(ARCH)/src/proc/task.c \ |
arch/$(ARCH)/src/proc/thread.c \ |
arch/$(ARCH)/src/userspace.c \ |
arch/$(ARCH)/src/syscall.c \ |
arch/$(ARCH)/src/debugger.c |
ifeq ($(CONFIG_SMP),y) |
ARCH_SOURCES += \ |
arch/$(KARCH)/src/smp/ap.S \ |
arch/$(KARCH)/src/smp/apic.c \ |
arch/$(KARCH)/src/smp/ipi.c \ |
arch/$(KARCH)/src/smp/mps.c \ |
arch/$(KARCH)/src/smp/smp.c |
arch/$(ARCH)/src/smp/ap.S \ |
arch/$(ARCH)/src/smp/apic.c \ |
arch/$(ARCH)/src/smp/ipi.c \ |
arch/$(ARCH)/src/smp/mps.c \ |
arch/$(ARCH)/src/smp/smp.c |
endif |
/branches/arm/kernel/arch/amd64/src/asm_utils.S |
---|
26,17 → 26,23 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#define IREGISTER_SPACE 72 |
#define IREGISTER_SPACE 120 |
#define IOFFSET_RAX 0x0 |
#define IOFFSET_RCX 0x8 |
#define IOFFSET_RDX 0x10 |
#define IOFFSET_RSI 0x18 |
#define IOFFSET_RDI 0x20 |
#define IOFFSET_R8 0x28 |
#define IOFFSET_R9 0x30 |
#define IOFFSET_R10 0x38 |
#define IOFFSET_R11 0x40 |
#define IOFFSET_RAX 0x0 |
#define IOFFSET_RBX 0x8 |
#define IOFFSET_RCX 0x10 |
#define IOFFSET_RDX 0x18 |
#define IOFFSET_RSI 0x20 |
#define IOFFSET_RDI 0x28 |
#define IOFFSET_R8 0x30 |
#define IOFFSET_R9 0x38 |
#define IOFFSET_R10 0x40 |
#define IOFFSET_R11 0x48 |
#define IOFFSET_R12 0x50 |
#define IOFFSET_R13 0x58 |
#define IOFFSET_R14 0x60 |
#define IOFFSET_R15 0x68 |
#define IOFFSET_RBP 0x70 |
# Mask for interrupts 0 - 31 (bits 0 - 31) where 0 means that int has no error word |
# and 1 means interrupt with error word |
167,7 → 173,7 |
rdmsr |
ret |
# Push all volatile general purpose registers on stack |
# Push all general purpose registers on stack except %rbp, %rsp |
.macro save_all_gpr |
movq %rax, IOFFSET_RAX(%rsp) |
movq %rcx, IOFFSET_RCX(%rsp) |
178,6 → 184,14 |
movq %r9, IOFFSET_R9(%rsp) |
movq %r10, IOFFSET_R10(%rsp) |
movq %r11, IOFFSET_R11(%rsp) |
#ifdef CONFIG_DEBUG_ALLREGS |
movq %rbx, IOFFSET_RBX(%rsp) |
movq %rbp, IOFFSET_RBP(%rsp) |
movq %r12, IOFFSET_R12(%rsp) |
movq %r13, IOFFSET_R13(%rsp) |
movq %r14, IOFFSET_R14(%rsp) |
movq %r15, IOFFSET_R15(%rsp) |
#endif |
.endm |
.macro restore_all_gpr |
190,9 → 204,21 |
movq IOFFSET_R9(%rsp), %r9 |
movq IOFFSET_R10(%rsp), %r10 |
movq IOFFSET_R11(%rsp), %r11 |
#ifdef CONFIG_DEBUG_ALLREGS |
movq IOFFSET_RBX(%rsp), %rbx |
movq IOFFSET_RBP(%rsp), %rbp |
movq IOFFSET_R12(%rsp), %r12 |
movq IOFFSET_R13(%rsp), %r13 |
movq IOFFSET_R14(%rsp), %r14 |
movq IOFFSET_R15(%rsp), %r15 |
#endif |
.endm |
#define INTERRUPT_ALIGN 128 |
#ifdef CONFIG_DEBUG_ALLREGS |
# define INTERRUPT_ALIGN 256 |
#else |
# define INTERRUPT_ALIGN 128 |
#endif |
## Declare interrupt handlers |
# |
/branches/arm/kernel/arch/amd64/src/userspace.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64 |
/** @addtogroup amd64 |
* @{ |
*/ |
/** @file |
47,33 → 47,36 |
*/ |
void userspace(uspace_arg_t *kernel_uarg) |
{ |
ipl_t ipl = interrupts_disable(); |
ipl_t ipl; |
/* Clear CF, PF, AF, ZF, SF, DF, OF */ |
ipl = interrupts_disable(); |
/* Clear CF,PF,AF,ZF,SF,DF,OF */ |
ipl &= ~(0xcd4); |
asm volatile ("" |
"pushq %0\n" |
"pushq %1\n" |
"pushq %2\n" |
"pushq %3\n" |
"pushq %4\n" |
"movq %5, %%rax\n" |
/* %rdi is defined to hold pcb_ptr - set it to 0 */ |
"xorq %%rdi, %%rdi\n" |
"iretq\n" |
: : |
"i" (gdtselector(UDATA_DES) | PL_USER), |
"r" (kernel_uarg->uspace_stack+THREAD_STACK_SIZE), |
"r" (ipl), |
"i" (gdtselector(UTEXT_DES) | PL_USER), |
"r" (kernel_uarg->uspace_entry), |
"r" (kernel_uarg->uspace_uarg) |
: "rax" |
); |
asm volatile ( |
"pushq %[udata_des]\n" |
"pushq %[stack_size]\n" |
"pushq %[ipl]\n" |
"pushq %[utext_des]\n" |
"pushq %[entry]\n" |
"movq %[uarg], %%rax\n" |
/* %rdi is defined to hold pcb_ptr - set it to 0 */ |
"xorq %%rdi, %%rdi\n" |
"iretq\n" |
:: [udata_des] "i" (gdtselector(UDATA_DES) | PL_USER), |
[stack_size] "r" (kernel_uarg->uspace_stack + THREAD_STACK_SIZE), |
[ipl] "r" (ipl), |
[utext_des] "i" (gdtselector(UTEXT_DES) | PL_USER), |
[entry] "r" (kernel_uarg->uspace_entry), |
[uarg] "r" (kernel_uarg->uspace_uarg) |
: "rax" |
); |
/* Unreachable */ |
while (1); |
for(;;) |
; |
} |
/** @} |
/branches/arm/kernel/arch/amd64/src/debugger.c |
---|
35,6 → 35,7 |
#include <arch/debugger.h> |
#include <console/kconsole.h> |
#include <console/cmd.h> |
#include <symtab.h> |
#include <print.h> |
#include <panic.h> |
#include <interrupt.h> |
43,7 → 44,6 |
#include <debug.h> |
#include <func.h> |
#include <smp/ipi.h> |
#include <symtab.h> |
typedef struct { |
uintptr_t address; /**< Breakpoint address */ |
54,8 → 54,6 |
static bpinfo_t breakpoints[BKPOINTS_MAX]; |
SPINLOCK_INITIALIZE(bkpoint_lock); |
#ifdef CONFIG_KCONSOLE |
static int cmd_print_breakpoints(cmd_arg_t *argv); |
static cmd_info_t bkpts_info = { |
.name = "bkpts", |
64,6 → 62,8 |
.argc = 0, |
}; |
#ifndef CONFIG_DEBUG_AS_WATCHPOINT |
static int cmd_del_breakpoint(cmd_arg_t *argv); |
static cmd_arg_t del_argv = { |
.type = ARG_TYPE_INT |
99,8 → 99,44 |
.argv = &addw_argv |
}; |
#endif /* CONFIG_KCONSOLE */ |
#endif |
/** Print table of active breakpoints */ |
int cmd_print_breakpoints(cmd_arg_t *argv __attribute__((unused))) |
{ |
unsigned int i; |
char *symbol; |
#ifdef __32_BITS__ |
printf("# Count Address In symbol\n"); |
printf("-- ----- ---------- ---------\n"); |
#endif |
#ifdef __64_BITS__ |
printf("# Count Address In symbol\n"); |
printf("-- ----- ------------------ ---------\n"); |
#endif |
for (i = 0; i < BKPOINTS_MAX; i++) |
if (breakpoints[i].address) { |
symbol = get_symtab_entry(breakpoints[i].address); |
#ifdef __32_BITS__ |
printf("%-2u %-5d %#10zx %s\n", i, |
breakpoints[i].counter, breakpoints[i].address, |
symbol); |
#endif |
#ifdef __64_BITS__ |
printf("%-2u %-5d %#18zx %s\n", i, |
breakpoints[i].counter, breakpoints[i].address, |
symbol); |
#endif |
} |
return 1; |
} |
/* Setup DR register according to table */ |
static void setup_dr(int curidx) |
{ |
201,16 → 237,16 |
/* Send IPI */ |
#ifdef CONFIG_SMP |
// ipi_broadcast(VECTOR_DEBUG_IPI); |
// ipi_broadcast(VECTOR_DEBUG_IPI); |
#endif |
return curidx; |
} |
#ifdef __64_BITS__ |
#define getip(x) ((x)->rip) |
#ifdef amd64 |
# define getip(x) ((x)->rip) |
#else |
#define getip(x) ((x)->eip) |
# define getip(x) ((x)->eip) |
#endif |
static void handle_exception(int slot, istate_t *istate) |
229,15 → 265,12 |
*((unative_t *) breakpoints[slot].address)); |
} |
} |
printf("Reached breakpoint %d:%lx (%s)\n", slot, getip(istate), |
symtab_fmt_name_lookup(getip(istate))); |
#ifdef CONFIG_KCONSOLE |
atomic_set(&haltstate, 1); |
kconsole("debug", "Debug console ready.\n", false); |
atomic_set(&haltstate, 0); |
#endif |
printf("Reached breakpoint %d:%lx(%s)\n", slot, getip(istate), |
get_symtab_entry(getip(istate))); |
printf("***Type 'exit' to exit kconsole.\n"); |
atomic_set(&haltstate,1); |
kconsole((void *) "debug"); |
atomic_set(&haltstate,0); |
} |
void breakpoint_del(int slot) |
266,8 → 299,42 |
#endif |
} |
#ifndef CONFIG_DEBUG_AS_WATCHPOINT |
/** Remove breakpoint from table */ |
int cmd_del_breakpoint(cmd_arg_t *argv) |
{ |
unative_t bpno = argv->intval; |
if (bpno > BKPOINTS_MAX) { |
printf("Invalid breakpoint number.\n"); |
return 0; |
} |
breakpoint_del(argv->intval); |
return 1; |
} |
/** Add new breakpoint to table */ |
static int cmd_add_breakpoint(cmd_arg_t *argv) |
{ |
int flags; |
int id; |
if (argv == &add_argv) { |
flags = BKPOINT_INSTR; |
} else { /* addwatchp */ |
flags = BKPOINT_WRITE; |
} |
printf("Adding breakpoint on address: %p\n", argv->intval); |
id = breakpoint_add((void *)argv->intval, flags, -1); |
if (id < 0) |
printf("Add breakpoint failed.\n"); |
else |
printf("Added breakpoint %d.\n", id); |
return 1; |
} |
#endif |
static void debug_exception(int n __attribute__((unused)), istate_t *istate) |
{ |
unative_t dr6; |
274,7 → 341,7 |
int i; |
/* Set RF to restart the instruction */ |
#ifdef __64_BITS__ |
#ifdef amd64 |
istate->rflags |= RFLAGS_RF; |
#else |
istate->eflags |= EFLAGS_RF; |
312,24 → 379,24 |
for (i = 0; i < BKPOINTS_MAX; i++) |
breakpoints[i].address = NULL; |
#ifdef CONFIG_KCONSOLE |
cmd_initialize(&bkpts_info); |
if (!cmd_register(&bkpts_info)) |
printf("Cannot register command %s\n", bkpts_info.name); |
panic("could not register command %s\n", bkpts_info.name); |
#ifndef CONFIG_DEBUG_AS_WATCHPOINT |
cmd_initialize(&delbkpt_info); |
if (!cmd_register(&delbkpt_info)) |
printf("Cannot register command %s\n", delbkpt_info.name); |
panic("could not register command %s\n", delbkpt_info.name); |
cmd_initialize(&addbkpt_info); |
if (!cmd_register(&addbkpt_info)) |
printf("Cannot register command %s\n", addbkpt_info.name); |
panic("could not register command %s\n", addbkpt_info.name); |
cmd_initialize(&addwatchp_info); |
if (!cmd_register(&addwatchp_info)) |
printf("Cannot register command %s\n", addwatchp_info.name); |
#endif /* CONFIG_KCONSOLE */ |
panic("could not register command %s\n", addwatchp_info.name); |
#endif |
exc_register(VECTOR_DEBUG, "debugger", debug_exception); |
#ifdef CONFIG_SMP |
337,77 → 404,5 |
#endif |
} |
#ifdef CONFIG_KCONSOLE |
/** Print table of active breakpoints */ |
int cmd_print_breakpoints(cmd_arg_t *argv __attribute__((unused))) |
{ |
unsigned int i; |
char *symbol; |
#ifdef __32_BITS__ |
printf("# Count Address In symbol\n"); |
printf("-- ----- ---------- ---------\n"); |
#endif |
#ifdef __64_BITS__ |
printf("# Count Address In symbol\n"); |
printf("-- ----- ------------------ ---------\n"); |
#endif |
for (i = 0; i < BKPOINTS_MAX; i++) |
if (breakpoints[i].address) { |
symbol = symtab_fmt_name_lookup( |
breakpoints[i].address); |
#ifdef __32_BITS__ |
printf("%-2u %-5d %#10zx %s\n", i, |
breakpoints[i].counter, breakpoints[i].address, |
symbol); |
#endif |
#ifdef __64_BITS__ |
printf("%-2u %-5d %#18zx %s\n", i, |
breakpoints[i].counter, breakpoints[i].address, |
symbol); |
#endif |
} |
return 1; |
} |
/** Remove breakpoint from table */ |
int cmd_del_breakpoint(cmd_arg_t *argv) |
{ |
unative_t bpno = argv->intval; |
if (bpno > BKPOINTS_MAX) { |
printf("Invalid breakpoint number.\n"); |
return 0; |
} |
breakpoint_del(argv->intval); |
return 1; |
} |
/** Add new breakpoint to table */ |
static int cmd_add_breakpoint(cmd_arg_t *argv) |
{ |
int flags; |
int id; |
if (argv == &add_argv) { |
flags = BKPOINT_INSTR; |
} else { /* addwatchp */ |
flags = BKPOINT_WRITE; |
} |
printf("Adding breakpoint on address: %p\n", argv->intval); |
id = breakpoint_add((void *)argv->intval, flags, -1); |
if (id < 0) |
printf("Add breakpoint failed.\n"); |
else |
printf("Added breakpoint %d.\n", id); |
return 1; |
} |
#endif /* CONFIG_KCONSOLE */ |
/** @} |
*/ |
/branches/arm/kernel/arch/amd64/src/pm.c |
---|
137,8 → 137,8 |
void gdt_tss_setlimit(descriptor_t *d, uint32_t limit) |
{ |
tss_descriptor_t *td = (tss_descriptor_t *) d; |
struct tss_descriptor *td = (tss_descriptor_t *) d; |
td->limit_0_15 = limit & 0xffff; |
td->limit_16_19 = (limit >> 16) & 0xf; |
} |
185,14 → 185,14 |
*/ |
void pm_init(void) |
{ |
descriptor_t *gdt_p = (descriptor_t *) gdtr.base; |
descriptor_t *gdt_p = (struct descriptor *) gdtr.base; |
tss_descriptor_t *tss_desc; |
/* |
* Each CPU has its private GDT and TSS. |
* All CPUs share one IDT. |
*/ |
if (config.cpu_active == 1) { |
idt_init(); |
/* |
200,19 → 200,20 |
* the heap hasn't been initialized so far. |
*/ |
tss_p = &tss; |
} else { |
} |
else { |
/* We are going to use malloc, which may return |
* non boot-mapped pointer, initialize the CR3 register |
* ahead of page_init */ |
write_cr3((uintptr_t) AS_KERNEL->genarch.page_table); |
tss_p = (tss_t *) malloc(sizeof(tss_t), FRAME_ATOMIC); |
tss_p = (struct tss *) malloc(sizeof(tss_t), FRAME_ATOMIC); |
if (!tss_p) |
panic("Cannot allocate TSS."); |
panic("could not allocate TSS\n"); |
} |
tss_initialize(tss_p); |
tss_desc = (tss_descriptor_t *) (&gdt_p[TSS_DES]); |
tss_desc->present = 1; |
tss_desc->type = AR_TSS; |
220,7 → 221,7 |
gdt_tss_setbase(&gdt_p[TSS_DES], (uintptr_t) tss_p); |
gdt_tss_setlimit(&gdt_p[TSS_DES], TSS_BASIC_SIZE - 1); |
gdtr_load(&gdtr); |
idtr_load(&idtr); |
/* |
230,5 → 231,24 |
tr_load(gdtselector(TSS_DES)); |
} |
/* Reboot the machine by initiating |
* a triple fault |
*/ |
void arch_reboot(void) |
{ |
preemption_disable(); |
ipl_t ipl = interrupts_disable(); |
memsetb(idt, sizeof(idt), 0); |
idtr_load(&idtr); |
interrupts_restore(ipl); |
asm volatile ( |
"int $0x03\n" |
"cli\n" |
"hlt\n" |
); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/amd64/src/proc/scheduler.c |
---|
39,6 → 39,7 |
#include <arch.h> |
#include <arch/context.h> /* SP_DELTA */ |
#include <arch/asm.h> |
#include <arch/debugger.h> |
#include <print.h> |
#include <arch/pm.h> |
#include <arch/ddi/ddi.h> |
67,6 → 68,13 |
/* TLS support - set FS to thread local storage */ |
write_msr(AMD_MSR_FS, THREAD->arch.tls); |
#ifdef CONFIG_DEBUG_AS_WATCHPOINT |
/* Set watchpoint on AS to ensure that nobody sets it to zero */ |
if (CPU->id < BKPOINTS_MAX) |
breakpoint_add(&((the_t *) THREAD->kstack)->as, |
BKPOINT_WRITE | BKPOINT_CHECK_ZERO, CPU->id); |
#endif |
} |
void after_thread_ran_arch(void) |
/branches/arm/kernel/arch/amd64/src/boot/vesa_prot.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/kernel/arch/amd64/src/boot/vesa_real.inc |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/kernel/arch/amd64/src/boot/vesa_ret.inc |
---|
File deleted |
/branches/arm/kernel/arch/amd64/src/boot/boot.S |
---|
1,4 → 1,4 |
# |
# Copyright (c) 2005 Ondrej Palkovsky |
# Copyright (c) 2006 Martin Decky |
# Copyright (c) 2008 Jakub Jermar |
37,7 → 37,7 |
#include <arch/cpuid.h> |
#define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) |
.section K_TEXT_START, "ax" |
.code32 |
46,7 → 46,7 |
multiboot_header: |
.long MULTIBOOT_HEADER_MAGIC |
.long MULTIBOOT_HEADER_FLAGS |
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) # checksum |
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) # checksum |
.long multiboot_header |
.long unmapped_ktext_start |
.long 0 |
55,19 → 55,15 |
multiboot_image_start: |
cld |
movl $START_STACK, %esp # initialize stack pointer |
lgdtl bootstrap_gdtr # initialize Global Descriptor Table register |
movl $START_STACK, %esp # initialize stack pointer |
lgdtl bootstrap_gdtr # initialize Global Descriptor Table register |
movw $gdtselector(KDATA_DES), %cx |
movw %cx, %es |
movw %cx, %ds # kernel data + stack |
movw %cx, %ds # kernel data + stack |
movw %cx, %ss |
# |
# Simics seems to remove hidden part of GS on entering user mode |
# when _visible_ part of GS does not point to user-mode segment. |
# |
# when _visible_ part of GS does not point to user-mode segment |
movw $gdtselector(UDATA_DES), %cx |
movw %cx, %fs |
movw %cx, %gs |
75,19 → 71,17 |
jmpl $gdtselector(KTEXT32_DES), $multiboot_meeting_point |
multiboot_meeting_point: |
movl %eax, grub_eax # save parameters from GRUB |
movl %eax, grub_eax # save parameters from GRUB |
movl %ebx, grub_ebx |
# |
# Protected 32-bit. We want to reuse the code-seg descriptor, |
# the Default operand size must not be 1 when entering long mode. |
# |
# the Default operand size must not be 1 when entering long mode |
movl $(INTEL_CPUID_EXTENDED), %eax |
cpuid |
cmp $(INTEL_CPUID_EXTENDED), %eax |
movl $(INTEL_CPUID_EXTENDED), %eax |
cpuid |
cmp $(INTEL_CPUID_EXTENDED), %eax |
ja extended_cpuid_supported |
movl $extended_cpuid_msg, %esi |
jmp error_halt |
96,11 → 90,11 |
movl $(AMD_CPUID_EXTENDED), %eax |
cpuid |
bt $(AMD_EXT_LONG_MODE), %edx |
jc long_mode_supported |
jc long_mode_supported |
movl $long_mode_msg, %esi |
jmp error_halt |
long_mode_supported: |
bt $(AMD_EXT_NOEXECUTE), %edx |
114,7 → 108,7 |
movl $(INTEL_CPUID_STANDARD), %eax |
cpuid |
bt $(INTEL_FXSAVE), %edx |
jc fx_supported |
jc fx_supported |
movl $fx_msg, %esi |
jmp error_halt |
122,43 → 116,59 |
fx_supported: |
bt $(INTEL_SSE2), %edx |
jc sse2_supported |
jc sse2_supported |
movl $sse2_msg, %esi |
jmp error_halt |
sse2_supported: |
#ifdef CONFIG_FB |
mov $vesa_init, %esi |
mov $VESA_INIT_SEGMENT << 4, %edi |
mov $e_vesa_init - vesa_init, %ecx |
rep movsb |
#include "vesa_prot.inc" |
# |
mov $VESA_INIT_SEGMENT << 4, %edi |
jmpl *%edi |
vesa_meeting_point: |
mov %esi, KA2PA(vesa_ph_addr) |
mov %di, KA2PA(vesa_height) |
shr $16, %edi |
mov %di, KA2PA(vesa_width) |
mov %bx, KA2PA(vesa_scanline) |
shr $16, %ebx |
mov %bx, KA2PA(vesa_bpp) |
#endif |
# Enable 64-bit page translation entries - CR4.PAE = 1. |
# Paging is not enabled until after long mode is enabled. |
# |
# Paging is not enabled until after long mode is enabled |
movl %cr4, %eax |
btsl $5, %eax |
movl %eax, %cr4 |
# Set up paging tables |
# set up paging tables |
leal ptl_0, %eax |
movl %eax, %cr3 |
# enable long mode |
# Enable long mode |
movl $EFER_MSR_NUM, %ecx # EFER MSR number |
rdmsr # read EFER |
btsl $AMD_LME_FLAG, %eax # set LME = 1 |
wrmsr # write EFER |
movl $EFER_MSR_NUM, %ecx # EFER MSR number |
rdmsr # Read EFER |
btsl $AMD_LME_FLAG, %eax # Set LME = 1 |
wrmsr # Write EFER |
# enable paging to activate long mode (set CR0.PG = 1) |
# Enable paging to activate long mode (set CR0.PG = 1) |
movl %cr0, %eax |
btsl $31, %eax |
movl %eax, %cr0 |
# at this point we are in compatibility mode |
# At this point we are in compatibility mode |
jmpl $gdtselector(KTEXT_DES), $start64 |
165,29 → 175,362 |
.code64 |
start64: |
movq $(PA2KA(START_STACK)), %rsp |
movl grub_eax, %eax |
movl grub_ebx, %ebx |
# call arch_pre_main(grub_eax, grub_ebx) |
xorq %rdi, %rdi |
movl grub_eax, %edi |
xorq %rsi, %rsi |
movl grub_ebx, %esi |
call arch_pre_main |
cmpl $MULTIBOOT_LOADER_MAGIC, %eax # compare GRUB signature |
je valid_boot |
xorl %ecx, %ecx # no memory size or map available |
movl %ecx, e820counter |
jmp invalid_boot |
valid_boot: |
movl (%ebx), %eax # ebx = physical address of struct multiboot_info |
bt $3, %eax # mbi->flags[3] (mods_count, mods_addr valid) |
jc mods_valid |
xorq %rcx, %rcx |
movq %rcx, init |
jmp mods_end |
mods_valid: |
xorq %rcx, %rcx |
movl 20(%ebx), %ecx # mbi->mods_count |
movq %rcx, init |
cmpl $0, %ecx |
je mods_end |
movl 24(%ebx), %esi # mbi->mods_addr |
movq $init, %rdi |
mods_loop: |
xorq %rdx, %rdx |
movl 0(%esi), %edx # mods->mod_start |
movq $0xffff800000000000, %r10 |
addq %r10, %rdx |
movq %rdx, 8(%rdi) |
xorq %rdx, %rdx |
movl 4(%esi), %edx |
subl 0(%esi), %edx # mods->mod_end - mods->mod_start |
movq %rdx, 16(%rdi) |
addl $16, %esi |
addq $16, %rdi |
loop mods_loop |
mods_end: |
bt $6, %eax # mbi->flags[6] (mmap_length, mmap_addr valid) |
jc mmap_valid |
xorl %edx, %edx |
jmp mmap_invalid |
mmap_valid: |
movl 44(%ebx), %ecx # mbi->mmap_length |
movl 48(%ebx), %esi # mbi->mmap_addr |
movq $e820table, %rdi |
xorl %edx, %edx |
mmap_loop: |
cmpl $0, %ecx |
jle mmap_end |
movl 4(%esi), %eax # mmap->base_addr_low |
movl %eax, (%rdi) |
movl 8(%esi), %eax # mmap->base_addr_high |
movl %eax, 4(%rdi) |
movl 12(%esi), %eax # mmap->length_low |
movl %eax, 8(%rdi) |
movl 16(%esi), %eax # mmap->length_high |
movl %eax, 12(%rdi) |
movl 20(%esi), %eax # mmap->type |
movl %eax, 16(%rdi) |
movl (%esi), %eax # mmap->size |
addl $0x4, %eax |
addl %eax, %esi |
subl %eax, %ecx |
addq $MEMMAP_E820_RECORD_SIZE, %rdi |
incl %edx |
jmp mmap_loop |
mmap_end: |
mmap_invalid: |
movl %edx, e820counter |
invalid_boot: |
call main_bsp |
#ifdef CONFIG_SMP |
# not reached |
# copy AP bootstrap routines below 1 MB |
movq $BOOT_OFFSET, %rsi |
movq $AP_BOOT_OFFSET, %rdi |
movq $_hardcoded_unmapped_size, %rcx |
rep movsb |
#endif |
call main_bsp # never returns |
cli |
hlt0: |
hlt |
jmp hlt0 |
hlt |
#ifdef CONFIG_FB |
.code32 |
vesa_init: |
jmp $gdtselector(VESA_INIT_DES), $vesa_init_real - vesa_init |
.code16 |
vesa_init_real: |
mov %cr0, %eax |
and $~1, %eax |
mov %eax, %cr0 |
jmp $VESA_INIT_SEGMENT, $vesa_init_real2 - vesa_init |
vesa_init_real2: |
mov $VESA_INIT_SEGMENT, %bx |
mov %bx, %es |
mov %bx, %fs |
mov %bx, %gs |
mov %bx, %ds |
mov %bx, %ss |
movl $0x0000fffc, %esp |
movl $0x0000fffc, %ebp |
#define VESA_INFO_SIZE 1024 |
#define VESA_MODE_ATTRIBUTES_OFFSET 0 |
#define VESA_MODE_LIST_PTR_OFFSET 14 |
#define VESA_MODE_SCANLINE_OFFSET 16 |
#define VESA_MODE_WIDTH_OFFSET 18 |
#define VESA_MODE_HEIGHT_OFFSET 20 |
#define VESA_MODE_BPP_OFFSET 25 |
#define VESA_MODE_PHADDR_OFFSET 40 |
#define VESA_END_OF_MODES 0xffff |
#define VESA_OK 0x4f |
#define VESA_GET_INFO 0x4f00 |
#define VESA_GET_MODE_INFO 0x4f01 |
#define VESA_SET_MODE 0x4f02 |
#define VESA_SET_PALETTE 0x4f09 |
#define CONFIG_VESA_BPP_a 255 |
#if CONFIG_VESA_BPP == 24 |
#define CONFIG_VESA_BPP_VARIANT 32 |
#endif |
mov $VESA_GET_INFO, %ax |
mov $e_vesa_init - vesa_init, %di |
push %di |
int $0x10 |
pop %di |
cmp $VESA_OK, %al |
jnz 0f |
mov 2 + VESA_MODE_LIST_PTR_OFFSET(%di), %si |
mov %si, %gs |
mov VESA_MODE_LIST_PTR_OFFSET(%di), %si |
add $VESA_INFO_SIZE, %di |
1:# Try next mode |
mov %gs:(%si), %cx |
cmp $VESA_END_OF_MODES, %cx |
jz 0f |
inc %si |
inc %si |
push %cx |
push %di |
push %si |
mov $VESA_GET_MODE_INFO, %ax |
int $0x10 |
pop %si |
pop %di |
pop %cx |
cmp $VESA_OK, %al |
jnz 0f |
mov $CONFIG_VESA_WIDTH, %ax |
cmp VESA_MODE_WIDTH_OFFSET(%di), %ax |
jnz 1b |
mov $CONFIG_VESA_HEIGHT, %ax |
cmp VESA_MODE_HEIGHT_OFFSET(%di), %ax |
jnz 1b |
mov $CONFIG_VESA_BPP, %al |
cmp VESA_MODE_BPP_OFFSET(%di), %al |
#ifdef CONFIG_VESA_BPP_VARIANT |
jz 2f |
mov $CONFIG_VESA_BPP_VARIANT, %al |
cmp VESA_MODE_BPP_OFFSET(%di), %al |
#endif |
jnz 1b |
2: |
mov %cx, %bx |
or $0xc000, %bx |
push %di |
mov $VESA_SET_MODE, %ax |
int $0x10 |
pop %di |
cmp $VESA_OK, %al |
jnz 0f |
#if CONFIG_VESA_BPP == 8 |
# Set 3:2:3 VGA palette |
mov VESA_MODE_ATTRIBUTES_OFFSET(%di), %ax |
push %di |
mov $vga323 - vesa_init, %di |
mov $0x100, %ecx |
bt $5, %ax # Test if VGA compatible registers are present |
jnc vga_compat |
# Try VESA routine to set palette |
mov $VESA_SET_PALETTE, %ax |
xor %bl, %bl |
xor %dx, %dx |
int $0x10 |
jmp vga_not_compat |
vga_compat: |
# Try VGA registers to set palette |
movw $0x3c6, %dx # Set palette mask |
movb $0xff, %al |
outb %al, %dx |
movw $0x3c8, %dx # First index to set |
xor %al, %al |
outb %al, %dx |
movw $0x3c9, %dx # Data port |
vga_loop: |
movb %es:2(%di), %al |
outb %al, %dx |
movb %es:1(%di), %al |
outb %al, %dx |
movb %es:(%di), %al |
outb %al, %dx |
addw $4, %di |
loop vga_loop |
vga_not_compat: |
pop %di |
#endif |
mov VESA_MODE_PHADDR_OFFSET(%di), %esi |
mov VESA_MODE_WIDTH_OFFSET(%di), %ax |
shl $16, %eax |
mov VESA_MODE_HEIGHT_OFFSET(%di), %ax |
mov VESA_MODE_BPP_OFFSET(%di), %bl |
xor %bh, %bh |
shl $16, %ebx |
mov VESA_MODE_SCANLINE_OFFSET(%di), %bx |
mov %eax, %edi |
8: |
mov %cr0, %eax |
or $1, %eax |
mov %eax, %cr0 |
jmp 9f |
9: |
ljmpl $gdtselector(KTEXT32_DES), $(vesa_init_protect - vesa_init + VESA_INIT_SEGMENT << 4) |
0:# No prefered mode found |
mov $0x111, %cx |
push %di |
push %cx |
mov $VESA_GET_MODE_INFO, %ax |
int $0x10 |
pop %cx |
pop %di |
cmp $VESA_OK, %al |
jnz 1f |
jz 2b # Force relative jump |
1: |
mov $0x0003, %ax |
int $0x10 |
mov $0xffffffff, %edi # EGA text mode used, because of problems with VESA |
xor %ax, %ax |
jz 8b # Force relative jump |
vga323: |
#include "vga323.pal" |
.code32 |
vesa_init_protect: |
movw $gdtselector(KDATA_DES), %cx |
movw %cx, %es |
movw %cx, %ds # kernel data + stack |
movw %cx, %ss |
# Simics seems to remove hidden part of GS on entering user mode |
# when _visible_ part of GS does not point to user-mode segment |
movw $gdtselector(UDATA_DES), %cx |
movw %cx, %fs |
movw %cx, %gs |
movl $START_STACK, %esp # initialize stack pointer |
jmpl $gdtselector(KTEXT32_DES), $vesa_meeting_point |
.align 4 |
e_vesa_init: |
#endif |
# Print string from %esi to EGA display (in red) and halt |
error_halt: |
movl $0xb8000, %edi # base of EGA text mode memory |
movl $0xb8000, %edi # base of EGA text mode memory |
xorl %eax, %eax |
movw $0x3d4, %dx # read bits 8 - 15 of the cursor address |
movw $0x3d4, %dx # read bits 8 - 15 of the cursor address |
movb $0xe, %al |
outb %al, %dx |
195,7 → 538,7 |
inb %dx, %al |
shl $8, %ax |
movw $0x3d4, %dx # read bits 0 - 7 of the cursor address |
movw $0x3d4, %dx # read bits 0 - 7 of the cursor address |
movb $0xf, %al |
outb %al, %dx |
204,9 → 547,7 |
cmp $1920, %ax |
jbe cursor_ok |
movw $1920, %ax # sanity check for the cursor on the last line |
movw $1920, %ax # sanity check for the cursor on the last line |
cursor_ok: |
movw %ax, %bx |
213,7 → 554,7 |
shl $1, %eax |
addl %eax, %edi |
movw $0x0c00, %ax # black background, light red foreground |
movw $0x0c00, %ax # black background, light red foreground |
ploop: |
lodsb |
220,11 → 561,11 |
cmp $0, %al |
je ploop_end |
stosw |
inc %bx |
inc %bx |
jmp ploop |
ploop_end: |
movw $0x3d4, %dx # write bits 8 - 15 of the cursor address |
movw $0x3d4, %dx # write bits 8 - 15 of the cursor address |
movb $0xe, %al |
outb %al, %dx |
232,7 → 573,7 |
movb %bh, %al |
outb %al, %dx |
movw $0x3d4, %dx # write bits 0 - 7 of the cursor address |
movw $0x3d4, %dx # write bits 0 - 7 of the cursor address |
movb $0xf, %al |
outb %al, %dx |
239,20 → 580,17 |
movw $0x3d5, %dx |
movb %bl, %al |
outb %al, %dx |
cli |
hlt1: |
hlt |
jmp hlt1 |
hlt |
#include "vesa_real.inc" |
.section K_INI_PTLS, "aw", @progbits |
# |
# Macro for generating initial page table contents. |
# @param cnt Number of entries to generat. Must be multiple of 8. |
# @param g Number of GB that will be added to the mapping. |
# @param cnt Number of entries to generat. Must be multiple of 8. |
# @param g Number of GB that will be added to the mapping. |
# |
.macro ptl2gen cnt g |
.if \cnt |
304,7 → 642,7 |
# Mapping of [0; 1G) at -2G |
.quad ptl_2_0g + (PTL_WRITABLE | PTL_PRESENT) |
.fill 1, 8, 0 |
.align 4096 |
.global ptl_0 |
ptl_0: |
/branches/arm/kernel/arch/amd64/src/boot/memmap.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup amd64mm |
/** @addtogroup amd64mm |
* @{ |
*/ |
/** @file |
/branches/arm/kernel/arch/amd64/src/cpu/cpu.c |
---|
77,19 → 77,21 |
void cpu_setup_fpu(void) |
{ |
asm volatile ( |
"movq %%cr0, %%rax\n" |
"btsq $1, %%rax\n" /* cr0.mp */ |
"btrq $2, %%rax\n" /* cr0.em */ |
"movq %%rax, %%cr0\n" |
"movq %%cr4, %%rax\n" |
"bts $9, %%rax\n" /* cr4.osfxsr */ |
"movq %%rax, %%cr4\n" |
::: "%rax" |
); |
"movq %%cr0, %%rax;" |
"btsq $1, %%rax;" /* cr0.mp */ |
"btrq $2, %%rax;" /* cr0.em */ |
"movq %%rax, %%cr0;" |
"movq %%cr4, %%rax;" |
"bts $9, %%rax;" /* cr4.osfxsr */ |
"movq %%rax, %%cr4;" |
: |
: |
:"%rax" |
); |
} |
/** Set the TS flag to 1. |
/** Set the TS flag to 1. |
* |
* If a thread accesses coprocessor, exception is run, which |
* does a lazy fpu context switch. |
97,22 → 99,26 |
*/ |
void fpu_disable(void) |
{ |
asm volatile ( |
"mov %%cr0, %%rax\n" |
"bts $3, %%rax\n" |
"mov %%rax, %%cr0\n" |
::: "%rax" |
); |
asm volatile ( |
"mov %%cr0,%%rax;" |
"bts $3,%%rax;" |
"mov %%rax,%%cr0;" |
: |
: |
:"%rax" |
); |
} |
void fpu_enable(void) |
{ |
asm volatile ( |
"mov %%cr0, %%rax\n" |
"btr $3, %%rax\n" |
"mov %%rax, %%cr0\n" |
::: "%rax" |
); |
asm volatile ( |
"mov %%cr0,%%rax;" |
"btr $3,%%rax;" |
"mov %%rax,%%cr0;" |
: |
: |
:"%rax" |
); |
} |
void cpu_arch_init(void) |
/branches/arm/kernel/arch/amd64/src/mm/page.c |
---|
180,7 → 180,7 |
page = read_cr2(); |
if (istate->error_word & PFERR_CODE_RSVD) |
panic("Reserved bit set in page table entry."); |
panic("Reserved bit set in page table entry.\n"); |
if (istate->error_word & PFERR_CODE_RW) |
access = PF_ACCESS_WRITE; |
190,11 → 190,11 |
access = PF_ACCESS_READ; |
if (as_page_fault(page, access, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate, "Page fault: %#x.", page); |
fault_if_from_uspace(istate, "Page fault: %#x", page); |
decode_istate(n, istate); |
printf("Page fault address: %llx.\n", page); |
panic("Page fault."); |
printf("Page fault address: %llx\n", page); |
panic("page fault\n"); |
} |
} |
202,7 → 202,7 |
uintptr_t hw_map(uintptr_t physaddr, size_t size) |
{ |
if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) |
panic("Unable to map physical memory %p (%d bytes).", physaddr, size) |
panic("Unable to map physical memory %p (%d bytes)", physaddr, size) |
uintptr_t virtaddr = PA2KA(last_frame); |
pfn_t i; |
/branches/arm/kernel/arch/amd64/src/amd64.c |
---|
39,15 → 39,11 |
#include <config.h> |
#include <proc/thread.h> |
#include <genarch/multiboot/multiboot.h> |
#include <genarch/drivers/legacy/ia32/io.h> |
#include <genarch/drivers/ega/ega.h> |
#include <arch/drivers/ega.h> |
#include <arch/drivers/vesa.h> |
#include <genarch/drivers/i8042/i8042.h> |
#include <genarch/kbrd/kbrd.h> |
#include <genarch/kbd/i8042.h> |
#include <arch/drivers/i8254.h> |
#include <arch/drivers/i8259.h> |
#include <arch/boot/boot.h> |
#ifdef CONFIG_SMP |
#include <arch/smp/apic.h> |
65,8 → 61,9 |
#include <syscall/syscall.h> |
#include <console/console.h> |
#include <ddi/irq.h> |
#include <sysinfo/sysinfo.h> |
#include <ddi/device.h> |
/** Disable I/O on non-privileged levels |
* |
* Clean IOPL(12,13) and NT(14) flags in EFLAGS register |
73,13 → 70,15 |
*/ |
static void clean_IOPL_NT_flags(void) |
{ |
asm volatile ( |
asm ( |
"pushfq\n" |
"pop %%rax\n" |
"and $~(0x7000), %%rax\n" |
"pushq %%rax\n" |
"popfq\n" |
::: "%rax" |
: |
: |
: "%rax" |
); |
} |
89,31 → 88,16 |
*/ |
static void clean_AM_flag(void) |
{ |
asm volatile ( |
asm ( |
"mov %%cr0, %%rax\n" |
"and $~(0x40000), %%rax\n" |
"mov %%rax, %%cr0\n" |
::: "%rax" |
: |
: |
: "%rax" |
); |
} |
/** Perform amd64-specific initialization before main_bsp() is called. |
* |
* @param signature Should contain the multiboot signature. |
* @param mi Pointer to the multiboot information structure. |
*/ |
void arch_pre_main(uint32_t signature, const multiboot_info_t *mi) |
{ |
/* Parse multiboot information obtained from the bootloader. */ |
multiboot_info_parse(signature, mi); |
#ifdef CONFIG_SMP |
/* Copy AP bootstrap routines below 1 MB. */ |
memcpy((void *) AP_BOOT_OFFSET, (void *) BOOT_OFFSET, |
(size_t) &_hardcoded_unmapped_size); |
#endif |
} |
void arch_pre_mm_init(void) |
{ |
/* Enable no-execute pages */ |
149,17 → 133,13 |
/* hard clock */ |
i8254_init(); |
#ifdef CONFIG_FB |
if (vesa_present()) |
vesa_init(); |
else |
#endif |
#ifdef CONFIG_EGA |
ega_init(EGA_BASE, EGA_VIDEORAM); /* video */ |
#else |
{} |
#endif |
ega_init(); /* video */ |
/* Enable debugger */ |
debugger_init(); |
192,33 → 172,8 |
void arch_post_smp_init(void) |
{ |
#ifdef CONFIG_PC_KBD |
/* |
* Initialize the i8042 controller. Then initialize the keyboard |
* module and connect it to i8042. Enable keyboard interrupts. |
*/ |
i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
if (i8042_instance) { |
kbrd_instance_t *kbrd_instance = kbrd_init(); |
if (kbrd_instance) { |
indev_t *sink = stdin_wire(); |
indev_t *kbrd = kbrd_wire(kbrd_instance, sink); |
i8042_wire(i8042_instance, kbrd); |
trap_virtual_enable_irqs(1 << IRQ_KBD); |
} |
} |
/* |
* This is the necessary evil until the userspace driver is entirely |
* self-sufficient. |
*/ |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
sysinfo_set_item_val("kbd.address.physical", NULL, |
(uintptr_t) I8042_BASE); |
sysinfo_set_item_val("kbd.address.kernel", NULL, |
(uintptr_t) I8042_BASE); |
#endif |
/* keyboard controller */ |
i8042_init(device_assign_devno(), IRQ_KBD, device_assign_devno(), IRQ_MOUSE); |
} |
void calibrate_delay_loop(void) |
253,45 → 208,15 |
*/ |
void arch_grab_console(void) |
{ |
#ifdef CONFIG_FB |
if (vesa_present()) |
vesa_redraw(); |
else |
#endif |
#ifdef CONFIG_EGA |
ega_redraw(); |
#else |
{} |
#endif |
i8042_grab(); |
} |
/** Return console to userspace |
* |
*/ |
void arch_release_console(void) |
{ |
i8042_release(); |
} |
/** Construct function pointer |
* |
* @param fptr function pointer structure |
* @param addr function address |
* @param caller calling function address |
* |
* @return address of the function pointer |
* |
*/ |
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
{ |
return addr; |
} |
void arch_reboot(void) |
{ |
#ifdef CONFIG_PC_KBD |
i8042_cpu_reset((i8042_t *) I8042_BASE); |
#endif |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/amd64/src/ddi/ddi.c |
---|
56,16 → 56,16 |
*/ |
int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size) |
{ |
size_t bits; |
count_t bits; |
bits = ioaddr + size; |
if (bits > IO_PORTS) |
return ENOENT; |
if (task->arch.iomap.bits < bits) { |
bitmap_t oldiomap; |
uint8_t *newmap; |
/* |
* The I/O permission bitmap is too small and needs to be grown. |
*/ |
77,17 → 77,17 |
bitmap_initialize(&oldiomap, task->arch.iomap.map, |
task->arch.iomap.bits); |
bitmap_initialize(&task->arch.iomap, newmap, bits); |
/* |
* Mark the new range inaccessible. |
*/ |
bitmap_set_range(&task->arch.iomap, oldiomap.bits, |
bits - oldiomap.bits); |
/* |
* In case there really existed smaller iomap, |
* copy its contents and deallocate it. |
*/ |
*/ |
if (oldiomap.bits) { |
bitmap_copy(&task->arch.iomap, &oldiomap, |
oldiomap.bits); |
94,17 → 94,17 |
free(oldiomap.map); |
} |
} |
/* |
* Enable the range and we are done. |
*/ |
bitmap_clear_range(&task->arch.iomap, (size_t) ioaddr, (size_t) size); |
bitmap_clear_range(&task->arch.iomap, (index_t) ioaddr, (count_t) size); |
/* |
* Increment I/O Permission bitmap generation counter. |
*/ |
task->arch.iomapver++; |
return 0; |
} |
117,12 → 117,12 |
*/ |
void io_perm_bitmap_install(void) |
{ |
size_t bits; |
count_t bits; |
ptr_16_64_t cpugdtr; |
descriptor_t *gdt_p; |
tss_descriptor_t *tss_desc; |
size_t ver; |
count_t ver; |
/* First, copy the I/O Permission Bitmap. */ |
spinlock_lock(&TASK->lock); |
ver = TASK->arch.iomapver; |
140,7 → 140,7 |
bitmap_set_range(&iomap, ALIGN_UP(TASK->arch.iomap.bits, 8), 8); |
} |
spinlock_unlock(&TASK->lock); |
/* |
* Second, adjust TSS segment limit. |
* Take the extra ending byte will all bits set into account. |
151,10 → 151,10 |
gdtr_load(&cpugdtr); |
/* |
* Before we load new TSS limit, the current TSS descriptor |
* type must be changed to describe inactive TSS. |
*/ |
tss_desc = (tss_descriptor_t *) &gdt_p[TSS_DES]; |
* Before we load new TSS limit, the current TSS descriptor |
* type must be changed to describe inactive TSS. |
*/ |
tss_desc = (tss_descriptor_t *) &gdt_p[TSS_DES]; |
tss_desc->type = AR_TSS; |
tr_load(gdtselector(TSS_DES)); |
/branches/arm/kernel/arch/amd64/src/interrupt.c |
---|
43,6 → 43,7 |
#include <mm/tlb.h> |
#include <mm/as.h> |
#include <arch.h> |
#include <symtab.h> |
#include <arch/asm.h> |
#include <proc/scheduler.h> |
#include <proc/thread.h> |
51,7 → 52,6 |
#include <arch/ddi/ddi.h> |
#include <interrupt.h> |
#include <ddi/irq.h> |
#include <symtab.h> |
/* |
* Interrupt and exception dispatching. |
64,8 → 64,10 |
void decode_istate(int n, istate_t *istate) |
{ |
char *symbol; |
/* uint64_t *x = &istate->stack[0]; */ |
symbol = symtab_fmt_name_lookup(istate->rip); |
if (!(symbol = get_symtab_entry(istate->rip))) |
symbol = ""; |
printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n", n, __func__); |
printf("%%rip: %#llx (%s)\n", istate->rip, symbol); |
78,6 → 80,12 |
istate->rdi, istate->r8); |
printf("%%r9=%#llx, %%r10=%#llx, %%r11=%#llx\n", istate->r9, |
istate->r10, istate->r11); |
#ifdef CONFIG_DEBUG_ALLREGS |
printf("%%r12=%#llx, %%r13=%#llx, %%r14=%#llx\n", istate->r12, |
istate->r13, istate->r14); |
printf("%%r15=%#llx, %%rbx=%#llx, %%rbp=%#llx\n", istate->r15, |
istate->rbx, &istate->rbp); |
#endif |
printf("%%rsp=%#llx\n", &istate->stack[0]); |
} |
86,15 → 94,15 |
if (eoi_function) |
eoi_function(); |
else |
panic("No eoi_function."); |
panic("no eoi_function\n"); |
} |
static void null_interrupt(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "Unserviced interrupt: %d.", n); |
fault_if_from_uspace(istate, "unserviced interrupt: %d", n); |
decode_istate(n, istate); |
panic("Unserviced interrupt."); |
panic("unserviced interrupt\n"); |
} |
/** General Protection Fault. */ |
101,7 → 109,7 |
static void gp_fault(int n, istate_t *istate) |
{ |
if (TASK) { |
size_t ver; |
count_t ver; |
spinlock_lock(&TASK->lock); |
ver = TASK->arch.iomapver; |
118,37 → 126,35 |
io_perm_bitmap_install(); |
return; |
} |
fault_if_from_uspace(istate, "General protection fault."); |
fault_if_from_uspace(istate, "general protection fault"); |
} |
decode_istate(n, istate); |
panic("General protection fault."); |
panic("general protection fault\n"); |
} |
static void ss_fault(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "Stack fault."); |
fault_if_from_uspace(istate, "stack fault"); |
decode_istate(n, istate); |
panic("Stack fault."); |
panic("stack fault\n"); |
} |
static void nm_fault(int n, istate_t *istate) |
{ |
#ifdef CONFIG_FPU_LAZY |
#ifdef CONFIG_FPU_LAZY |
scheduler_fpu_lazy_request(); |
#else |
fault_if_from_uspace(istate, "FPU fault."); |
panic("FPU fault."); |
fault_if_from_uspace(istate, "fpu fault"); |
panic("fpu fault"); |
#endif |
} |
#ifdef CONFIG_SMP |
static void tlb_shootdown_ipi(int n, istate_t *istate) |
{ |
trap_virtual_eoi(); |
tlb_shootdown_ipi_recv(); |
} |
#endif |
/** Handler of IRQ exceptions */ |
static void irq_interrupt(int n, istate_t *istate) |
171,7 → 177,7 |
trap_virtual_eoi(); |
ack = true; |
} |
irq->handler(irq); |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
/* |
215,7 → 221,7 |
if (enable_irqs_function) |
enable_irqs_function(irqmask); |
else |
panic("No enable_irqs_function."); |
panic("no enable_irqs_function\n"); |
} |
void trap_virtual_disable_irqs(uint16_t irqmask) |
223,7 → 229,7 |
if (disable_irqs_function) |
disable_irqs_function(irqmask); |
else |
panic("No disable_irqs_function."); |
panic("no disable_irqs_function\n"); |
} |
/** @} |
/branches/arm/kernel/arch/amd64/src/fpu_context.c |
---|
39,9 → 39,9 |
void fpu_context_save(fpu_context_t *fctx) |
{ |
asm volatile ( |
"fxsave %[fctx]\n" |
: [fctx] "=m" (*fctx) |
); |
"fxsave %0" |
: "=m"(*fctx) |
); |
} |
/** Restore FPU (mmx,sse) context using fxrstor instruction */ |
48,9 → 48,9 |
void fpu_context_restore(fpu_context_t *fctx) |
{ |
asm volatile ( |
"fxrstor %[fctx]\n" |
: [fctx] "=m" (*fctx) |
); |
"fxrstor %0" |
: "=m"(*fctx) |
); |
} |
void fpu_init() |
57,7 → 57,7 |
{ |
/* TODO: Zero all SSE, MMX etc. registers */ |
asm volatile ( |
"fninit\n" |
"fninit;" |
); |
} |
/branches/arm/kernel/arch/amd64/_link.ld.in |
---|
43,6 → 43,8 |
QUAD(unmapped_kdata_end - unmapped_kdata_start); |
*(COMMON); /* global variables */ |
*(.eh_frame); |
symbol_table = .; |
*(symtab.*); /* Symbol table, must be LAST symbol!*/ |
50,10 → 52,6 |
kdata_end = .; |
} |
/DISCARD/ : { |
*(*); |
} |
#ifdef CONFIG_SMP |
_hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start); |
/branches/arm/kernel/arch/ia32xen/Makefile.inc |
---|
0,0 → 1,144 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf32-i386 |
BFD_ARCH = i386 |
BFD = elf32-i386 |
TARGET = i686-pc-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/i686 |
DEFS += -DMACHINE=$(MACHINE) -D__32_BITS__ |
CMN1 = -m32 |
GCC_CFLAGS += $(CMN1) |
ICC_CFLAGS += $(CMN1) |
SUNCC_CFLAGS += $(CMN1) |
## Accepted CPUs |
# |
ifeq ($(MACHINE),athlon-xp) |
CMN2 = -march=athlon-xp -mmmx -msse -m3dnow |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += -xarch=ssea |
DEFS += -DCONFIG_FENCES_P3 |
CONFIG_SMP = n |
CONFIG_HT = n |
endif |
ifeq ($(MACHINE),athlon-mp) |
CMN2 = -march=athlon-mp -mmmx -msse -m3dnow |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += -xarch=ssea |
DEFS += -DCONFIG_FENCES_P3 |
CONFIG_HT = n |
endif |
ifeq ($(MACHINE),pentium3) |
CMN2 = -march=pentium3 -mmmx -msse |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += -xarch=sse |
DEFS += -DCONFIG_FENCES_P3 |
CONFIG_HT = n |
endif |
ifeq ($(MACHINE),core) |
CMN2 = -march=prescott -mfpmath=sse -mmmx -msse -msse2 -msse3 |
GCC_CFLAGS += $(CMN2) |
ICC_CFLAGS += $(CMN2) |
SUNCC_CFLAGS += -xarch=sse3 |
DEFS += -DCONFIG_FENCES_P4 |
endif |
ifeq ($(MACHINE),pentium4) |
GCC_CFLAGS += -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 |
ICC_CFLAGS += -march=pentium4 |
SUNCC_CFLAGS += -xarch=sse2 |
DEFS += -DCONFIG_FENCES_P4 |
endif |
## Own configuration directives |
# |
CONFIG_ACPI = y |
## Compile with hierarchical page tables support. |
# |
CONFIG_PAGE_PT = y |
DEFS += -DCONFIG_PAGE_PT |
## Accepted configuration directives |
# |
ifeq ($(CONFIG_SMP),y) |
DEFS += -DCONFIG_SMP |
endif |
ifeq ($(CONFIG_HT),y) |
DEFS += -DCONFIG_HT |
endif |
## Compile with support for software integer division. |
# |
CONFIG_SOFTINT = y |
ARCH_SOURCES = \ |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/debug/panic.s \ |
arch/$(ARCH)/src/delay.s \ |
arch/$(ARCH)/src/asm.S \ |
arch/$(ARCH)/src/proc/scheduler.c \ |
arch/$(ARCH)/src/proc/task.c \ |
arch/$(ARCH)/src/proc/thread.c \ |
arch/$(ARCH)/src/bios/bios.c \ |
arch/$(ARCH)/src/smp/apic.c \ |
arch/$(ARCH)/src/smp/mps.c \ |
arch/$(ARCH)/src/smp/smp.c \ |
arch/$(ARCH)/src/atomic.S \ |
arch/$(ARCH)/src/smp/ipi.c \ |
arch/$(ARCH)/src/ia32xen.c \ |
arch/$(ARCH)/src/interrupt.c \ |
arch/$(ARCH)/src/pm.c \ |
arch/$(ARCH)/src/userspace.c \ |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/drivers/xconsole.c \ |
arch/$(ARCH)/src/boot/boot.S \ |
arch/$(ARCH)/src/fpu_context.c \ |
arch/$(ARCH)/src/debugger.c |
/branches/arm/kernel/arch/ia32xen/src/asm.S |
---|
0,0 → 1,124 |
# |
# Copyright (c) 2001-2004 Jakub Jermar |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## very low and hardware-level functions |
# Mask for interrupts 0 - 31 (bits 0 - 31) where 0 means that int has no error word |
# and 1 means interrupt with error word |
#define ERROR_WORD_INTERRUPT_LIST 0x00027D00 |
.text |
.global xen_callback |
.global xen_failsafe_callback |
.global enable_l_apic_in_msr |
.global memcpy |
.global memcpy_from_uspace |
.global memcpy_from_uspace_failover_address |
.global memcpy_to_uspace |
.global memcpy_to_uspace_failover_address |
xen_callback: |
iret |
xen_failsafe_callback: |
iret |
#define MEMCPY_DST 4 |
#define MEMCPY_SRC 8 |
#define MEMCPY_SIZE 12 |
/** Copy memory to/from userspace. |
* |
* This is almost conventional memcpy(). |
* The difference is that there is a failover part |
* to where control is returned from a page fault |
* if the page fault occurs during copy_from_uspace() |
* or copy_to_uspace(). |
* |
* @param MEMCPY_DST(%esp) Destination address. |
* @param MEMCPY_SRC(%esp) Source address. |
* @param MEMCPY_SIZE(%esp) Size. |
* |
* @return MEMCPY_DST(%esp) on success and 0 on failure. |
*/ |
memcpy: |
memcpy_from_uspace: |
memcpy_to_uspace: |
movl %edi, %edx /* save %edi */ |
movl %esi, %eax /* save %esi */ |
movl MEMCPY_SIZE(%esp), %ecx |
shrl $2, %ecx /* size / 4 */ |
movl MEMCPY_DST(%esp), %edi |
movl MEMCPY_SRC(%esp), %esi |
rep movsl /* copy as much as possible word by word */ |
movl MEMCPY_SIZE(%esp), %ecx |
andl $3, %ecx /* size % 4 */ |
jz 0f |
rep movsb /* copy the rest byte by byte */ |
0: |
movl %edx, %edi |
movl %eax, %esi |
movl MEMCPY_DST(%esp), %eax /* MEMCPY_DST(%esp), success */ |
ret |
/* |
* We got here from as_page_fault() after the memory operations |
* above had caused a page fault. |
*/ |
memcpy_from_uspace_failover_address: |
memcpy_to_uspace_failover_address: |
movl %edx, %edi |
movl %eax, %esi |
xorl %eax, %eax /* return 0, failure */ |
ret |
## Enable local APIC |
# |
# Enable local APIC in MSR. |
# |
enable_l_apic_in_msr: |
push %eax |
movl $0x1b, %ecx |
rdmsr |
orl $(1<<11),%eax |
orl $(0xfee00000),%eax |
wrmsr |
pop %eax |
ret |
/branches/arm/kernel/arch/ia32xen/src/userspace.c |
---|
0,0 → 1,93 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#include <userspace.h> |
#include <arch/pm.h> |
#include <arch/types.h> |
#include <arch.h> |
#include <proc/uarg.h> |
#include <mm/as.h> |
/** Enter userspace |
* |
* Change CPU protection level to 3, enter userspace. |
* |
*/ |
void userspace(uspace_arg_t *kernel_uarg) |
{ |
uint32_t ipl = interrupts_disable(); |
asm volatile ( |
/* |
* Clear nested task flag. |
*/ |
"pushfl\n" |
"pop %%eax\n" |
"and $0xffffbfff, %%eax\n" |
"push %%eax\n" |
"popfl\n" |
/* Set up GS register (TLS) */ |
"movl %6, %%gs\n" |
"pushl %0\n" |
"pushl %1\n" |
"pushl %2\n" |
"pushl %3\n" |
"pushl %4\n" |
"movl %5, %%eax\n" |
/* %ebx is defined to hold pcb_ptr - set it to 0 */ |
"xorl %%ebx, %%ebx\n" |
"iret\n" |
: |
: "i" (selector(UDATA_DES) | PL_USER), |
"r" (kernel_uarg->uspace_stack + THREAD_STACK_SIZE), |
"r" (ipl), |
"i" (selector(UTEXT_DES) | PL_USER), |
"r" (kernel_uarg->uspace_entry), |
"r" (kernel_uarg->uspace_uarg), |
"r" (selector(TLS_DES)) |
: "eax" |
); |
/* Unreachable */ |
for(;;) |
; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/ia32xen.c |
---|
0,0 → 1,218 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#include <arch.h> |
#include <main/main.h> |
#include <arch/types.h> |
#include <align.h> |
#include <arch/pm.h> |
#include <arch/drivers/xconsole.h> |
#include <arch/mm/page.h> |
#include <arch/context.h> |
#include <config.h> |
#include <arch/interrupt.h> |
#include <arch/asm.h> |
#include <genarch/acpi/acpi.h> |
#include <arch/bios/bios.h> |
#include <interrupt.h> |
#include <arch/debugger.h> |
#include <proc/thread.h> |
#include <syscall/syscall.h> |
#include <console/console.h> |
#include <ddi/irq.h> |
start_info_t start_info; |
memzone_t meminfo; |
extern void xen_callback(void); |
extern void xen_failsafe_callback(void); |
void arch_pre_main(void) |
{ |
pte_t pte; |
memsetb(&pte, sizeof(pte), 0); |
pte.present = 1; |
pte.writeable = 1; |
pte.frame_address = ADDR2PFN((uintptr_t) start_info.shared_info); |
ASSERT(xen_update_va_mapping(&shared_info, pte, UVMF_INVLPG) == 0); |
if (!(start_info.flags & SIF_INITDOMAIN)) { |
/* Map console frame */ |
pte.present = 1; |
pte.writeable = 1; |
pte.frame_address = start_info.console.domU.mfn; |
ASSERT(xen_update_va_mapping(&console_page, pte, UVMF_INVLPG) == 0); |
} else |
start_info.console.domU.evtchn = 0; |
ASSERT(xen_set_callbacks(XEN_CS, xen_callback, XEN_CS, xen_failsafe_callback) == 0); |
/* Create identity mapping */ |
meminfo.start = ADDR2PFN(ALIGN_UP(KA2PA(start_info.ptl0), PAGE_SIZE)) + start_info.pt_frames; |
meminfo.size = start_info.frames - meminfo.start; |
meminfo.reserved = 0; |
uintptr_t pa; |
index_t last_ptl0 = 0; |
for (pa = PFN2ADDR(meminfo.start); pa < PFN2ADDR(meminfo.start + meminfo.size); pa += FRAME_SIZE) { |
uintptr_t va = PA2KA(pa); |
if ((PTL0_INDEX(va) != last_ptl0) && (GET_PTL1_FLAGS(start_info.ptl0, PTL0_INDEX(va)) & PAGE_NOT_PRESENT)) { |
/* New page directory entry needed */ |
uintptr_t tpa = PFN2ADDR(meminfo.start + meminfo.reserved); |
uintptr_t tva = PA2KA(tpa); |
memsetb((void *) tva, PAGE_SIZE, 0); |
pte_t *tptl3 = (pte_t *) PA2KA(GET_PTL1_ADDRESS(start_info.ptl0, PTL0_INDEX(tva))); |
SET_FRAME_ADDRESS(tptl3, PTL3_INDEX(tva), 0); |
SET_PTL1_ADDRESS(start_info.ptl0, PTL0_INDEX(va), tpa); |
SET_FRAME_ADDRESS(tptl3, PTL3_INDEX(tva), tpa); |
last_ptl0 = PTL0_INDEX(va); |
meminfo.reserved++; |
} |
pte_t *ptl3 = (pte_t *) PA2KA(GET_PTL1_ADDRESS(start_info.ptl0, PTL0_INDEX(va))); |
SET_FRAME_ADDRESS(ptl3, PTL3_INDEX(va), pa); |
SET_FRAME_FLAGS(ptl3, PTL3_INDEX(va), PAGE_PRESENT | PAGE_WRITE); |
} |
/* Put initial stack safely in the mapped area */ |
stack_safe = PA2KA(PFN2ADDR(meminfo.start + meminfo.reserved)); |
} |
void arch_pre_mm_init(void) |
{ |
pm_init(); |
if (config.cpu_active == 1) { |
interrupt_init(); |
// bios_init(); |
} |
} |
void arch_post_mm_init(void) |
{ |
if (config.cpu_active == 1) { |
/* Initialize IRQ routing */ |
irq_init(IRQ_COUNT, IRQ_COUNT); |
/* Video */ |
xen_console_init(); |
/* Enable debugger */ |
debugger_init(); |
/* Merge all memory zones to 1 big zone */ |
zone_merge_all(); |
} |
} |
void arch_post_cpu_init(void) |
{ |
} |
void arch_pre_smp_init(void) |
{ |
if (config.cpu_active == 1) { |
#ifdef CONFIG_SMP |
acpi_init(); |
#endif /* CONFIG_SMP */ |
} |
} |
void arch_post_smp_init(void) |
{ |
} |
void calibrate_delay_loop(void) |
{ |
// i8254_calibrate_delay_loop(); |
if (config.cpu_active == 1) { |
/* |
* This has to be done only on UP. |
* On SMP, i8254 is not used for time keeping and its interrupt pin remains masked. |
*/ |
// i8254_normal_operation(); |
} |
} |
/** Set thread-local-storage pointer |
* |
* TLS pointer is set in GS register. That means, the GS contains |
* selector, and the descriptor->base is the correct address. |
*/ |
unative_t sys_tls_set(unative_t addr) |
{ |
THREAD->arch.tls = addr; |
set_tls_desc(addr); |
return 0; |
} |
/** Acquire console back for kernel |
* |
*/ |
void arch_grab_console(void) |
{ |
} |
/** Return console to userspace |
* |
*/ |
void arch_release_console(void) |
{ |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/pm.c |
---|
0,0 → 1,206 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/pm.h> |
#include <config.h> |
#include <arch/types.h> |
#include <arch/interrupt.h> |
#include <arch/asm.h> |
#include <arch/context.h> |
#include <panic.h> |
#include <arch/mm/page.h> |
#include <mm/slab.h> |
#include <memstr.h> |
#include <interrupt.h> |
/* |
* Early ia32xen configuration functions and data structures. |
*/ |
/* |
* We have no use for segmentation so we set up flat mode. In this |
* mode, we use, for each privilege level, two segments spanning the |
* whole memory. One is for code and one is for data. |
* |
* One is for GS register which holds pointer to the TLS thread |
* structure in it's base. |
*/ |
descriptor_t gdt[GDT_ITEMS] = { |
/* NULL descriptor */ |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
/* KTEXT descriptor */ |
{ 0xffff, 0, 0, AR_PRESENT | AR_CODE | DPL_KERNEL, 0xf, 0, 0, 1, 1, 0 }, |
/* KDATA descriptor */ |
{ 0xffff, 0, 0, AR_PRESENT | AR_DATA | AR_WRITABLE | DPL_KERNEL, 0xf, 0, 0, 1, 1, 0 }, |
/* UTEXT descriptor */ |
{ 0xffff, 0, 0, AR_PRESENT | AR_CODE | DPL_USER, 0xf, 0, 0, 1, 1, 0 }, |
/* UDATA descriptor */ |
{ 0xffff, 0, 0, AR_PRESENT | AR_DATA | AR_WRITABLE | DPL_USER, 0xf, 0, 0, 1, 1, 0 }, |
/* TSS descriptor - set up will be completed later */ |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
/* TLS descriptor */ |
{ 0xffff, 0, 0, AR_PRESENT | AR_DATA | AR_WRITABLE | DPL_USER, 0xf, 0, 0, 1, 1, 0 }, |
}; |
static trap_info_t traps[IDT_ITEMS + 1]; |
static tss_t tss; |
tss_t *tss_p = NULL; |
/* gdtr is changed by kmp before next CPU is initialized */ |
ptr_16_32_t bootstrap_gdtr = { .limit = sizeof(gdt), .base = KA2PA((uintptr_t) gdt) }; |
ptr_16_32_t gdtr = { .limit = sizeof(gdt), .base = (uintptr_t) gdt }; |
void gdt_setbase(descriptor_t *d, uintptr_t base) |
{ |
d->base_0_15 = base & 0xffff; |
d->base_16_23 = ((base) >> 16) & 0xff; |
d->base_24_31 = ((base) >> 24) & 0xff; |
} |
void gdt_setlimit(descriptor_t *d, uint32_t limit) |
{ |
d->limit_0_15 = limit & 0xffff; |
d->limit_16_19 = (limit >> 16) & 0xf; |
} |
void tss_initialize(tss_t *t) |
{ |
memsetb(t, sizeof(struct tss), 0); |
} |
static void trap(void) |
{ |
} |
void traps_init(void) |
{ |
index_t i; |
for (i = 0; i < IDT_ITEMS; i++) { |
traps[i].vector = i; |
if (i == VECTOR_SYSCALL) |
traps[i].flags = 3; |
else |
traps[i].flags = 0; |
traps[i].cs = XEN_CS; |
traps[i].address = trap; |
} |
traps[IDT_ITEMS].vector = 0; |
traps[IDT_ITEMS].flags = 0; |
traps[IDT_ITEMS].cs = 0; |
traps[IDT_ITEMS].address = NULL; |
} |
/* Clean IOPL(12,13) and NT(14) flags in EFLAGS register */ |
static void clean_IOPL_NT_flags(void) |
{ |
// asm volatile ( |
// "pushfl\n" |
// "pop %%eax\n" |
// "and $0xffff8fff, %%eax\n" |
// "push %%eax\n" |
// "popfl\n" |
// : : : "eax" |
// ); |
} |
/* Clean AM(18) flag in CR0 register */ |
static void clean_AM_flag(void) |
{ |
// asm volatile ( |
// "mov %%cr0, %%eax\n" |
// "and $0xfffbffff, %%eax\n" |
// "mov %%eax, %%cr0\n" |
// : : : "eax" |
// ); |
} |
void pm_init(void) |
{ |
descriptor_t *gdt_p = (descriptor_t *) gdtr.base; |
// gdtr_load(&gdtr); |
if (config.cpu_active == 1) { |
traps_init(); |
xen_set_trap_table(traps); |
/* |
* NOTE: bootstrap CPU has statically allocated TSS, because |
* the heap hasn't been initialized so far. |
*/ |
tss_p = &tss; |
} else { |
tss_p = (tss_t *) malloc(sizeof(tss_t), FRAME_ATOMIC); |
if (!tss_p) |
panic("could not allocate TSS\n"); |
} |
// tss_initialize(tss_p); |
gdt_p[TSS_DES].access = AR_PRESENT | AR_TSS | DPL_KERNEL; |
gdt_p[TSS_DES].special = 1; |
gdt_p[TSS_DES].granularity = 0; |
gdt_setbase(&gdt_p[TSS_DES], (uintptr_t) tss_p); |
gdt_setlimit(&gdt_p[TSS_DES], TSS_BASIC_SIZE - 1); |
/* |
* As of this moment, the current CPU has its own GDT pointing |
* to its own TSS. We just need to load the TR register. |
*/ |
// tr_load(selector(TSS_DES)); |
clean_IOPL_NT_flags(); /* Disable I/O on nonprivileged levels and clear NT flag. */ |
clean_AM_flag(); /* Disable alignment check */ |
} |
void set_tls_desc(uintptr_t tls) |
{ |
ptr_16_32_t cpugdtr; |
descriptor_t *gdt_p; |
gdtr_store(&cpugdtr); |
gdt_p = (descriptor_t *) cpugdtr.base; |
gdt_setbase(&gdt_p[TLS_DES], tls); |
/* Reload gdt register to update GS in CPU */ |
gdtr_load(&cpugdtr); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/smp/smp.c |
---|
0,0 → 1,174 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#include <smp/smp.h> |
#include <arch/smp/smp.h> |
#include <arch/smp/mps.h> |
#include <arch/smp/ap.h> |
#include <genarch/acpi/acpi.h> |
#include <genarch/acpi/madt.h> |
#include <config.h> |
#include <synch/waitq.h> |
#include <synch/synch.h> |
#include <arch/pm.h> |
#include <func.h> |
#include <panic.h> |
#include <debug.h> |
#include <arch/asm.h> |
#include <mm/frame.h> |
#include <mm/page.h> |
#include <mm/slab.h> |
#include <mm/as.h> |
#include <print.h> |
#include <memstr.h> |
#ifdef CONFIG_SMP |
static struct smp_config_operations *ops = NULL; |
void smp_init(void) |
{ |
uintptr_t l_apic_address, io_apic_address; |
if (acpi_madt) { |
acpi_madt_parse(); |
ops = &madt_config_operations; |
} |
if (config.cpu_count == 1) { |
mps_init(); |
ops = &mps_config_operations; |
} |
l_apic_address = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_ATOMIC | FRAME_KA); |
if (!l_apic_address) |
panic("cannot allocate address for l_apic\n"); |
io_apic_address = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_ATOMIC | FRAME_KA); |
if (!io_apic_address) |
panic("cannot allocate address for io_apic\n"); |
if (config.cpu_count > 1) { |
page_mapping_insert(AS_KERNEL, l_apic_address, (uintptr_t) l_apic, |
PAGE_NOT_CACHEABLE | PAGE_WRITE); |
page_mapping_insert(AS_KERNEL, io_apic_address, (uintptr_t) io_apic, |
PAGE_NOT_CACHEABLE | PAGE_WRITE); |
l_apic = (uint32_t *) l_apic_address; |
io_apic = (uint32_t *) io_apic_address; |
} |
} |
/* |
* Kernel thread for bringing up application processors. It becomes clear |
* that we need an arrangement like this (AP's being initialized by a kernel |
* thread), for a thread has its dedicated stack. (The stack used during the |
* BSP initialization (prior the very first call to scheduler()) will be used |
* as an initialization stack for each AP.) |
*/ |
void kmp(void *arg) |
{ |
unsigned int i; |
ASSERT(ops != NULL); |
waitq_initialize(&ap_completion_wq); |
/* |
* We need to access data in frame 0. |
* We boldly make use of kernel address space mapping. |
*/ |
/* |
* Save 0xa to address 0xf of the CMOS RAM. |
* BIOS will not do the POST after the INIT signal. |
*/ |
outb(0x70,0xf); |
outb(0x71,0xa); |
// pic_disable_irqs(0xffff); |
apic_init(); |
for (i = 0; i < ops->cpu_count(); i++) { |
struct descriptor *gdt_new; |
/* |
* Skip processors marked unusable. |
*/ |
if (!ops->cpu_enabled(i)) |
continue; |
/* |
* The bootstrap processor is already up. |
*/ |
if (ops->cpu_bootstrap(i)) |
continue; |
if (ops->cpu_apic_id(i) == l_apic_id()) { |
printf("%s: bad processor entry #%d, will not send IPI to myself\n", __FUNCTION__, i); |
continue; |
} |
/* |
* Prepare new GDT for CPU in question. |
*/ |
if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS * sizeof(struct descriptor), FRAME_ATOMIC))) |
panic("couldn't allocate memory for GDT\n"); |
memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor)); |
memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0); |
gdtr.base = (uintptr_t) gdt_new; |
if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) { |
/* |
* There may be just one AP being initialized at |
* the time. After it comes completely up, it is |
* supposed to wake us up. |
*/ |
if (waitq_sleep_timeout(&ap_completion_wq, 1000000, SYNCH_FLAGS_NONE) == ESYNCH_TIMEOUT) |
printf("%s: waiting for cpu%d (APIC ID = %d) timed out\n", __FUNCTION__, config.cpu_active > i ? config.cpu_active : i, ops->cpu_apic_id(i)); |
} else |
printf("INIT IPI for l_apic%d failed\n", ops->cpu_apic_id(i)); |
} |
} |
int smp_irq_to_pin(unsigned int irq) |
{ |
ASSERT(ops != NULL); |
return ops->irq_to_pin(irq); |
} |
#endif /* CONFIG_SMP */ |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/smp/mps.c |
---|
0,0 → 1,433 |
/* |
* Copyright (c) 2001-2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#ifdef CONFIG_SMP |
#include <config.h> |
#include <print.h> |
#include <debug.h> |
#include <arch/smp/mps.h> |
#include <arch/smp/apic.h> |
#include <arch/smp/smp.h> |
#include <func.h> |
#include <arch/types.h> |
#include <cpu.h> |
#include <arch/asm.h> |
#include <arch/bios/bios.h> |
#include <mm/frame.h> |
/* |
* MultiProcessor Specification detection code. |
*/ |
#define FS_SIGNATURE 0x5f504d5f |
#define CT_SIGNATURE 0x504d4350 |
int mps_fs_check(uint8_t *base); |
int mps_ct_check(void); |
int configure_via_ct(void); |
int configure_via_default(uint8_t n); |
int ct_processor_entry(struct __processor_entry *pr); |
void ct_bus_entry(struct __bus_entry *bus); |
void ct_io_apic_entry(struct __io_apic_entry *ioa); |
void ct_io_intr_entry(struct __io_intr_entry *iointr); |
void ct_l_intr_entry(struct __l_intr_entry *lintr); |
void ct_extended_entries(void); |
static struct mps_fs *fs; |
static struct mps_ct *ct; |
struct __processor_entry *processor_entries = NULL; |
struct __bus_entry *bus_entries = NULL; |
struct __io_apic_entry *io_apic_entries = NULL; |
struct __io_intr_entry *io_intr_entries = NULL; |
struct __l_intr_entry *l_intr_entries = NULL; |
unsigned int processor_entry_cnt = 0; |
unsigned int bus_entry_cnt = 0; |
unsigned int io_apic_entry_cnt = 0; |
unsigned int io_intr_entry_cnt = 0; |
unsigned int l_intr_entry_cnt = 0; |
waitq_t ap_completion_wq; |
/* |
* Implementation of IA-32 SMP configuration interface. |
*/ |
static count_t get_cpu_count(void); |
static bool is_cpu_enabled(index_t i); |
static bool is_bsp(index_t i); |
static uint8_t get_cpu_apic_id(index_t i); |
static int mps_irq_to_pin(unsigned int irq); |
struct smp_config_operations mps_config_operations = { |
.cpu_count = get_cpu_count, |
.cpu_enabled = is_cpu_enabled, |
.cpu_bootstrap = is_bsp, |
.cpu_apic_id = get_cpu_apic_id, |
.irq_to_pin = mps_irq_to_pin |
}; |
count_t get_cpu_count(void) |
{ |
return processor_entry_cnt; |
} |
bool is_cpu_enabled(index_t i) |
{ |
ASSERT(i < processor_entry_cnt); |
return processor_entries[i].cpu_flags & 0x1; |
} |
bool is_bsp(index_t i) |
{ |
ASSERT(i < processor_entry_cnt); |
return processor_entries[i].cpu_flags & 0x2; |
} |
uint8_t get_cpu_apic_id(index_t i) |
{ |
ASSERT(i < processor_entry_cnt); |
return processor_entries[i].l_apic_id; |
} |
/* |
* Used to check the integrity of the MP Floating Structure. |
*/ |
int mps_fs_check(uint8_t *base) |
{ |
int i; |
uint8_t sum; |
for (i = 0, sum = 0; i < 16; i++) |
sum += base[i]; |
return !sum; |
} |
/* |
* Used to check the integrity of the MP Configuration Table. |
*/ |
int mps_ct_check(void) |
{ |
uint8_t *base = (uint8_t *) ct; |
uint8_t *ext = base + ct->base_table_length; |
uint8_t sum; |
int i; |
/* count the checksum for the base table */ |
for (i=0,sum=0; i < ct->base_table_length; i++) |
sum += base[i]; |
if (sum) |
return 0; |
/* count the checksum for the extended table */ |
for (i=0,sum=0; i < ct->ext_table_length; i++) |
sum += ext[i]; |
return sum == ct->ext_table_checksum; |
} |
void mps_init(void) |
{ |
uint8_t *addr[2] = { NULL, (uint8_t *) PA2KA(0xf0000) }; |
int i, j, length[2] = { 1024, 64*1024 }; |
/* |
* Find MP Floating Pointer Structure |
* 1a. search first 1K of EBDA |
* 1b. if EBDA is undefined, search last 1K of base memory |
* 2. search 64K starting at 0xf0000 |
*/ |
addr[0] = (uint8_t *) PA2KA(ebda ? ebda : 639 * 1024); |
for (i = 0; i < 2; i++) { |
for (j = 0; j < length[i]; j += 16) { |
if (*((uint32_t *) &addr[i][j]) == FS_SIGNATURE && mps_fs_check(&addr[i][j])) { |
fs = (struct mps_fs *) &addr[i][j]; |
goto fs_found; |
} |
} |
} |
return; |
fs_found: |
printf("%p: MPS Floating Pointer Structure\n", fs); |
if (fs->config_type == 0 && fs->configuration_table) { |
if (fs->mpfib2 >> 7) { |
printf("%s: PIC mode not supported\n", __func__); |
return; |
} |
ct = (struct mps_ct *)PA2KA((uintptr_t)fs->configuration_table); |
config.cpu_count = configure_via_ct(); |
} |
else |
config.cpu_count = configure_via_default(fs->config_type); |
return; |
} |
int configure_via_ct(void) |
{ |
uint8_t *cur; |
int i, cnt; |
if (ct->signature != CT_SIGNATURE) { |
printf("%s: bad ct->signature\n", __func__); |
return 1; |
} |
if (!mps_ct_check()) { |
printf("%s: bad ct checksum\n", __func__); |
return 1; |
} |
if (ct->oem_table) { |
printf("%s: ct->oem_table not supported\n", __func__); |
return 1; |
} |
l_apic = (uint32_t *)(uintptr_t)ct->l_apic; |
cnt = 0; |
cur = &ct->base_table[0]; |
for (i=0; i < ct->entry_count; i++) { |
switch (*cur) { |
/* Processor entry */ |
case 0: |
processor_entries = processor_entries ? processor_entries : (struct __processor_entry *) cur; |
processor_entry_cnt++; |
cnt += ct_processor_entry((struct __processor_entry *) cur); |
cur += 20; |
break; |
/* Bus entry */ |
case 1: |
bus_entries = bus_entries ? bus_entries : (struct __bus_entry *) cur; |
bus_entry_cnt++; |
ct_bus_entry((struct __bus_entry *) cur); |
cur += 8; |
break; |
/* I/O Apic */ |
case 2: |
io_apic_entries = io_apic_entries ? io_apic_entries : (struct __io_apic_entry *) cur; |
io_apic_entry_cnt++; |
ct_io_apic_entry((struct __io_apic_entry *) cur); |
cur += 8; |
break; |
/* I/O Interrupt Assignment */ |
case 3: |
io_intr_entries = io_intr_entries ? io_intr_entries : (struct __io_intr_entry *) cur; |
io_intr_entry_cnt++; |
ct_io_intr_entry((struct __io_intr_entry *) cur); |
cur += 8; |
break; |
/* Local Interrupt Assignment */ |
case 4: |
l_intr_entries = l_intr_entries ? l_intr_entries : (struct __l_intr_entry *) cur; |
l_intr_entry_cnt++; |
ct_l_intr_entry((struct __l_intr_entry *) cur); |
cur += 8; |
break; |
default: |
/* |
* Something is wrong. Fallback to UP mode. |
*/ |
printf("%s: ct badness\n", __func__); |
return 1; |
} |
} |
/* |
* Process extended entries. |
*/ |
ct_extended_entries(); |
return cnt; |
} |
int configure_via_default(uint8_t n) |
{ |
/* |
* Not yet implemented. |
*/ |
printf("%s: not supported\n", __func__); |
return 1; |
} |
int ct_processor_entry(struct __processor_entry *pr) |
{ |
/* |
* Ignore processors which are not marked enabled. |
*/ |
if ((pr->cpu_flags & (1<<0)) == 0) |
return 0; |
apic_id_mask |= (1<<pr->l_apic_id); |
return 1; |
} |
void ct_bus_entry(struct __bus_entry *bus) |
{ |
#ifdef MPSCT_VERBOSE |
char buf[7]; |
memcpy((void *) buf, (void *) bus->bus_type, 6); |
buf[6] = 0; |
printf("bus%d: %s\n", bus->bus_id, buf); |
#endif |
} |
void ct_io_apic_entry(struct __io_apic_entry *ioa) |
{ |
static int io_apic_count = 0; |
/* this ioapic is marked unusable */ |
if ((ioa->io_apic_flags & 1) == 0) |
return; |
if (io_apic_count++ > 0) { |
/* |
* Multiple IO APIC's are currently not supported. |
*/ |
return; |
} |
io_apic = (uint32_t *)(uintptr_t)ioa->io_apic; |
} |
//#define MPSCT_VERBOSE |
void ct_io_intr_entry(struct __io_intr_entry *iointr) |
{ |
#ifdef MPSCT_VERBOSE |
switch (iointr->intr_type) { |
case 0: printf("INT"); break; |
case 1: printf("NMI"); break; |
case 2: printf("SMI"); break; |
case 3: printf("ExtINT"); break; |
} |
putchar(','); |
switch (iointr->poel&3) { |
case 0: printf("bus-like"); break; |
case 1: printf("active high"); break; |
case 2: printf("reserved"); break; |
case 3: printf("active low"); break; |
} |
putchar(','); |
switch ((iointr->poel>>2)&3) { |
case 0: printf("bus-like"); break; |
case 1: printf("edge-triggered"); break; |
case 2: printf("reserved"); break; |
case 3: printf("level-triggered"); break; |
} |
putchar(','); |
printf("bus%d,irq%d", iointr->src_bus_id, iointr->src_bus_irq); |
putchar(','); |
printf("io_apic%d,pin%d", iointr->dst_io_apic_id, iointr->dst_io_apic_pin); |
putchar('\n'); |
#endif |
} |
void ct_l_intr_entry(struct __l_intr_entry *lintr) |
{ |
#ifdef MPSCT_VERBOSE |
switch (lintr->intr_type) { |
case 0: printf("INT"); break; |
case 1: printf("NMI"); break; |
case 2: printf("SMI"); break; |
case 3: printf("ExtINT"); break; |
} |
putchar(','); |
switch (lintr->poel&3) { |
case 0: printf("bus-like"); break; |
case 1: printf("active high"); break; |
case 2: printf("reserved"); break; |
case 3: printf("active low"); break; |
} |
putchar(','); |
switch ((lintr->poel>>2)&3) { |
case 0: printf("bus-like"); break; |
case 1: printf("edge-triggered"); break; |
case 2: printf("reserved"); break; |
case 3: printf("level-triggered"); break; |
} |
putchar(','); |
printf("bus%d,irq%d", lintr->src_bus_id, lintr->src_bus_irq); |
putchar(','); |
printf("l_apic%d,pin%d", lintr->dst_l_apic_id, lintr->dst_l_apic_pin); |
putchar('\n'); |
#endif |
} |
void ct_extended_entries(void) |
{ |
uint8_t *ext = (uint8_t *) ct + ct->base_table_length; |
uint8_t *cur; |
for (cur = ext; cur < ext + ct->ext_table_length; cur += cur[CT_EXT_ENTRY_LEN]) { |
switch (cur[CT_EXT_ENTRY_TYPE]) { |
default: |
printf("%p: skipping MP Configuration Table extended entry type %d\n", cur, cur[CT_EXT_ENTRY_TYPE]); |
break; |
} |
} |
} |
int mps_irq_to_pin(unsigned int irq) |
{ |
unsigned int i; |
for (i = 0; i < io_intr_entry_cnt; i++) { |
if (io_intr_entries[i].src_bus_irq == irq && io_intr_entries[i].intr_type == 0) |
return io_intr_entries[i].dst_io_apic_pin; |
} |
return -1; |
} |
#endif /* CONFIG_SMP */ |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/smp/apic.c |
---|
0,0 → 1,581 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/types.h> |
#include <arch/smp/apic.h> |
#include <arch/smp/ap.h> |
#include <arch/smp/mps.h> |
#include <mm/page.h> |
#include <time/delay.h> |
#include <interrupt.h> |
#include <arch/interrupt.h> |
#include <print.h> |
#include <arch/asm.h> |
#include <arch.h> |
#ifdef CONFIG_SMP |
/* |
* Advanced Programmable Interrupt Controller for SMP systems. |
* Tested on: |
* Bochs 2.0.2 - Bochs 2.2.6 with 2-8 CPUs |
* Simics 2.0.28 - Simics 2.2.19 2-15 CPUs |
* VMware Workstation 5.5 with 2 CPUs |
* QEMU 0.8.0 with 2-15 CPUs |
* ASUS P/I-P65UP5 + ASUS C-P55T2D REV. 1.41 with 2x 200Mhz Pentium CPUs |
* ASUS PCH-DL with 2x 3000Mhz Pentium 4 Xeon (HT) CPUs |
* MSI K7D Master-L with 2x 2100MHz Athlon MP CPUs |
*/ |
/* |
* These variables either stay configured as initilalized, or are changed by |
* the MP configuration code. |
* |
* Pay special attention to the volatile keyword. Without it, gcc -O2 would |
* optimize the code too much and accesses to l_apic and io_apic, that must |
* always be 32-bit, would use byte oriented instructions. |
*/ |
volatile uint32_t *l_apic = (uint32_t *) 0xfee00000; |
volatile uint32_t *io_apic = (uint32_t *) 0xfec00000; |
uint32_t apic_id_mask = 0; |
static int apic_poll_errors(void); |
#ifdef LAPIC_VERBOSE |
static char *delmod_str[] = { |
"Fixed", |
"Lowest Priority", |
"SMI", |
"Reserved", |
"NMI", |
"INIT", |
"STARTUP", |
"ExtInt" |
}; |
static char *destmod_str[] = { |
"Physical", |
"Logical" |
}; |
static char *trigmod_str[] = { |
"Edge", |
"Level" |
}; |
static char *mask_str[] = { |
"Unmasked", |
"Masked" |
}; |
static char *delivs_str[] = { |
"Idle", |
"Send Pending" |
}; |
static char *tm_mode_str[] = { |
"One-shot", |
"Periodic" |
}; |
static char *intpol_str[] = { |
"Polarity High", |
"Polarity Low" |
}; |
#endif /* LAPIC_VERBOSE */ |
static void apic_spurious(int n, istate_t *istate); |
static void l_apic_timer_interrupt(int n, istate_t *istate); |
/** Initialize APIC on BSP. */ |
void apic_init(void) |
{ |
io_apic_id_t idreg; |
unsigned int i; |
exc_register(VECTOR_APIC_SPUR, "apic_spurious", (iroutine) apic_spurious); |
enable_irqs_function = io_apic_enable_irqs; |
disable_irqs_function = io_apic_disable_irqs; |
eoi_function = l_apic_eoi; |
/* |
* Configure interrupt routing. |
* IRQ 0 remains masked as the time signal is generated by l_apic's themselves. |
* Other interrupts will be forwarded to the lowest priority CPU. |
*/ |
io_apic_disable_irqs(0xffff); |
exc_register(VECTOR_CLK, "l_apic_timer", (iroutine) l_apic_timer_interrupt); |
for (i = 0; i < IRQ_COUNT; i++) { |
int pin; |
if ((pin = smp_irq_to_pin(i)) != -1) { |
io_apic_change_ioredtbl(pin, DEST_ALL, IVT_IRQBASE+i, LOPRI); |
} |
} |
/* |
* Ensure that io_apic has unique ID. |
*/ |
idreg.value = io_apic_read(IOAPICID); |
if ((1 << idreg.apic_id) & apic_id_mask) { /* see if IO APIC ID is used already */ |
for (i = 0; i < APIC_ID_COUNT; i++) { |
if (!((1<<i) & apic_id_mask)) { |
idreg.apic_id = i; |
io_apic_write(IOAPICID, idreg.value); |
break; |
} |
} |
} |
/* |
* Configure the BSP's lapic. |
*/ |
l_apic_init(); |
l_apic_debug(); |
} |
/** APIC spurious interrupt handler. |
* |
* @param n Interrupt vector. |
* @param istate Interrupted state. |
*/ |
void apic_spurious(int n, istate_t *istate) |
{ |
#ifdef CONFIG_DEBUG |
printf("cpu%d: APIC spurious interrupt\n", CPU->id); |
#endif |
} |
/** Poll for APIC errors. |
* |
* Examine Error Status Register and report all errors found. |
* |
* @return 0 on error, 1 on success. |
*/ |
int apic_poll_errors(void) |
{ |
esr_t esr; |
esr.value = l_apic[ESR]; |
if (esr.send_checksum_error) |
printf("Send Checksum Error\n"); |
if (esr.receive_checksum_error) |
printf("Receive Checksum Error\n"); |
if (esr.send_accept_error) |
printf("Send Accept Error\n"); |
if (esr.receive_accept_error) |
printf("Receive Accept Error\n"); |
if (esr.send_illegal_vector) |
printf("Send Illegal Vector\n"); |
if (esr.received_illegal_vector) |
printf("Received Illegal Vector\n"); |
if (esr.illegal_register_address) |
printf("Illegal Register Address\n"); |
return !esr.err_bitmap; |
} |
/** Send all CPUs excluding CPU IPI vector. |
* |
* @param vector Interrupt vector to be sent. |
* |
* @return 0 on failure, 1 on success. |
*/ |
int l_apic_broadcast_custom_ipi(uint8_t vector) |
{ |
icr_t icr; |
icr.lo = l_apic[ICRlo]; |
icr.delmod = DELMOD_FIXED; |
icr.destmod = DESTMOD_LOGIC; |
icr.level = LEVEL_ASSERT; |
icr.shorthand = SHORTHAND_ALL_EXCL; |
icr.trigger_mode = TRIGMOD_LEVEL; |
icr.vector = vector; |
l_apic[ICRlo] = icr.lo; |
icr.lo = l_apic[ICRlo]; |
if (icr.delivs == DELIVS_PENDING) { |
#ifdef CONFIG_DEBUG |
printf("IPI is pending.\n"); |
#endif |
} |
return apic_poll_errors(); |
} |
/** Universal Start-up Algorithm for bringing up the AP processors. |
* |
* @param apicid APIC ID of the processor to be brought up. |
* |
* @return 0 on failure, 1 on success. |
*/ |
int l_apic_send_init_ipi(uint8_t apicid) |
{ |
icr_t icr; |
int i; |
/* |
* Read the ICR register in and zero all non-reserved fields. |
*/ |
icr.lo = l_apic[ICRlo]; |
icr.hi = l_apic[ICRhi]; |
icr.delmod = DELMOD_INIT; |
icr.destmod = DESTMOD_PHYS; |
icr.level = LEVEL_ASSERT; |
icr.trigger_mode = TRIGMOD_LEVEL; |
icr.shorthand = SHORTHAND_NONE; |
icr.vector = 0; |
icr.dest = apicid; |
l_apic[ICRhi] = icr.hi; |
l_apic[ICRlo] = icr.lo; |
/* |
* According to MP Specification, 20us should be enough to |
* deliver the IPI. |
*/ |
delay(20); |
if (!apic_poll_errors()) |
return 0; |
icr.lo = l_apic[ICRlo]; |
if (icr.delivs == DELIVS_PENDING) { |
#ifdef CONFIG_DEBUG |
printf("IPI is pending.\n"); |
#endif |
} |
icr.delmod = DELMOD_INIT; |
icr.destmod = DESTMOD_PHYS; |
icr.level = LEVEL_DEASSERT; |
icr.shorthand = SHORTHAND_NONE; |
icr.trigger_mode = TRIGMOD_LEVEL; |
icr.vector = 0; |
l_apic[ICRlo] = icr.lo; |
/* |
* Wait 10ms as MP Specification specifies. |
*/ |
delay(10000); |
if (!is_82489DX_apic(l_apic[LAVR])) { |
/* |
* If this is not 82489DX-based l_apic we must send two STARTUP IPI's. |
*/ |
for (i = 0; i < 2; i++) { |
icr.lo = l_apic[ICRlo]; |
icr.delmod = DELMOD_STARTUP; |
icr.destmod = DESTMOD_PHYS; |
icr.level = LEVEL_ASSERT; |
icr.shorthand = SHORTHAND_NONE; |
icr.trigger_mode = TRIGMOD_LEVEL; |
l_apic[ICRlo] = icr.lo; |
delay(200); |
} |
} |
return apic_poll_errors(); |
} |
/** Initialize Local APIC. */ |
void l_apic_init(void) |
{ |
lvt_error_t error; |
lvt_lint_t lint; |
tpr_t tpr; |
svr_t svr; |
icr_t icr; |
tdcr_t tdcr; |
lvt_tm_t tm; |
ldr_t ldr; |
dfr_t dfr; |
uint32_t t1, t2; |
/* Initialize LVT Error register. */ |
error.value = l_apic[LVT_Err]; |
error.masked = true; |
l_apic[LVT_Err] = error.value; |
/* Initialize LVT LINT0 register. */ |
lint.value = l_apic[LVT_LINT0]; |
lint.masked = true; |
l_apic[LVT_LINT0] = lint.value; |
/* Initialize LVT LINT1 register. */ |
lint.value = l_apic[LVT_LINT1]; |
lint.masked = true; |
l_apic[LVT_LINT1] = lint.value; |
/* Task Priority Register initialization. */ |
tpr.value = l_apic[TPR]; |
tpr.pri_sc = 0; |
tpr.pri = 0; |
l_apic[TPR] = tpr.value; |
/* Spurious-Interrupt Vector Register initialization. */ |
svr.value = l_apic[SVR]; |
svr.vector = VECTOR_APIC_SPUR; |
svr.lapic_enabled = true; |
svr.focus_checking = true; |
l_apic[SVR] = svr.value; |
if (CPU->arch.family >= 6) |
enable_l_apic_in_msr(); |
/* Interrupt Command Register initialization. */ |
icr.lo = l_apic[ICRlo]; |
icr.delmod = DELMOD_INIT; |
icr.destmod = DESTMOD_PHYS; |
icr.level = LEVEL_DEASSERT; |
icr.shorthand = SHORTHAND_ALL_INCL; |
icr.trigger_mode = TRIGMOD_LEVEL; |
l_apic[ICRlo] = icr.lo; |
/* Timer Divide Configuration Register initialization. */ |
tdcr.value = l_apic[TDCR]; |
tdcr.div_value = DIVIDE_1; |
l_apic[TDCR] = tdcr.value; |
/* Program local timer. */ |
tm.value = l_apic[LVT_Tm]; |
tm.vector = VECTOR_CLK; |
tm.mode = TIMER_PERIODIC; |
tm.masked = false; |
l_apic[LVT_Tm] = tm.value; |
/* |
* Measure and configure the timer to generate timer |
* interrupt with period 1s/HZ seconds. |
*/ |
t1 = l_apic[CCRT]; |
l_apic[ICRT] = 0xffffffff; |
while (l_apic[CCRT] == t1) |
; |
t1 = l_apic[CCRT]; |
delay(1000000/HZ); |
t2 = l_apic[CCRT]; |
l_apic[ICRT] = t1-t2; |
/* Program Logical Destination Register. */ |
ldr.value = l_apic[LDR]; |
if (CPU->id < sizeof(CPU->id) * 8) /* size in bits */ |
ldr.id = (1 << CPU->id); |
l_apic[LDR] = ldr.value; |
/* Program Destination Format Register for Flat mode. */ |
dfr.value = l_apic[DFR]; |
dfr.model = MODEL_FLAT; |
l_apic[DFR] = dfr.value; |
} |
/** Local APIC End of Interrupt. */ |
void l_apic_eoi(void) |
{ |
l_apic[EOI] = 0; |
} |
/** Dump content of Local APIC registers. */ |
void l_apic_debug(void) |
{ |
#ifdef LAPIC_VERBOSE |
lvt_tm_t tm; |
lvt_lint_t lint; |
lvt_error_t error; |
printf("LVT on cpu%d, LAPIC ID: %d\n", CPU->id, l_apic_id()); |
tm.value = l_apic[LVT_Tm]; |
printf("LVT Tm: vector=%hhd, %s, %s, %s\n", tm.vector, delivs_str[tm.delivs], mask_str[tm.masked], tm_mode_str[tm.mode]); |
lint.value = l_apic[LVT_LINT0]; |
printf("LVT LINT0: vector=%hhd, %s, %s, %s, irr=%d, %s, %s\n", tm.vector, delmod_str[lint.delmod], delivs_str[lint.delivs], intpol_str[lint.intpol], lint.irr, trigmod_str[lint.trigger_mode], mask_str[lint.masked]); |
lint.value = l_apic[LVT_LINT1]; |
printf("LVT LINT1: vector=%hhd, %s, %s, %s, irr=%d, %s, %s\n", tm.vector, delmod_str[lint.delmod], delivs_str[lint.delivs], intpol_str[lint.intpol], lint.irr, trigmod_str[lint.trigger_mode], mask_str[lint.masked]); |
error.value = l_apic[LVT_Err]; |
printf("LVT Err: vector=%hhd, %s, %s\n", error.vector, delivs_str[error.delivs], mask_str[error.masked]); |
#endif |
} |
/** Local APIC Timer Interrupt. |
* |
* @param n Interrupt vector number. |
* @param istate Interrupted state. |
*/ |
void l_apic_timer_interrupt(int n, istate_t *istate) |
{ |
l_apic_eoi(); |
clock(); |
} |
/** Get Local APIC ID. |
* |
* @return Local APIC ID. |
*/ |
uint8_t l_apic_id(void) |
{ |
l_apic_id_t idreg; |
idreg.value = l_apic[L_APIC_ID]; |
return idreg.apic_id; |
} |
/** Read from IO APIC register. |
* |
* @param address IO APIC register address. |
* |
* @return Content of the addressed IO APIC register. |
*/ |
uint32_t io_apic_read(uint8_t address) |
{ |
io_regsel_t regsel; |
regsel.value = io_apic[IOREGSEL]; |
regsel.reg_addr = address; |
io_apic[IOREGSEL] = regsel.value; |
return io_apic[IOWIN]; |
} |
/** Write to IO APIC register. |
* |
* @param address IO APIC register address. |
* @param x Content to be written to the addressed IO APIC register. |
*/ |
void io_apic_write(uint8_t address, uint32_t x) |
{ |
io_regsel_t regsel; |
regsel.value = io_apic[IOREGSEL]; |
regsel.reg_addr = address; |
io_apic[IOREGSEL] = regsel.value; |
io_apic[IOWIN] = x; |
} |
/** Change some attributes of one item in I/O Redirection Table. |
* |
* @param pin IO APIC pin number. |
* @param dest Interrupt destination address. |
* @param v Interrupt vector to trigger. |
* @param flags Flags. |
*/ |
void io_apic_change_ioredtbl(uint8_t pin, uint8_t dest, uint8_t v, int flags) |
{ |
io_redirection_reg_t reg; |
int dlvr = DELMOD_FIXED; |
if (flags & LOPRI) |
dlvr = DELMOD_LOWPRI; |
reg.lo = io_apic_read(IOREDTBL + pin * 2); |
reg.hi = io_apic_read(IOREDTBL + pin * 2 + 1); |
reg.dest = dest; |
reg.destmod = DESTMOD_LOGIC; |
reg.trigger_mode = TRIGMOD_EDGE; |
reg.intpol = POLARITY_HIGH; |
reg.delmod = dlvr; |
reg.intvec = v; |
io_apic_write(IOREDTBL + pin * 2, reg.lo); |
io_apic_write(IOREDTBL + pin * 2 + 1, reg.hi); |
} |
/** Mask IRQs in IO APIC. |
* |
* @param irqmask Bitmask of IRQs to be masked (0 = do not mask, 1 = mask). |
*/ |
void io_apic_disable_irqs(uint16_t irqmask) |
{ |
io_redirection_reg_t reg; |
unsigned int i; |
int pin; |
for (i = 0; i < 16; i++) { |
if (irqmask & (1 << i)) { |
/* |
* Mask the signal input in IO APIC if there is a |
* mapping for the respective IRQ number. |
*/ |
pin = smp_irq_to_pin(i); |
if (pin != -1) { |
reg.lo = io_apic_read(IOREDTBL + pin * 2); |
reg.masked = true; |
io_apic_write(IOREDTBL + pin*2, reg.lo); |
} |
} |
} |
} |
/** Unmask IRQs in IO APIC. |
* |
* @param irqmask Bitmask of IRQs to be unmasked (0 = do not unmask, 1 = unmask). |
*/ |
void io_apic_enable_irqs(uint16_t irqmask) |
{ |
unsigned int i; |
int pin; |
io_redirection_reg_t reg; |
for (i = 0; i < 16; i++) { |
if (irqmask & (1 << i)) { |
/* |
* Unmask the signal input in IO APIC if there is a |
* mapping for the respective IRQ number. |
*/ |
pin = smp_irq_to_pin(i); |
if (pin != -1) { |
reg.lo = io_apic_read(IOREDTBL + pin * 2); |
reg.masked = false; |
io_apic_write(IOREDTBL + pin*2, reg.lo); |
} |
} |
} |
} |
#endif /* CONFIG_SMP */ |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/smp/ipi.c |
---|
0,0 → 1,48 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#ifdef CONFIG_SMP |
#include <smp/ipi.h> |
#include <arch/smp/apic.h> |
void ipi_broadcast_arch(int ipi) |
{ |
(void) l_apic_broadcast_custom_ipi((uint8_t) ipi); |
} |
#endif /* CONFIG_SMP */ |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/context.S |
---|
0,0 → 1,0 |
link ../../ia32/src/context.S |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/src/mm/tlb.c |
---|
0,0 → 1,75 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
* @ingroup ia32xen_mm |
*/ |
#include <mm/tlb.h> |
#include <arch/mm/asid.h> |
#include <arch/asm.h> |
#include <arch/types.h> |
#include <arch/hypercall.h> |
/** Invalidate all entries in TLB. */ |
void tlb_invalidate_all(void) |
{ |
mmuext_op_t mmu_ext; |
mmu_ext.cmd = MMUEXT_TLB_FLUSH_LOCAL; |
xen_mmuext_op(&mmu_ext, 1, NULL, DOMID_SELF); |
} |
/** Invalidate all entries in TLB that belong to specified address space. |
* |
* @param asid This parameter is ignored as the architecture doesn't support it. |
*/ |
void tlb_invalidate_asid(asid_t asid) |
{ |
tlb_invalidate_all(); |
} |
/** Invalidate TLB entries for specified page range belonging to specified address space. |
* |
* @param asid This parameter is ignored as the architecture doesn't support it. |
* @param page Address of the first page whose entry is to be invalidated. |
* @param cnt Number of entries to invalidate. |
*/ |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
{ |
unsigned int i; |
for (i = 0; i < cnt; i++) |
invlpg(page + i * PAGE_SIZE); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/mm/frame.c |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
* @ingroup ia32xen_mm |
*/ |
#include <mm/frame.h> |
#include <config.h> |
void physmem_print(void) |
{ |
printf("Base Size Reserved\n"); |
printf("---------- ---------- ---------\n"); |
printf("%#10x %#10x %#10x\n", PFN2ADDR(meminfo.start), |
PFN2ADDR(meminfo.size), PFN2ADDR(meminfo.reserved)); |
} |
void frame_arch_init(void) |
{ |
if (config.cpu_active == 1) { |
/* The only memory zone */ |
zone_create(meminfo.start, meminfo.size, meminfo.start + meminfo.reserved, 0); |
frame_mark_unavailable(meminfo.start, meminfo.reserved); |
} |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/mm/page.c |
---|
0,0 → 1,86 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/mm/page.h> |
#include <genarch/mm/page_pt.h> |
#include <arch/mm/frame.h> |
#include <mm/frame.h> |
#include <mm/page.h> |
#include <mm/as.h> |
#include <arch/types.h> |
#include <align.h> |
#include <config.h> |
#include <func.h> |
#include <arch/interrupt.h> |
#include <arch/asm.h> |
#include <debug.h> |
#include <memstr.h> |
#include <print.h> |
#include <interrupt.h> |
void page_arch_init(void) |
{ |
if (config.cpu_active == 1) { |
page_mapping_operations = &pt_mapping_operations; |
AS_KERNEL->genarch.page_table = (pte_t *) KA2PA(start_info.ptl0); |
} else |
SET_PTL0_ADDRESS_ARCH(AS_KERNEL->genarch.page_table); |
} |
void page_fault(int n, istate_t *istate) |
{ |
uintptr_t page; |
pf_access_t access; |
page = read_cr2(); |
if (istate->error_word & PFERR_CODE_RSVD) |
panic("Reserved bit set in page directory.\n"); |
if (istate->error_word & PFERR_CODE_RW) |
access = PF_ACCESS_WRITE; |
else |
access = PF_ACCESS_READ; |
if (as_page_fault(page, access, istate) == AS_PF_FAULT) { |
fault_if_from_uspace(istate, "Page fault: %#x", page); |
decode_istate(istate); |
printf("page fault address: %#x\n", page); |
panic("page fault\n"); |
} |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/mm/as.c |
---|
0,0 → 1,46 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
* @ingroup ia32xen_mm |
*/ |
#include <arch/mm/as.h> |
#include <genarch/mm/page_pt.h> |
/** Architecture dependent address space init. */ |
void as_arch_init(void) |
{ |
as_operations = &as_pt_operations; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/interrupt.c |
---|
0,0 → 1,248 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_interrupt |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/interrupt.h> |
#include <syscall/syscall.h> |
#include <print.h> |
#include <debug.h> |
#include <panic.h> |
#include <func.h> |
#include <cpu.h> |
#include <arch/asm.h> |
#include <mm/tlb.h> |
#include <mm/as.h> |
#include <arch.h> |
#include <symtab.h> |
#include <proc/thread.h> |
#include <proc/task.h> |
#include <synch/spinlock.h> |
#include <arch/ddi/ddi.h> |
#include <ipc/sysipc.h> |
#include <interrupt.h> |
#include <ddi/irq.h> |
/* |
* Interrupt and exception dispatching. |
*/ |
void (* disable_irqs_function)(uint16_t irqmask) = NULL; |
void (* enable_irqs_function)(uint16_t irqmask) = NULL; |
void (* eoi_function)(void) = NULL; |
void decode_istate(istate_t *istate) |
{ |
char *symbol = get_symtab_entry(istate->eip); |
if (!symbol) |
symbol = ""; |
if (CPU) |
printf("----------------EXCEPTION OCCURED (cpu%d)----------------\n", CPU->id); |
else |
printf("----------------EXCEPTION OCCURED----------------\n"); |
printf("%%eip: %#x (%s)\n",istate->eip,symbol); |
printf("ERROR_WORD=%#x\n", istate->error_word); |
printf("%%cs=%#x,flags=%#x\n", istate->cs, istate->eflags); |
printf("%%eax=%#x, %%ecx=%#x, %%edx=%#x, %%esp=%#x\n", istate->eax,istate->ecx,istate->edx,&istate->stack[0]); |
#ifdef CONFIG_DEBUG_ALLREGS |
printf("%%esi=%#x, %%edi=%#x, %%ebp=%#x, %%ebx=%#x\n", istate->esi,istate->edi,istate->ebp,istate->ebx); |
#endif |
printf("stack: %#x, %#x, %#x, %#x\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]); |
printf(" %#x, %#x, %#x, %#x\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]); |
} |
static void trap_virtual_eoi(void) |
{ |
if (eoi_function) |
eoi_function(); |
else |
panic("no eoi_function\n"); |
} |
static void null_interrupt(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "unserviced interrupt: %d", n); |
decode_istate(istate); |
panic("unserviced interrupt: %d\n", n); |
} |
/** General Protection Fault. */ |
static void gp_fault(int n, istate_t *istate) |
{ |
if (TASK) { |
count_t ver; |
spinlock_lock(&TASK->lock); |
ver = TASK->arch.iomapver; |
spinlock_unlock(&TASK->lock); |
if (CPU->arch.iomapver_copy != ver) { |
/* |
* This fault can be caused by an early access |
* to I/O port because of an out-dated |
* I/O Permission bitmap installed on CPU. |
* Install the fresh copy and restart |
* the instruction. |
*/ |
io_perm_bitmap_install(); |
return; |
} |
fault_if_from_uspace(istate, "general protection fault"); |
} |
decode_istate(istate); |
panic("general protection fault\n"); |
} |
static void ss_fault(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "stack fault"); |
decode_istate(istate); |
panic("stack fault\n"); |
} |
static void simd_fp_exception(int n, istate_t *istate) |
{ |
uint32_t mxcsr; |
asm |
( |
"stmxcsr %0;\n" |
:"=m"(mxcsr) |
); |
fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zx", |
(unative_t)mxcsr); |
decode_istate(istate); |
printf("MXCSR: %#zx\n",(unative_t)(mxcsr)); |
panic("SIMD FP exception(19)\n"); |
} |
static void nm_fault(int n, istate_t *istate) |
{ |
#ifdef CONFIG_FPU_LAZY |
scheduler_fpu_lazy_request(); |
#else |
fault_if_from_uspace(istate, "fpu fault"); |
panic("fpu fault"); |
#endif |
} |
#ifdef CONFIG_SMP |
static void tlb_shootdown_ipi(int n, istate_t *istate) |
{ |
trap_virtual_eoi(); |
tlb_shootdown_ipi_recv(); |
} |
#endif |
/** Handler of IRQ exceptions */ |
static void irq_interrupt(int n, istate_t *istate) |
{ |
ASSERT(n >= IVT_IRQBASE); |
int inum = n - IVT_IRQBASE; |
bool ack = false; |
ASSERT(inum < IRQ_COUNT); |
ASSERT((inum != IRQ_PIC_SPUR) && (inum != IRQ_PIC1)); |
irq_t *irq = irq_dispatch_and_lock(inum); |
if (irq) { |
/* |
* The IRQ handler was found. |
*/ |
if (irq->preack) { |
/* Send EOI before processing the interrupt */ |
trap_virtual_eoi(); |
ack = true; |
} |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
/* |
* Spurious interrupt. |
*/ |
#ifdef CONFIG_DEBUG |
printf("cpu%d: spurious interrupt (inum=%d)\n", CPU->id, inum); |
#endif |
} |
if (!ack) |
trap_virtual_eoi(); |
} |
void interrupt_init(void) |
{ |
int i; |
for (i = 0; i < IVT_ITEMS; i++) |
exc_register(i, "null", (iroutine) null_interrupt); |
for (i = 0; i < IRQ_COUNT; i++) { |
if ((i != IRQ_PIC_SPUR) && (i != IRQ_PIC1)) |
exc_register(IVT_IRQBASE + i, "irq", (iroutine) irq_interrupt); |
} |
exc_register(7, "nm_fault", (iroutine) nm_fault); |
exc_register(12, "ss_fault", (iroutine) ss_fault); |
exc_register(13, "gp_fault", (iroutine) gp_fault); |
exc_register(19, "simd_fp", (iroutine) simd_fp_exception); |
#ifdef CONFIG_SMP |
exc_register(VECTOR_TLB_SHOOTDOWN_IPI, "tlb_shootdown", (iroutine) tlb_shootdown_ipi); |
#endif |
} |
void trap_virtual_enable_irqs(uint16_t irqmask) |
{ |
if (enable_irqs_function) |
enable_irqs_function(irqmask); |
else |
panic("no enable_irqs_function\n"); |
} |
void trap_virtual_disable_irqs(uint16_t irqmask) |
{ |
if (disable_irqs_function) |
disable_irqs_function(irqmask); |
else |
panic("no disable_irqs_function\n"); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/boot/boot.S |
---|
0,0 → 1,102 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include <arch/mm/page.h> |
#include <arch/hypercall.h> |
#define ELFNOTE(name, type, desctype, descval) \ |
.section .note.name; \ |
.align 4; \ |
.long 2f - 1f; \ |
.long 4f - 3f; \ |
.long type; \ |
1:.asciz #name; \ |
2:.align 4; \ |
3:desctype descval; \ |
4:.align 4 |
ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz, "HelenOS") |
ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz, RELEASE) |
ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz, "xen-3.0") |
ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .long, PA2KA(BOOT_OFFSET)) |
ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, .long, 0) |
ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long, kernel_image_start) |
ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long, hypercall_page) |
ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "auto_translated_physmap|supervisor_mode_kernel") |
ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz, "no") |
ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic") |
.text |
.code32 |
.align 4 |
.global kernel_image_start |
kernel_image_start: |
# copy start_info (esi initialized by Xen) |
movl $start_info, %edi |
movl $START_INFO_SIZE >> 2, %ecx |
cld |
rep movsb |
# switch to temporal kernel stack |
movl $kernel_stack, %esp |
call arch_pre_main |
call main_bsp # never returns |
cli |
hlt |
kernel_stack_bottom: |
.space TEMP_STACK_SIZE |
kernel_stack: |
.section K_TEXT_START, "aw", @progbits |
.global hypercall_page |
.org 0 |
hypercall_page: |
.space PAGE_SIZE |
.global shared_info |
.org 0x1000 |
shared_info: |
.space PAGE_SIZE |
.global console_page |
.org 0x2000 |
console_page: |
.space PAGE_SIZE |
# Xen 3.0.3 ELF loader is somehow buggy |
# thus this workaround |
.global dummy_fill |
dummy_fill: |
.space (1024 * 1024) |
/branches/arm/kernel/arch/ia32xen/src/proc/scheduler.c |
---|
0,0 → 1,81 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_proc |
* @{ |
*/ |
/** @file |
*/ |
#include <proc/scheduler.h> |
#include <cpu.h> |
#include <proc/task.h> |
#include <proc/thread.h> |
#include <arch.h> |
#include <arch/context.h> /* SP_DELTA */ |
#include <arch/debugger.h> |
#include <arch/pm.h> |
#include <arch/asm.h> |
#include <arch/ddi/ddi.h> |
/** Perform ia32 specific tasks needed before the new task is run. |
* |
* Interrupts are disabled. |
*/ |
void before_task_runs_arch(void) |
{ |
// io_perm_bitmap_install(); |
} |
/** Perform ia32 specific tasks needed before the new thread is scheduled. |
* |
* THREAD is locked and interrupts are disabled. |
*/ |
void before_thread_runs_arch(void) |
{ |
CPU->arch.tss->esp0 = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA]; |
CPU->arch.tss->ss0 = selector(KDATA_DES); |
/* Set up TLS in GS register */ |
// set_tls_desc(THREAD->arch.tls); |
#ifdef CONFIG_DEBUG_AS_WATCHPOINT |
/* Set watchpoint on AS to ensure that nobody sets it to zero */ |
if (CPU->id < BKPOINTS_MAX) |
breakpoint_add(&((the_t *) THREAD->kstack)->as, |
BKPOINT_WRITE | BKPOINT_CHECK_ZERO, |
CPU->id); |
#endif |
} |
void after_thread_ran_arch(void) |
{ |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/proc/task.c |
---|
0,0 → 1,61 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_proc |
* @{ |
*/ |
/** @file |
*/ |
#include <proc/task.h> |
#include <arch/types.h> |
#include <adt/bitmap.h> |
#include <mm/slab.h> |
/** Perform ia32 specific task initialization. |
* |
* @param t Task to be initialized. |
*/ |
void task_create_arch(task_t *t) |
{ |
t->arch.iomapver = 0; |
bitmap_initialize(&t->arch.iomap, NULL, 0); |
} |
/** Perform ia32 specific task destruction. |
* |
* @param t Task to be initialized. |
*/ |
void task_destroy_arch(task_t *t) |
{ |
if (t->arch.iomap.map) |
free(t->arch.iomap.map); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/proc/thread.c |
---|
0,0 → 1,47 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_proc |
* @{ |
*/ |
/** @file |
*/ |
#include <proc/thread.h> |
/** Perform ia32xen specific thread initialization. |
* |
* @param t Thread to be initialized. |
*/ |
void thread_create_arch(thread_t *t) |
{ |
t->arch.tls = 0; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/drivers/xconsole.c |
---|
0,0 → 1,83 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** |
* @file |
* @brief ia32xen console driver. |
*/ |
#include <arch/drivers/xconsole.h> |
#include <putchar.h> |
#include <console/chardev.h> |
#include <console/console.h> |
#include <arch/hypercall.h> |
#define MASK_INDEX(index, ring) ((index) & (sizeof(ring) - 1)) |
static void xen_putchar(chardev_t *d, const char ch); |
chardev_t xen_console; |
static chardev_operations_t xen_ops = { |
.write = xen_putchar |
}; |
void xen_console_init(void) |
{ |
chardev_initialize("xen_out", &xen_console, &xen_ops); |
stdout = &xen_console; |
} |
void xen_putchar(chardev_t *d, const char ch) |
{ |
if (start_info.console.domU.evtchn != 0) { |
uint32_t cons = console_page.out_cons; |
uint32_t prod = console_page.out_prod; |
memory_barrier(); |
if ((prod - cons) > sizeof(console_page.out)) |
return; |
if (ch == '\n') |
console_page.out[MASK_INDEX(prod++, console_page.out)] = '\r'; |
console_page.out[MASK_INDEX(prod++, console_page.out)] = ch; |
write_barrier(); |
console_page.out_prod = prod; |
xen_notify_remote(start_info.console.domU.evtchn); |
} else |
xen_console_io(CONSOLE_IO_WRITE, 1, &ch); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/src/fpu_context.c |
---|
0,0 → 1,0 |
link ../../ia32/src/fpu_context.c |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/src/debug |
---|
0,0 → 1,0 |
link ../../ia32/src/debug |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/src/cpu |
---|
0,0 → 1,0 |
link ../../ia32/src/cpu |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/src/bios |
---|
0,0 → 1,0 |
link ../../ia32/src/bios |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/src/delay.s |
---|
0,0 → 1,0 |
link ../../ia32/src/delay.s |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/src/ddi |
---|
0,0 → 1,0 |
link ../../ia32/src/ddi |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/src/debugger.c |
---|
0,0 → 1,0 |
link ../../ia32/src/debugger.c |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/src/atomic.S |
---|
0,0 → 1,0 |
link ../../ia32/src/atomic.S |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/mm/page.h |
---|
0,0 → 1,257 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32xen_PAGE_H_ |
#define KERN_ia32xen_PAGE_H_ |
#include <arch/mm/frame.h> |
#define PAGE_WIDTH FRAME_WIDTH |
#define PAGE_SIZE FRAME_SIZE |
#ifdef KERNEL |
#ifndef __ASM__ |
# define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) |
# define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) |
#else |
# define KA2PA(x) ((x) - 0x80000000) |
# define PA2KA(x) ((x) + 0x80000000) |
#endif |
/* |
* Implementation of generic 4-level page table interface. |
* IA-32 has 2-level page tables, so PTL1 and PTL2 are left out. |
*/ |
/* Number of entries in each level. */ |
#define PTL0_ENTRIES_ARCH 1024 |
#define PTL1_ENTRIES_ARCH 0 |
#define PTL2_ENTRIES_ARCH 0 |
#define PTL3_ENTRIES_ARCH 1024 |
/* Page table size for each level. */ |
#define PTL0_SIZE_ARCH ONE_FRAME |
#define PTL1_SIZE_ARCH 0 |
#define PTL2_SIZE_ARCH 0 |
#define PTL3_SIZE_ARCH ONE_FRAME |
/* Macros calculating indices into page tables in each level. */ |
#define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 22) & 0x3ff) |
#define PTL1_INDEX_ARCH(vaddr) 0 |
#define PTL2_INDEX_ARCH(vaddr) 0 |
#define PTL3_INDEX_ARCH(vaddr) (((vaddr) >> 12) & 0x3ff) |
/* Get PTE address accessors for each level. */ |
#define GET_PTL1_ADDRESS_ARCH(ptl0, i) \ |
((pte_t *) MA2PA((((pte_t *) (ptl0))[(i)].frame_address) << 12)) |
#define GET_PTL2_ADDRESS_ARCH(ptl1, i) \ |
(ptl1) |
#define GET_PTL3_ADDRESS_ARCH(ptl2, i) \ |
(ptl2) |
#define GET_FRAME_ADDRESS_ARCH(ptl3, i) \ |
((uintptr_t) MA2PA((((pte_t *) (ptl3))[(i)].frame_address) << 12)) |
/* Set PTE address accessors for each level. */ |
#define SET_PTL0_ADDRESS_ARCH(ptl0) \ |
{ \ |
mmuext_op_t mmu_ext; \ |
\ |
mmu_ext.cmd = MMUEXT_NEW_BASEPTR; \ |
mmu_ext.mfn = ADDR2PFN(PA2MA(ptl0)); \ |
ASSERT(xen_mmuext_op(&mmu_ext, 1, NULL, DOMID_SELF) == 0); \ |
} |
#define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \ |
{ \ |
mmuext_op_t mmu_ext; \ |
\ |
mmu_ext.cmd = MMUEXT_PIN_L1_TABLE; \ |
mmu_ext.mfn = ADDR2PFN(PA2MA(a)); \ |
ASSERT(xen_mmuext_op(&mmu_ext, 1, NULL, DOMID_SELF) == 0); \ |
\ |
mmu_update_t update; \ |
\ |
update.ptr = PA2MA(KA2PA(&((pte_t *) (ptl0))[(i)])); \ |
update.val = PA2MA(a); \ |
ASSERT(xen_mmu_update(&update, 1, NULL, DOMID_SELF) == 0); \ |
} |
#define SET_PTL2_ADDRESS_ARCH(ptl1, i, a) |
#define SET_PTL3_ADDRESS_ARCH(ptl2, i, a) |
#define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \ |
{ \ |
mmu_update_t update; \ |
\ |
update.ptr = PA2MA(KA2PA(&((pte_t *) (ptl3))[(i)])); \ |
update.val = PA2MA(a); \ |
ASSERT(xen_mmu_update(&update, 1, NULL, DOMID_SELF) == 0); \ |
} |
/* Get PTE flags accessors for each level. */ |
#define GET_PTL1_FLAGS_ARCH(ptl0, i) \ |
get_pt_flags((pte_t *) (ptl0), (index_t) (i)) |
#define GET_PTL2_FLAGS_ARCH(ptl1, i) \ |
PAGE_PRESENT |
#define GET_PTL3_FLAGS_ARCH(ptl2, i) \ |
PAGE_PRESENT |
#define GET_FRAME_FLAGS_ARCH(ptl3, i) \ |
get_pt_flags((pte_t *) (ptl3), (index_t) (i)) |
/* Set PTE flags accessors for each level. */ |
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ |
set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x)) |
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ |
set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x)) |
/* Query macros for the last level. */ |
#define PTE_VALID_ARCH(p) \ |
(*((uint32_t *) (p)) != 0) |
#define PTE_PRESENT_ARCH(p) \ |
((p)->present != 0) |
#define PTE_GET_FRAME_ARCH(p) \ |
((p)->frame_address << FRAME_WIDTH) |
#define PTE_WRITABLE_ARCH(p) \ |
((p)->writeable != 0) |
#define PTE_EXECUTABLE_ARCH(p) \ |
1 |
#ifndef __ASM__ |
#include <mm/mm.h> |
#include <arch/hypercall.h> |
#include <arch/interrupt.h> |
/* Page fault error codes. */ |
/** When bit on this position is 0, the page fault was caused by a not-present |
* page. |
*/ |
#define PFERR_CODE_P (1 << 0) |
/** When bit on this position is 1, the page fault was caused by a write. */ |
#define PFERR_CODE_RW (1 << 1) |
/** When bit on this position is 1, the page fault was caused in user mode. */ |
#define PFERR_CODE_US (1 << 2) |
/** When bit on this position is 1, a reserved bit was set in page directory. */ |
#define PFERR_CODE_RSVD (1 << 3) |
typedef struct { |
uint64_t ptr; /**< Machine address of PTE */ |
union { /**< New contents of PTE */ |
uint64_t val; |
pte_t pte; |
}; |
} mmu_update_t; |
typedef struct { |
unsigned int cmd; |
union { |
unsigned long mfn; |
unsigned long linear_addr; |
}; |
union { |
unsigned int nr_ents; |
void *vcpumask; |
}; |
} mmuext_op_t; |
static inline int xen_update_va_mapping(const void *va, const pte_t pte, |
const unsigned int flags) |
{ |
return hypercall4(XEN_UPDATE_VA_MAPPING, va, pte, 0, flags); |
} |
static inline int xen_mmu_update(const mmu_update_t *req, |
const unsigned int count, unsigned int *success_count, domid_t domid) |
{ |
return hypercall4(XEN_MMU_UPDATE, req, count, success_count, domid); |
} |
static inline int xen_mmuext_op(const mmuext_op_t *op, const unsigned int count, |
unsigned int *success_count, domid_t domid) |
{ |
return hypercall4(XEN_MMUEXT_OP, op, count, success_count, domid); |
} |
static inline int get_pt_flags(pte_t *pt, index_t i) |
{ |
pte_t *p = &pt[i]; |
return ((!p->page_cache_disable) << PAGE_CACHEABLE_SHIFT | |
(!p->present) << PAGE_PRESENT_SHIFT | |
p->uaccessible << PAGE_USER_SHIFT | |
1 << PAGE_READ_SHIFT | |
p->writeable << PAGE_WRITE_SHIFT | |
1 << PAGE_EXEC_SHIFT | |
p->global << PAGE_GLOBAL_SHIFT); |
} |
static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
{ |
pte_t p = pt[i]; |
p.page_cache_disable = !(flags & PAGE_CACHEABLE); |
p.present = !(flags & PAGE_NOT_PRESENT); |
p.uaccessible = (flags & PAGE_USER) != 0; |
p.writeable = (flags & PAGE_WRITE) != 0; |
p.global = (flags & PAGE_GLOBAL) != 0; |
/* |
* Ensure that there is at least one bit set even if the present bit is cleared. |
*/ |
p.soft_valid = true; |
mmu_update_t update; |
update.ptr = PA2MA(KA2PA(&(pt[i]))); |
update.pte = p; |
xen_mmu_update(&update, 1, NULL, DOMID_SELF); |
} |
extern void page_arch_init(void); |
extern void page_fault(int n, istate_t *istate); |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/mm/frame.h |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32xen_FRAME_H_ |
#define KERN_ia32xen_FRAME_H_ |
#define FRAME_WIDTH 12 /* 4K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#ifdef KERNEL |
#ifndef __ASM__ |
#define PA2MA(x) ((start_info.pm_map[((uintptr_t) (x)) >> 12] << 12) + (((uintptr_t) (x)) & 0xfff)) |
#define MA2PA(x) ((mp_map[((uintptr_t) (x)) >> 12] << 12) + (((uintptr_t) (x)) & 0xfff)) |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/mm/as.h |
---|
0,0 → 1,64 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32xen_AS_H_ |
#define KERN_ia32xen_AS_H_ |
#define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 0 |
#define KERNEL_ADDRESS_SPACE_START_ARCH ((unsigned long) 0x80000000) |
#define KERNEL_ADDRESS_SPACE_END_ARCH ((unsigned long) 0xffffffff) |
#define USER_ADDRESS_SPACE_START_ARCH ((unsigned long) 0x00000000) |
#define USER_ADDRESS_SPACE_END_ARCH ((unsigned long) 0x7fffffff) |
#define USTACK_ADDRESS_ARCH (USER_ADDRESS_SPACE_END_ARCH-(PAGE_SIZE-1)) |
typedef struct { |
} as_arch_t; |
#include <genarch/mm/as_pt.h> |
#define as_constructor_arch(as, flags) (as != as) |
#define as_destructor_arch(as) (as != as) |
#define as_create_arch(as, flags) (as != as) |
#define as_install_arch(as) |
#define as_deinstall_arch(as) |
#define as_invalidate_translation_cache(as, page, cnt) |
extern void as_arch_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/mm/asid.h |
---|
0,0 → 1,55 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
* @ingroup ia32xen_mm |
*/ |
/* |
* ia32xen has no hardware support for address space identifiers. |
* This file is provided to do nop-implementation of mm/asid.h |
* interface. |
*/ |
#ifndef KERN_ia32xen_ASID_H_ |
#define KERN_ia32xen_ASID_H_ |
typedef int asid_t; |
#define ASID_MAX_ARCH 3 |
#define asid_get() (ASID_START+1) |
#define asid_put(asid) |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/mm/tlb.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen_mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32xen_TLB_H_ |
#define KERN_ia32xen_TLB_H_ |
#define tlb_arch_init() |
#define tlb_print() |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/types.h |
---|
0,0 → 1,83 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32xen_TYPES_H_ |
#define KERN_ia32xen_TYPES_H_ |
#define NULL 0 |
#define false 0 |
#define true 1 |
typedef signed char int8_t; |
typedef signed short int16_t; |
typedef signed long int32_t; |
typedef signed long long int64_t; |
typedef unsigned char uint8_t; |
typedef unsigned short uint16_t; |
typedef unsigned long uint32_t; |
typedef unsigned long long uint64_t; |
typedef uint32_t size_t; |
typedef uint32_t count_t; |
typedef uint32_t index_t; |
typedef uint32_t uintptr_t; |
typedef uint32_t pfn_t; |
typedef uint8_t ipl_t; |
typedef uint32_t unative_t; |
typedef int32_t native_t; |
/** Page Table Entry. */ |
typedef struct { |
unsigned present : 1; |
unsigned writeable : 1; |
unsigned uaccessible : 1; |
unsigned page_write_through : 1; |
unsigned page_cache_disable : 1; |
unsigned accessed : 1; |
unsigned dirty : 1; |
unsigned pat : 1; |
unsigned global : 1; |
unsigned soft_valid : 1; /**< Valid content even if the present bit is not set. */ |
unsigned avl : 2; |
unsigned frame_address : 20; |
} __attribute__ ((packed)) pte_t; |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/context_offset.h |
---|
0,0 → 1,0 |
link ../../ia32/include/context_offset.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/pm.h |
---|
0,0 → 1,159 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32xen_PM_H_ |
#define KERN_ia32xen_PM_H_ |
#define IDT_ITEMS 64 |
#define GDT_ITEMS 7 |
#define NULL_DES 0 |
#define KTEXT_DES 1 |
#define KDATA_DES 2 |
#define UTEXT_DES 3 |
#define UDATA_DES 4 |
#define TSS_DES 5 |
#define TLS_DES 6 /* Pointer to Thread-Local-Storage data */ |
#define selector(des) ((des) << 3) |
#define PL_KERNEL 1 |
#define PL_USER 3 |
#define AR_PRESENT (1<<7) |
#define AR_DATA (2<<3) |
#define AR_CODE (3<<3) |
#define AR_WRITABLE (1<<1) |
#define AR_INTERRUPT (0xe) |
#define AR_TSS (0x9) |
#define DPL_KERNEL (PL_KERNEL<<5) |
#define DPL_USER (PL_USER<<5) |
#define TSS_BASIC_SIZE 104 |
#define TSS_IOMAP_SIZE (16*1024+1) /* 16K for bitmap + 1 terminating byte for convenience */ |
#define IO_PORTS (64*1024) |
#ifndef __ASM__ |
#include <arch/types.h> |
#include <arch/context.h> |
struct ptr_16_32 { |
uint16_t limit; |
uint32_t base; |
} __attribute__ ((packed)); |
typedef struct ptr_16_32 ptr_16_32_t; |
struct descriptor { |
unsigned limit_0_15: 16; |
unsigned base_0_15: 16; |
unsigned base_16_23: 8; |
unsigned access: 8; |
unsigned limit_16_19: 4; |
unsigned available: 1; |
unsigned unused: 1; |
unsigned special: 1; |
unsigned granularity : 1; |
unsigned base_24_31: 8; |
} __attribute__ ((packed)); |
typedef struct descriptor descriptor_t; |
struct tss { |
uint16_t link; |
unsigned : 16; |
uint32_t esp0; |
uint16_t ss0; |
unsigned : 16; |
uint32_t esp1; |
uint16_t ss1; |
unsigned : 16; |
uint32_t esp2; |
uint16_t ss2; |
unsigned : 16; |
uint32_t cr3; |
uint32_t eip; |
uint32_t eflags; |
uint32_t eax; |
uint32_t ecx; |
uint32_t edx; |
uint32_t ebx; |
uint32_t esp; |
uint32_t ebp; |
uint32_t esi; |
uint32_t edi; |
uint16_t es; |
unsigned : 16; |
uint16_t cs; |
unsigned : 16; |
uint16_t ss; |
unsigned : 16; |
uint16_t ds; |
unsigned : 16; |
uint16_t fs; |
unsigned : 16; |
uint16_t gs; |
unsigned : 16; |
uint16_t ldtr; |
unsigned : 16; |
unsigned : 16; |
uint16_t iomap_base; |
uint8_t iomap[TSS_IOMAP_SIZE]; |
} __attribute__ ((packed)); |
typedef struct tss tss_t; |
extern ptr_16_32_t gdtr; |
extern ptr_16_32_t bootstrap_gdtr; |
extern ptr_16_32_t protected_ap_gdtr; |
extern struct tss *tss_p; |
extern descriptor_t gdt[]; |
extern void pm_init(void); |
extern void gdt_setbase(descriptor_t *d, uintptr_t base); |
extern void gdt_setlimit(descriptor_t *d, uint32_t limit); |
extern void traps_init(void); |
extern void tss_initialize(tss_t *t); |
extern void set_tls_desc(uintptr_t tls); |
#endif /* __ASM__ */ |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/hypercall.h |
---|
0,0 → 1,381 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef KERN_ia32xen_HYPERCALL_H_ |
#define KERN_ia32xen_HYPERCALL_H_ |
#ifndef __ASM__ |
# include <arch/types.h> |
# include <macros.h> |
#endif |
#define GUEST_CMDLINE 1024 |
#define VIRT_CPUS 32 |
#define START_INFO_SIZE 1104 |
#define BOOT_OFFSET 0x0000 |
#define TEMP_STACK_SIZE 0x1000 |
#define XEN_VIRT_START 0xFC000000 |
#define XEN_CS 0xe019 |
#define XEN_ELFNOTE_INFO 0 |
#define XEN_ELFNOTE_ENTRY 1 |
#define XEN_ELFNOTE_HYPERCALL_PAGE 2 |
#define XEN_ELFNOTE_VIRT_BASE 3 |
#define XEN_ELFNOTE_PADDR_OFFSET 4 |
#define XEN_ELFNOTE_XEN_VERSION 5 |
#define XEN_ELFNOTE_GUEST_OS 6 |
#define XEN_ELFNOTE_GUEST_VERSION 7 |
#define XEN_ELFNOTE_LOADER 8 |
#define XEN_ELFNOTE_PAE_MODE 9 |
#define XEN_ELFNOTE_FEATURES 10 |
#define XEN_ELFNOTE_BSD_SYMTAB 11 |
#define mp_map ((pfn_t *) XEN_VIRT_START) |
#define SIF_PRIVILEGED (1 << 0) /**< Privileged domain */ |
#define SIF_INITDOMAIN (1 << 1) /**< Iinitial control domain */ |
#define XEN_CONSOLE_VGA 0x03 |
#define XEN_CONSOLE_VESA 0x23 |
#define XEN_SET_TRAP_TABLE 0 |
#define XEN_MMU_UPDATE 1 |
#define XEN_SET_CALLBACKS 4 |
#define XEN_UPDATE_VA_MAPPING 14 |
#define XEN_EVENT_CHANNEL_OP 16 |
#define XEN_VERSION 17 |
#define XEN_CONSOLE_IO 18 |
#define XEN_MMUEXT_OP 26 |
/* |
* Commands for XEN_CONSOLE_IO |
*/ |
#define CONSOLE_IO_WRITE 0 |
#define CONSOLE_IO_READ 1 |
#define MMUEXT_PIN_L1_TABLE 0 |
#define MMUEXT_PIN_L2_TABLE 1 |
#define MMUEXT_PIN_L3_TABLE 2 |
#define MMUEXT_PIN_L4_TABLE 3 |
#define MMUEXT_UNPIN_TABLE 4 |
#define MMUEXT_NEW_BASEPTR 5 |
#define MMUEXT_TLB_FLUSH_LOCAL 6 |
#define MMUEXT_INVLPG_LOCAL 7 |
#define MMUEXT_TLB_FLUSH_MULTI 8 |
#define MMUEXT_INVLPG_MULTI 9 |
#define MMUEXT_TLB_FLUSH_ALL 10 |
#define MMUEXT_INVLPG_ALL 11 |
#define MMUEXT_FLUSH_CACHE 12 |
#define MMUEXT_SET_LDT 13 |
#define MMUEXT_NEW_USER_BASEPTR 15 |
#define EVTCHNOP_SEND 4 |
#define UVMF_NONE 0 /**< No flushing at all */ |
#define UVMF_TLB_FLUSH 1 /**< Flush entire TLB(s) */ |
#define UVMF_INVLPG 2 /**< Flush only one entry */ |
#define UVMF_FLUSHTYPE_MASK 3 |
#define UVMF_MULTI 0 /**< Flush subset of TLBs */ |
#define UVMF_LOCAL 0 /**< Flush local TLB */ |
#define UVMF_ALL (1 << 2) /**< Flush all TLBs */ |
#define DOMID_SELF (0x7FF0U) |
#define DOMID_IO (0x7FF1U) |
#ifndef __ASM__ |
typedef uint16_t domid_t; |
typedef uint32_t evtchn_t; |
typedef struct { |
uint32_t version; |
uint32_t pad0; |
uint64_t tsc_timestamp; /**< TSC at last update of time vals */ |
uint64_t system_time; /**< Time, in nanosecs, since boot */ |
uint32_t tsc_to_system_mul; |
int8_t tsc_shift; |
int8_t pad1[3]; |
} vcpu_time_info_t; |
typedef struct { |
uint32_t cr2; |
uint32_t pad[5]; |
} arch_vcpu_info_t; |
typedef struct arch_shared_info { |
pfn_t max_pfn; /**< max pfn that appears in table */ |
uint32_t pfn_to_mfn_frame_list_list; |
uint32_t nmi_reason; |
} arch_shared_info_t; |
typedef struct { |
uint8_t evtchn_upcall_pending; |
ipl_t evtchn_upcall_mask; |
evtchn_t evtchn_pending_sel; |
arch_vcpu_info_t arch; |
vcpu_time_info_t time; |
} vcpu_info_t; |
typedef struct { |
vcpu_info_t vcpu_info[VIRT_CPUS]; |
evtchn_t evtchn_pending[32]; |
evtchn_t evtchn_mask[32]; |
uint32_t wc_version; /**< Version counter */ |
uint32_t wc_sec; /**< Secs 00:00:00 UTC, Jan 1, 1970 */ |
uint32_t wc_nsec; /**< Nsecs 00:00:00 UTC, Jan 1, 1970 */ |
arch_shared_info_t arch; |
} shared_info_t; |
typedef struct { |
int8_t magic[32]; /**< "xen-<version>-<platform>" */ |
uint32_t frames; /**< Available frames */ |
shared_info_t *shared_info; /**< Shared info structure (machine address) */ |
uint32_t flags; /**< SIF_xxx flags */ |
pfn_t store_mfn; /**< Shared page (machine page) */ |
evtchn_t store_evtchn; /**< Event channel for store communication */ |
union { |
struct { |
pfn_t mfn; /**< Console page (machine page) */ |
evtchn_t evtchn; /**< Event channel for console messages */ |
} domU; |
struct { |
uint32_t info_off; /**< Offset of console_info struct */ |
uint32_t info_size; /**< Size of console_info struct from start */ |
} dom0; |
} console; |
pte_t *ptl0; /**< Boot PTL0 (kernel address) */ |
uint32_t pt_frames; /**< Number of bootstrap page table frames */ |
pfn_t *pm_map; /**< Physical->machine frame map (kernel address) */ |
void *mod_start; /**< Modules start (kernel address) */ |
uint32_t mod_len; /**< Modules size (bytes) */ |
int8_t cmd_line[GUEST_CMDLINE]; |
} start_info_t; |
typedef struct { |
uint8_t video_type; |
union { |
struct { |
uint16_t font_height; |
uint16_t cursor_x; |
uint16_t cursor_y; |
uint16_t rows; |
uint16_t columns; |
} vga; |
struct { |
uint16_t width; |
uint16_t height; |
uint16_t bytes_per_line; |
uint16_t bits_per_pixel; |
uint32_t lfb_base; |
uint32_t lfb_size; |
uint8_t red_pos; |
uint8_t red_size; |
uint8_t green_pos; |
uint8_t green_size; |
uint8_t blue_pos; |
uint8_t blue_size; |
uint8_t rsvd_pos; |
uint8_t rsvd_size; |
} vesa_lfb; |
} info; |
} console_info_t; |
typedef struct { |
pfn_t start; |
pfn_t size; |
pfn_t reserved; |
} memzone_t; |
extern start_info_t start_info; |
extern shared_info_t shared_info; |
extern memzone_t meminfo; |
typedef struct { |
uint8_t vector; /**< Exception vector */ |
uint8_t flags; /**< 0-3: privilege level; 4: clear event enable */ |
uint16_t cs; /**< Code selector */ |
void *address; /**< Code offset */ |
} trap_info_t; |
typedef struct { |
evtchn_t port; |
} evtchn_send_t; |
typedef struct { |
uint32_t cmd; |
union { |
evtchn_send_t send; |
}; |
} evtchn_op_t; |
#define force_evtchn_callback() ((void) xen_version(0, 0)) |
#define hypercall0(id) \ |
({ \ |
unative_t ret; \ |
asm volatile ( \ |
"call hypercall_page + (" STRING(id) " * 32)\n" \ |
: "=a" (ret) \ |
: \ |
: "memory" \ |
); \ |
ret; \ |
}) |
#define hypercall1(id, p1) \ |
({ \ |
unative_t ret, __ign1; \ |
asm volatile ( \ |
"call hypercall_page + (" STRING(id) " * 32)\n" \ |
: "=a" (ret), \ |
"=b" (__ign1) \ |
: "1" (p1) \ |
: "memory" \ |
); \ |
ret; \ |
}) |
#define hypercall2(id, p1, p2) \ |
({ \ |
unative_t ret, __ign1, __ign2; \ |
asm volatile ( \ |
"call hypercall_page + (" STRING(id) " * 32)\n" \ |
: "=a" (ret), \ |
"=b" (__ign1), \ |
"=c" (__ign2) \ |
: "1" (p1), \ |
"2" (p2) \ |
: "memory" \ |
); \ |
ret; \ |
}) |
#define hypercall3(id, p1, p2, p3) \ |
({ \ |
unative_t ret, __ign1, __ign2, __ign3; \ |
asm volatile ( \ |
"call hypercall_page + (" STRING(id) " * 32)\n" \ |
: "=a" (ret), \ |
"=b" (__ign1), \ |
"=c" (__ign2), \ |
"=d" (__ign3) \ |
: "1" (p1), \ |
"2" (p2), \ |
"3" (p3) \ |
: "memory" \ |
); \ |
ret; \ |
}) |
#define hypercall4(id, p1, p2, p3, p4) \ |
({ \ |
unative_t ret, __ign1, __ign2, __ign3, __ign4; \ |
asm volatile ( \ |
"call hypercall_page + (" STRING(id) " * 32)\n" \ |
: "=a" (ret), \ |
"=b" (__ign1), \ |
"=c" (__ign2), \ |
"=d" (__ign3), \ |
"=S" (__ign4) \ |
: "1" (p1), \ |
"2" (p2), \ |
"3" (p3), \ |
"4" (p4) \ |
: "memory" \ |
); \ |
ret; \ |
}) |
#define hypercall5(id, p1, p2, p3, p4, p5) \ |
({ \ |
unative_t ret, __ign1, __ign2, __ign3, __ign4, __ign5; \ |
asm volatile ( \ |
"call hypercall_page + (" STRING(id) " * 32)\n" \ |
: "=a" (ret), \ |
"=b" (__ign1), \ |
"=c" (__ign2), \ |
"=d" (__ign3), \ |
"=S" (__ign4), \ |
"=D" (__ign5) \ |
: "1" (p1), \ |
"2" (p2), \ |
"3" (p3), \ |
"4" (p4), \ |
"5" (p5) \ |
: "memory" \ |
); \ |
ret; \ |
}) |
static inline int xen_console_io(const unsigned int cmd, const unsigned int count, const char *str) |
{ |
return hypercall3(XEN_CONSOLE_IO, cmd, count, str); |
} |
static inline int xen_set_callbacks(const unsigned int event_selector, const void *event_address, const unsigned int failsafe_selector, void *failsafe_address) |
{ |
return hypercall4(XEN_SET_CALLBACKS, event_selector, event_address, failsafe_selector, failsafe_address); |
} |
static inline int xen_set_trap_table(const trap_info_t *table) |
{ |
return hypercall1(XEN_SET_TRAP_TABLE, table); |
} |
static inline int xen_version(const unsigned int cmd, const void *arg) |
{ |
return hypercall2(XEN_VERSION, cmd, arg); |
} |
static inline int xen_notify_remote(evtchn_t channel) |
{ |
evtchn_op_t op; |
op.cmd = EVTCHNOP_SEND; |
op.send.port = channel; |
return hypercall1(XEN_EVENT_CHANNEL_OP, &op); |
} |
#endif |
#endif |
/branches/arm/kernel/arch/ia32xen/include/asm.h |
---|
0,0 → 1,272 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2005 Sergey Bondari |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32xen_ASM_H_ |
#define KERN_ia32xen_ASM_H_ |
#include <arch/pm.h> |
#include <arch/types.h> |
#include <arch/barrier.h> |
#include <config.h> |
extern void enable_l_apic_in_msr(void); |
extern void asm_delay_loop(uint32_t t); |
extern void asm_fake_loop(uint32_t t); |
/** Halt CPU |
* |
* Halt the current CPU until interrupt event. |
*/ |
#define cpu_halt() ((void) 0) |
#define cpu_sleep() ((void) 0) |
#define GEN_READ_REG(reg) static inline unative_t read_ ##reg (void) \ |
{ \ |
unative_t res; \ |
asm volatile ("movl %%" #reg ", %0" : "=r" (res) ); \ |
return res; \ |
} |
#define GEN_WRITE_REG(reg) static inline void write_ ##reg (unative_t regn) \ |
{ \ |
asm volatile ("movl %0, %%" #reg : : "r" (regn)); \ |
} |
GEN_READ_REG(cr0); |
GEN_READ_REG(cr2); |
GEN_READ_REG(dr0); |
GEN_READ_REG(dr1); |
GEN_READ_REG(dr2); |
GEN_READ_REG(dr3); |
GEN_READ_REG(dr6); |
GEN_READ_REG(dr7); |
GEN_WRITE_REG(dr0); |
GEN_WRITE_REG(dr1); |
GEN_WRITE_REG(dr2); |
GEN_WRITE_REG(dr3); |
GEN_WRITE_REG(dr6); |
GEN_WRITE_REG(dr7); |
/** Byte to port |
* |
* Output byte to port |
* |
* @param port Port to write to |
* @param val Value to write |
*/ |
static inline void outb(uint16_t port, uint8_t val) { asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); } |
/** Word to port |
* |
* Output word to port |
* |
* @param port Port to write to |
* @param val Value to write |
*/ |
static inline void outw(uint16_t port, uint16_t val) { asm volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); } |
/** Double word to port |
* |
* Output double word to port |
* |
* @param port Port to write to |
* @param val Value to write |
*/ |
static inline void outl(uint16_t port, uint32_t val) { asm volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); } |
/** Byte from port |
* |
* Get byte from port |
* |
* @param port Port to read from |
* @return Value read |
*/ |
static inline uint8_t inb(uint16_t port) { uint8_t val; asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) ); return val; } |
/** Word from port |
* |
* Get word from port |
* |
* @param port Port to read from |
* @return Value read |
*/ |
static inline uint16_t inw(uint16_t port) { uint16_t val; asm volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port) ); return val; } |
/** Double word from port |
* |
* Get double word from port |
* |
* @param port Port to read from |
* @return Value read |
*/ |
static inline uint32_t inl(uint16_t port) { uint32_t val; asm volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) ); return val; } |
/** Enable interrupts. |
* |
* Enable interrupts and return previous |
* value of EFLAGS. |
* |
* @return Old interrupt priority level. |
*/ |
static inline ipl_t interrupts_enable(void) |
{ |
// FIXME SMP |
ipl_t v = shared_info.vcpu_info[0].evtchn_upcall_mask; |
write_barrier(); |
shared_info.vcpu_info[0].evtchn_upcall_mask = 0; |
write_barrier(); |
if (shared_info.vcpu_info[0].evtchn_upcall_pending) |
force_evtchn_callback(); |
return v; |
} |
/** Disable interrupts. |
* |
* Disable interrupts and return previous |
* value of EFLAGS. |
* |
* @return Old interrupt priority level. |
*/ |
static inline ipl_t interrupts_disable(void) |
{ |
// FIXME SMP |
ipl_t v = shared_info.vcpu_info[0].evtchn_upcall_mask; |
shared_info.vcpu_info[0].evtchn_upcall_mask = 1; |
write_barrier(); |
return v; |
} |
/** Restore interrupt priority level. |
* |
* Restore EFLAGS. |
* |
* @param ipl Saved interrupt priority level. |
*/ |
static inline void interrupts_restore(ipl_t ipl) |
{ |
if (ipl == 0) |
interrupts_enable(); |
else |
interrupts_disable(); |
} |
/** Return interrupt priority level. |
* |
* @return EFLAFS. |
*/ |
static inline ipl_t interrupts_read(void) |
{ |
// FIXME SMP |
return shared_info.vcpu_info[0].evtchn_upcall_mask; |
} |
/** Return base address of current stack |
* |
* Return the base address of the current stack. |
* The stack is assumed to be STACK_SIZE bytes long. |
* The stack must start on page boundary. |
*/ |
static inline uintptr_t get_stack_base(void) |
{ |
uintptr_t v; |
asm volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1))); |
return v; |
} |
/** Return current IP address */ |
static inline uintptr_t * get_ip() |
{ |
uintptr_t *ip; |
asm volatile ( |
"mov %%eip, %0" |
: "=r" (ip) |
); |
return ip; |
} |
/** Invalidate TLB Entry. |
* |
* @param addr Address on a page whose TLB entry is to be invalidated. |
*/ |
static inline void invlpg(uintptr_t addr) |
{ |
asm volatile ("invlpg %0\n" :: "m" (*(unative_t *)addr)); |
} |
/** Load GDTR register from memory. |
* |
* @param gdtr_reg Address of memory from where to load GDTR. |
*/ |
static inline void gdtr_load(ptr_16_32_t *gdtr_reg) |
{ |
asm volatile ("lgdtl %0\n" : : "m" (*gdtr_reg)); |
} |
/** Store GDTR register to memory. |
* |
* @param gdtr_reg Address of memory to where to load GDTR. |
*/ |
static inline void gdtr_store(ptr_16_32_t *gdtr_reg) |
{ |
asm volatile ("sgdtl %0\n" : : "m" (*gdtr_reg)); |
} |
/** Load TR from descriptor table. |
* |
* @param sel Selector specifying descriptor of TSS segment. |
*/ |
static inline void tr_load(uint16_t sel) |
{ |
asm volatile ("ltr %0" : : "r" (sel)); |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/drivers/xconsole.h |
---|
0,0 → 1,56 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ia32xen |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ia32xen_XCONSOLE_H_ |
#define KERN_ia32xen_XCONSOLE_H_ |
#include <arch/types.h> |
typedef struct { |
char in[1024]; |
char out[2048]; |
uint32_t in_cons; |
uint32_t in_prod; |
uint32_t out_cons; |
uint32_t out_prod; |
} xencons_t; |
extern xencons_t console_page; |
extern void xen_console_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ia32xen/include/cycle.h |
---|
0,0 → 1,0 |
link ../../ia32/include/cycle.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/interrupt.h |
---|
0,0 → 1,0 |
link ../../ia32/include/interrupt.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/fpu_context.h |
---|
0,0 → 1,0 |
link ../../ia32/include/fpu_context.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/byteorder.h |
---|
0,0 → 1,0 |
link ../../ia32/include/byteorder.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/cpuid.h |
---|
0,0 → 1,0 |
link ../../ia32/include/cpuid.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/elf.h |
---|
0,0 → 1,0 |
link ../../ia32/include/elf.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/bios |
---|
0,0 → 1,0 |
link ../../ia32/include/bios |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/memstr.h |
---|
0,0 → 1,0 |
link ../../ia32/include/memstr.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/arg.h |
---|
0,0 → 1,0 |
link ../../ia32/include/arg.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/smp |
---|
0,0 → 1,0 |
link ../../ia32/include/smp |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/ddi |
---|
0,0 → 1,0 |
link ../../ia32/include/ddi |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/atomic.h |
---|
0,0 → 1,0 |
link ../../ia32/include/atomic.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/arch.h |
---|
0,0 → 1,0 |
link ../../ia32/include/arch.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/proc |
---|
0,0 → 1,0 |
link ../../ia32/include/proc |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/faddr.h |
---|
0,0 → 1,0 |
link ../../ia32/include/faddr.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/debugger.h |
---|
0,0 → 1,0 |
link ../../ia32/include/debugger.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/context.h |
---|
0,0 → 1,0 |
link ../../ia32/include/context.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/debug.h |
---|
0,0 → 1,0 |
link ../../ia32/include/debug.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/barrier.h |
---|
0,0 → 1,0 |
link ../../ia32/include/barrier.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/include/cpu.h |
---|
0,0 → 1,0 |
link ../../ia32/include/cpu.h |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/kernel/arch/ia32xen/_link.ld.in |
---|
0,0 → 1,45 |
/** ia32xen linker script |
*/ |
#include <arch/hypercall.h> |
#include <arch/mm/page.h> |
ENTRY(kernel_image_start) |
PHDRS { |
image PT_LOAD FLAGS(7); /* RWE */ |
note PT_NOTE FLAGS(4); /* R__ */ |
} |
SECTIONS { |
.image PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) { |
ktext_start = .; |
*(K_TEXT_START); |
*(.text); |
ktext_end = .; |
kdata_start = .; |
*(.data); /* initialized data */ |
*(.rodata*); /* string literals */ |
*(COMMON); /* global variables */ |
hardcoded_load_address = .; |
LONG(PA2KA(0)); |
hardcoded_ktext_size = .; |
LONG(ktext_end - ktext_start); |
hardcoded_kdata_size = .; |
LONG(kdata_end - kdata_start); |
symbol_table = .; |
*(symtab.*); /* Symbol table, must be LAST symbol! */ |
*(.bss); /* uninitialized static variables */ |
kdata_end = .; |
} :image |
.notes : { |
*(.note.Xen); |
} :note |
/DISCARD/ : { |
*(.note.GNU-stack); |
*(.comment); |
} |
} |
/branches/arm/kernel/arch/ppc64/Makefile.inc |
---|
0,0 → 1,76 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf64-powerpc |
BFD_ARCH = powerpc:common64 |
BFD = binary |
TARGET = ppc64-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc64 |
GCC_CFLAGS += -mcpu=powerpc64 -msoft-float -m64 |
AFLAGS += -a64 |
LFLAGS += -no-check-sections -N |
DEFS += -D__64_BITS__ |
## Own configuration directives |
# |
CONFIG_FB = y |
## Compile with hierarchical page tables support. |
# |
CONFIG_PAGE_PT = y |
DEFS += -DCONFIG_PAGE_PT |
ARCH_SOURCES = \ |
arch/$(ARCH)/src/context.S \ |
arch/$(ARCH)/src/debug/panic.s \ |
arch/$(ARCH)/src/fpu_context.S \ |
arch/$(ARCH)/src/boot/boot.S \ |
arch/$(ARCH)/src/ppc64.c \ |
arch/$(ARCH)/src/dummy.s \ |
arch/$(ARCH)/src/exception.S \ |
arch/$(ARCH)/src/interrupt.c \ |
arch/$(ARCH)/src/asm.S \ |
arch/$(ARCH)/src/cpu/cpu.c \ |
arch/$(ARCH)/src/proc/scheduler.c \ |
arch/$(ARCH)/src/ddi/ddi.c \ |
arch/$(ARCH)/src/mm/as.c \ |
arch/$(ARCH)/src/mm/frame.c \ |
arch/$(ARCH)/src/mm/page.c \ |
arch/$(ARCH)/src/mm/tlb.c \ |
arch/$(ARCH)/src/drivers/pic.c |
/branches/arm/kernel/arch/ppc64/include/mm/page.h |
---|
0,0 → 1,184 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_PAGE_H_ |
#define KERN_ppc64_PAGE_H_ |
#include <arch/mm/frame.h> |
#define PAGE_WIDTH FRAME_WIDTH |
#define PAGE_SIZE FRAME_SIZE |
#ifdef KERNEL |
#ifndef __ASM__ |
# define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) |
# define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) |
#else |
# define KA2PA(x) ((x) - 0x80000000) |
# define PA2KA(x) ((x) + 0x80000000) |
#endif |
/* |
* Implementation of generic 4-level page table interface, |
* the hardware Page Hash Table is used as cache. |
* |
* Page table layout: |
* - 32-bit virtual addressess |
* - Offset is 12 bits => pages are 4K long |
* - PTL0 has 1024 entries (10 bits) |
* - PTL1 is not used |
* - PTL2 is not used |
* - PLT3 has 1024 entries (10 bits) |
*/ |
/* Number of entries in each level. */ |
#define PTL0_ENTRIES_ARCH 1024 |
#define PTL1_ENTRIES_ARCH 0 |
#define PTL2_ENTRIES_ARCH 0 |
#define PTL3_ENTRIES_ARCH 1024 |
/* Sizes of page tables in each level. */ |
#define PTL0_SIZE_ARCH ONE_FRAME |
#define PTL1_SIZE_ARCH 0 |
#define PTL2_SIZE_ARCH 0 |
#define PTL3_SIZE_ARCH ONE_FRAME |
/* Macros calculating indices into page tables in each level. */ |
#define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 22) & 0x3ff) |
#define PTL1_INDEX_ARCH(vaddr) 0 |
#define PTL2_INDEX_ARCH(vaddr) 0 |
#define PTL3_INDEX_ARCH(vaddr) (((vaddr) >> 12) & 0x3ff) |
/* Get PTE address accessors for each level. */ |
#define GET_PTL1_ADDRESS_ARCH(ptl0, i) \ |
(((pte_t *) (ptl0))[(i)].pfn << 12) |
#define GET_PTL2_ADDRESS_ARCH(ptl1, i) \ |
(ptl1) |
#define GET_PTL3_ADDRESS_ARCH(ptl2, i) \ |
(ptl2) |
#define GET_FRAME_ADDRESS_ARCH(ptl3, i) \ |
(((pte_t *) (ptl3))[(i)].pfn << 12) |
/* Set PTE address accessors for each level. */ |
#define SET_PTL0_ADDRESS_ARCH(ptl0) |
#define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \ |
(((pte_t *) (ptl0))[(i)].pfn = (a) >> 12) |
#define SET_PTL2_ADDRESS_ARCH(ptl1, i, a) |
#define SET_PTL3_ADDRESS_ARCH(ptl2, i, a) |
#define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \ |
(((pte_t *) (ptl3))[(i)].pfn = (a) >> 12) |
/* Get PTE flags accessors for each level. */ |
#define GET_PTL1_FLAGS_ARCH(ptl0, i) \ |
get_pt_flags((pte_t *) (ptl0), (index_t) (i)) |
#define GET_PTL2_FLAGS_ARCH(ptl1, i) \ |
PAGE_PRESENT |
#define GET_PTL3_FLAGS_ARCH(ptl2, i) \ |
PAGE_PRESENT |
#define GET_FRAME_FLAGS_ARCH(ptl3, i) \ |
get_pt_flags((pte_t *) (ptl3), (index_t) (i)) |
/* Set PTE flags accessors for each level. */ |
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ |
set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x)) |
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ |
set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x)) |
/* Macros for querying the last-level PTEs. */ |
#define PTE_VALID_ARCH(pte) (*((uint32_t *) (pte)) != 0) |
#define PTE_PRESENT_ARCH(pte) ((pte)->p != 0) |
#define PTE_GET_FRAME_ARCH(pte) ((uintptr_t) ((pte)->pfn << 12)) |
#define PTE_WRITABLE_ARCH(pte) 1 |
#define PTE_EXECUTABLE_ARCH(pte) 1 |
#ifndef __ASM__ |
#include <mm/mm.h> |
#include <arch/interrupt.h> |
static inline int get_pt_flags(pte_t *pt, index_t i) |
{ |
pte_t *p = &pt[i]; |
return ((1 << PAGE_CACHEABLE_SHIFT) | |
((!p->p) << PAGE_PRESENT_SHIFT) | |
(1 << PAGE_USER_SHIFT) | |
(1 << PAGE_READ_SHIFT) | |
(1 << PAGE_WRITE_SHIFT) | |
(1 << PAGE_EXEC_SHIFT) | |
(p->g << PAGE_GLOBAL_SHIFT)); |
} |
static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
{ |
pte_t *p = &pt[i]; |
p->p = !(flags & PAGE_NOT_PRESENT); |
p->g = (flags & PAGE_GLOBAL) != 0; |
p->valid = 1; |
} |
extern void page_arch_init(void); |
#define PHT_BITS 16 |
#define PHT_ORDER 4 |
typedef struct { |
unsigned v : 1; /**< Valid */ |
unsigned vsid : 24; /**< Virtual Segment ID */ |
unsigned h : 1; /**< Primary/secondary hash */ |
unsigned api : 6; /**< Abbreviated Page Index */ |
unsigned rpn : 20; /**< Real Page Number */ |
unsigned reserved0 : 3; |
unsigned r : 1; /**< Reference */ |
unsigned c : 1; /**< Change */ |
unsigned wimg : 4; /**< Access control */ |
unsigned reserved1 : 1; |
unsigned pp : 2; /**< Page protection */ |
} phte_t; |
extern void pht_refill(bool data, istate_t *istate); |
extern void pht_init(void); |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/mm/frame.h |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_FRAME_H_ |
#define KERN_ppc64_FRAME_H_ |
#define FRAME_WIDTH 12 /* 4K */ |
#define FRAME_SIZE (1 << FRAME_WIDTH) |
#ifdef KERNEL |
#ifndef __ASM__ |
#include <arch/types.h> |
extern uintptr_t last_frame; |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/mm/as.h |
---|
0,0 → 1,64 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_AS_H_ |
#define KERN_ppc64_AS_H_ |
#define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 0 |
#define KERNEL_ADDRESS_SPACE_START_ARCH ((unsigned long) 0x80000000) |
#define KERNEL_ADDRESS_SPACE_END_ARCH ((unsigned long) 0xffffffff) |
#define USER_ADDRESS_SPACE_START_ARCH ((unsigned long) 0x00000000) |
#define USER_ADDRESS_SPACE_END_ARCH ((unsigned long) 0x7fffffff) |
#define USTACK_ADDRESS_ARCH (0x7fffffff - (PAGE_SIZE - 1)) |
typedef struct { |
} as_arch_t; |
#include <genarch/mm/as_pt.h> |
#define as_constructor_arch(as, flags) (as != as) |
#define as_destructor_arch(as) (as != as) |
#define as_create_arch(as, flags) (as != as) |
#define as_install_arch(as) |
#define as_deinstall_arch(as) |
#define as_invalidate_translation_cache(as, page, cnt) |
extern void as_arch_init(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/mm/asid.h |
---|
0,0 → 1,48 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_ASID_H_ |
#define KERN_ppc64_ASID_H_ |
typedef int asid_t; |
#define ASID_MAX_ARCH 3 |
#define asid_get() (ASID_START+1) |
#define asid_put(asid) |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/mm/tlb.h |
---|
0,0 → 1,41 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_TLB_H_ |
#define KERN_ppc64_TLB_H_ |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/barrier.h |
---|
0,0 → 1,51 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_BARRIER_H_ |
#define KERN_ppc64_BARRIER_H_ |
#define CS_ENTER_BARRIER() asm volatile ("" ::: "memory") |
#define CS_LEAVE_BARRIER() asm volatile ("" ::: "memory") |
#define memory_barrier() asm volatile ("sync" ::: "memory") |
#define read_barrier() asm volatile ("sync" ::: "memory") |
#define write_barrier() asm volatile ("eieio" ::: "memory") |
#define smc_coherence(a) |
#define smc_coherence_block(a, l) |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/memstr.h |
---|
0,0 → 1,48 |
/* |
* Copyright (c) 2005 Sergey Bondari |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_MEMSTR_H_ |
#define KERN_ppc64_MEMSTR_H_ |
#define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) |
extern void memsetw(void *dst, size_t cnt, uint16_t x); |
extern void memsetb(void *dst, size_t cnt, uint8_t x); |
extern int memcmp(const void *a, const void *b, size_t cnt); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/exception.h |
---|
0,0 → 1,102 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_EXCEPTION_H_ |
#define KERN_ppc64_EXCEPTION_H_ |
#include <arch/types.h> |
typedef struct { |
uint64_t r0; |
uint64_t r2; |
uint64_t r3; |
uint64_t r4; |
uint64_t r5; |
uint64_t r6; |
uint64_t r7; |
uint64_t r8; |
uint64_t r9; |
uint64_t r10; |
uint64_t r11; |
uint64_t r13; |
uint64_t r14; |
uint64_t r15; |
uint64_t r16; |
uint64_t r17; |
uint64_t r18; |
uint64_t r19; |
uint64_t r20; |
uint64_t r21; |
uint64_t r22; |
uint64_t r23; |
uint64_t r24; |
uint64_t r25; |
uint64_t r26; |
uint64_t r27; |
uint64_t r28; |
uint64_t r29; |
uint64_t r30; |
uint64_t r31; |
uint64_t cr; |
uint64_t pc; |
uint64_t srr1; |
uint64_t lr; |
uint64_t ctr; |
uint64_t xer; |
uint64_t r12; |
uint64_t sp; |
} istate_t; |
static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr) |
{ |
istate->pc = retaddr; |
} |
/** Return true if exception happened while in userspace */ |
#include <panic.h> |
static inline int istate_from_uspace(istate_t *istate) |
{ |
panic("istate_from_uspace not yet implemented"); |
return 0; |
} |
static inline unative_t istate_get_pc(istate_t *istate) |
{ |
return istate->pc; |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/types.h |
---|
0,0 → 1,72 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_TYPES_H_ |
#define KERN_ppc64_TYPES_H_ |
typedef signed char int8_t; |
typedef signed short int16_t; |
typedef signed int int32_t; |
typedef signed long int64_t; |
typedef unsigned char uint8_t; |
typedef unsigned short uint16_t; |
typedef unsigned int uint32_t; |
typedef unsigned long uint64_t; |
typedef uint64_t size_t; |
typedef uint64_t count_t; |
typedef uint64_t index_t; |
typedef uint64_t uintptr_t; |
typedef uint64_t pfn_t; |
typedef uint64_t ipl_t; |
typedef uint64_t unative_t; |
typedef int64_t native_t; |
/** Page Table Entry. */ |
typedef struct { |
unsigned p : 1; /**< Present bit. */ |
unsigned a : 1; /**< Accessed bit. */ |
unsigned g : 1; /**< Global bit. */ |
unsigned valid : 1; /**< Valid content even if not present. */ |
unsigned pfn : 20; /**< Physical frame number. */ |
} pte_t; |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/context_offset.h |
---|
0,0 → 1,132 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef KERN_ppc64_CONTEXT_OFFSET_H_ |
#define KERN_ppc64_CONTEXT_OFFSET_H_ |
#define OFFSET_SP 0x0 |
#define OFFSET_PC 0x8 |
#define OFFSET_R2 0x10 |
#define OFFSET_R13 0x18 |
#define OFFSET_R14 0x20 |
#define OFFSET_R15 0x28 |
#define OFFSET_R16 0x30 |
#define OFFSET_R17 0x38 |
#define OFFSET_R18 0x40 |
#define OFFSET_R19 0x48 |
#define OFFSET_R20 0x50 |
#define OFFSET_R21 0x58 |
#define OFFSET_R22 0x60 |
#define OFFSET_R23 0x68 |
#define OFFSET_R24 0x70 |
#define OFFSET_R25 0x78 |
#define OFFSET_R26 0x80 |
#define OFFSET_R27 0x88 |
#define OFFSET_R28 0x90 |
#define OFFSET_R29 0x98 |
#define OFFSET_R30 0xa0 |
#define OFFSET_R31 0xa8 |
#define OFFSET_CR 0xb0 |
#define OFFSET_FR14 0x0 |
#define OFFSET_FR15 0x8 |
#define OFFSET_FR16 0x10 |
#define OFFSET_FR17 0x18 |
#define OFFSET_FR18 0x20 |
#define OFFSET_FR19 0x28 |
#define OFFSET_FR20 0x30 |
#define OFFSET_FR21 0x38 |
#define OFFSET_FR22 0x40 |
#define OFFSET_FR23 0x48 |
#define OFFSET_FR24 0x50 |
#define OFFSET_FR25 0x58 |
#define OFFSET_FR26 0x60 |
#define OFFSET_FR27 0x68 |
#define OFFSET_FR28 0x70 |
#define OFFSET_FR29 0x78 |
#define OFFSET_FR30 0x80 |
#define OFFSET_FR31 0x88 |
#define OFFSET_FPSCR 0x90 |
#ifdef __ASM__ |
# include <arch/asm/regname.h> |
# ctx: address of the structure with saved context |
.macro CONTEXT_SAVE_ARCH_CORE ctx:req |
stw sp, OFFSET_SP(\ctx) |
stw r2, OFFSET_R2(\ctx) |
stw r13, OFFSET_R13(\ctx) |
stw r14, OFFSET_R14(\ctx) |
stw r15, OFFSET_R15(\ctx) |
stw r16, OFFSET_R16(\ctx) |
stw r17, OFFSET_R17(\ctx) |
stw r18, OFFSET_R18(\ctx) |
stw r19, OFFSET_R19(\ctx) |
stw r20, OFFSET_R20(\ctx) |
stw r21, OFFSET_R21(\ctx) |
stw r22, OFFSET_R22(\ctx) |
stw r23, OFFSET_R23(\ctx) |
stw r24, OFFSET_R24(\ctx) |
stw r25, OFFSET_R25(\ctx) |
stw r26, OFFSET_R26(\ctx) |
stw r27, OFFSET_R27(\ctx) |
stw r28, OFFSET_R28(\ctx) |
stw r29, OFFSET_R29(\ctx) |
stw r30, OFFSET_R30(\ctx) |
stw r31, OFFSET_R31(\ctx) |
.endm |
# ctx: address of the structure with saved context |
.macro CONTEXT_RESTORE_ARCH_CORE ctx:req |
lwz sp, OFFSET_SP(\ctx) |
lwz r2, OFFSET_R2(\ctx) |
lwz r13, OFFSET_R13(\ctx) |
lwz r14, OFFSET_R14(\ctx) |
lwz r15, OFFSET_R15(\ctx) |
lwz r16, OFFSET_R16(\ctx) |
lwz r17, OFFSET_R17(\ctx) |
lwz r18, OFFSET_R18(\ctx) |
lwz r19, OFFSET_R19(\ctx) |
lwz r20, OFFSET_R20(\ctx) |
lwz r21, OFFSET_R21(\ctx) |
lwz r22, OFFSET_R22(\ctx) |
lwz r23, OFFSET_R23(\ctx) |
lwz r24, OFFSET_R24(\ctx) |
lwz r25, OFFSET_R25(\ctx) |
lwz r26, OFFSET_R26(\ctx) |
lwz r27, OFFSET_R27(\ctx) |
lwz r28, OFFSET_R28(\ctx) |
lwz r29, OFFSET_R29(\ctx) |
lwz r30, OFFSET_R30(\ctx) |
lwz r31, OFFSET_R31(\ctx) |
.endm |
#endif /* __ASM__ */ |
#endif |
/branches/arm/kernel/arch/ppc64/include/byteorder.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_BYTEORDER_H_ |
#define KERN_ppc64_BYTEORDER_H_ |
#define ARCH_IS_BIG_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/cpu.h |
---|
0,0 → 1,48 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_CPU_H_ |
#define KERN_ppc64_CPU_H_ |
#include <arch/asm.h> |
typedef struct { |
int version; |
int revision; |
} cpu_arch_t; |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/drivers/pic.h |
---|
0,0 → 1,56 |
/* |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_PIC_H_ |
#define KERN_ppc64_PIC_H_ |
#include <arch/types.h> |
#define PIC_PENDING_LOW 8 |
#define PIC_PENDING_HIGH 4 |
#define PIC_MASK_LOW 9 |
#define PIC_MASK_HIGH 5 |
#define PIC_ACK_LOW 10 |
#define PIC_ACK_HIGH 6 |
void pic_init(uintptr_t base, size_t size); |
void pic_enable_interrupt(int intnum); |
void pic_disable_interrupt(int intnum); |
void pic_ack_interrupt(int intnum); |
int pic_get_pending(void); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/fpu_context.h |
---|
0,0 → 1,67 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_FPU_CONTEXT_H_ |
#define KERN_ppc64_FPU_CONTEXT_H_ |
#ifndef KERN_ppc64_TYPES_H_ |
# include <arch/types.h> |
#endif |
typedef struct { |
uint64_t fr14; |
uint64_t fr15; |
uint64_t fr16; |
uint64_t fr17; |
uint64_t fr18; |
uint64_t fr19; |
uint64_t fr20; |
uint64_t fr21; |
uint64_t fr22; |
uint64_t fr23; |
uint64_t fr24; |
uint64_t fr25; |
uint64_t fr26; |
uint64_t fr27; |
uint64_t fr28; |
uint64_t fr29; |
uint64_t fr30; |
uint64_t fr31; |
uint32_t fpscr; |
} __attribute__ ((packed)) fpu_context_t; |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/context.h |
---|
0,0 → 1,75 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_CONTEXT_H_ |
#define KERN_ppc64_CONTEXT_H_ |
#include <arch/types.h> |
#define SP_DELTA 16 |
typedef struct { |
uintptr_t sp; |
uintptr_t pc; |
uint64_t r2; |
uint64_t r13; |
uint64_t r14; |
uint64_t r15; |
uint64_t r16; |
uint64_t r17; |
uint64_t r18; |
uint64_t r19; |
uint64_t r20; |
uint64_t r21; |
uint64_t r22; |
uint64_t r23; |
uint64_t r24; |
uint64_t r25; |
uint64_t r26; |
uint64_t r27; |
uint64_t r28; |
uint64_t r29; |
uint64_t r30; |
uint64_t r31; |
uint64_t cr; |
ipl_t ipl; |
} __attribute__ ((packed)) context_t; |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/cpuid.h |
---|
0,0 → 1,56 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_CPUID_H_ |
#define KERN_ppc64_CPUID_H_ |
#include <arch/types.h> |
typedef struct { |
uint16_t version; |
uint16_t revision; |
} __attribute__ ((packed)) cpu_info_t; |
static inline void cpu_version(cpu_info_t *info) |
{ |
asm volatile ( |
"mfpvr %0\n" |
: "=r" (*info) |
); |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/asm/regname.h |
---|
0,0 → 1,215 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_REGNAME_H_ |
#define KERN_ppc64_REGNAME_H_ |
/* Condition Register Bit Fields */ |
#define cr0 0 |
#define cr1 1 |
#define cr2 2 |
#define cr3 3 |
#define cr4 4 |
#define cr5 5 |
#define cr6 6 |
#define cr7 7 |
/* General Purpose Registers (GPRs) */ |
#define r0 0 |
#define r1 1 |
#define r2 2 |
#define r3 3 |
#define r4 4 |
#define r5 5 |
#define r6 6 |
#define r7 7 |
#define r8 8 |
#define r9 9 |
#define r10 10 |
#define r11 11 |
#define r12 12 |
#define r13 13 |
#define r14 14 |
#define r15 15 |
#define r16 16 |
#define r17 17 |
#define r18 18 |
#define r19 19 |
#define r20 20 |
#define r21 21 |
#define r22 22 |
#define r23 23 |
#define r24 24 |
#define r25 25 |
#define r26 26 |
#define r27 27 |
#define r28 28 |
#define r29 29 |
#define r30 30 |
#define r31 31 |
/* GPR Aliases */ |
#define sp 1 |
/* Floating Point Registers (FPRs) */ |
#define fr0 0 |
#define fr1 1 |
#define fr2 2 |
#define fr3 3 |
#define fr4 4 |
#define fr5 5 |
#define fr6 6 |
#define fr7 7 |
#define fr8 8 |
#define fr9 9 |
#define fr10 10 |
#define fr11 11 |
#define fr12 12 |
#define fr13 13 |
#define fr14 14 |
#define fr15 15 |
#define fr16 16 |
#define fr17 17 |
#define fr18 18 |
#define fr19 19 |
#define fr20 20 |
#define fr21 21 |
#define fr22 22 |
#define fr23 23 |
#define fr24 24 |
#define fr25 25 |
#define fr26 26 |
#define fr27 27 |
#define fr28 28 |
#define fr29 29 |
#define fr30 30 |
#define fr31 31 |
#define vr0 0 |
#define vr1 1 |
#define vr2 2 |
#define vr3 3 |
#define vr4 4 |
#define vr5 5 |
#define vr6 6 |
#define vr7 7 |
#define vr8 8 |
#define vr9 9 |
#define vr10 10 |
#define vr11 11 |
#define vr12 12 |
#define vr13 13 |
#define vr14 14 |
#define vr15 15 |
#define vr16 16 |
#define vr17 17 |
#define vr18 18 |
#define vr19 19 |
#define vr20 20 |
#define vr21 21 |
#define vr22 22 |
#define vr23 23 |
#define vr24 24 |
#define vr25 25 |
#define vr26 26 |
#define vr27 27 |
#define vr28 28 |
#define vr29 29 |
#define vr30 30 |
#define vr31 31 |
#define evr0 0 |
#define evr1 1 |
#define evr2 2 |
#define evr3 3 |
#define evr4 4 |
#define evr5 5 |
#define evr6 6 |
#define evr7 7 |
#define evr8 8 |
#define evr9 9 |
#define evr10 10 |
#define evr11 11 |
#define evr12 12 |
#define evr13 13 |
#define evr14 14 |
#define evr15 15 |
#define evr16 16 |
#define evr17 17 |
#define evr18 18 |
#define evr19 19 |
#define evr20 20 |
#define evr21 21 |
#define evr22 22 |
#define evr23 23 |
#define evr24 24 |
#define evr25 25 |
#define evr26 26 |
#define evr27 27 |
#define evr28 28 |
#define evr29 29 |
#define evr30 30 |
#define evr31 31 |
/* Special Purpose Registers (SPRs) */ |
#define xer 1 |
#define lr 8 |
#define ctr 9 |
#define dec 22 |
#define sdr1 25 |
#define srr0 26 |
#define srr1 27 |
#define sprg0 272 |
#define sprg1 273 |
#define sprg2 274 |
#define sprg3 275 |
#define prv 287 |
#define hid0 1008 |
/* MSR bits */ |
#define msr_ir (1 << 4) |
#define msr_dr (1 << 5) |
#define msr_pr (1 << 14) |
#define msr_ee (1 << 15) |
/* HID0 bits */ |
#define hid0_ice (1 << 15) |
#define hid0_dce (1 << 14) |
#define hid0_icfi (1 << 11) |
#define hid0_dci (1 << 10) |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/interrupt.h |
---|
0,0 → 1,55 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64interrupt |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_INTERRUPT_H_ |
#define KERN_ppc64_INTERRUPT_H_ |
#include <arch/exception.h> |
#define IVT_ITEMS 16 |
#define IVT_FIRST 0 |
#define VECTOR_DATA_STORAGE 2 |
#define VECTOR_INSTRUCTION_STORAGE 3 |
#define VECTOR_EXTERNAL 4 |
#define VECTOR_DECREMENTER 8 |
extern void start_decrementer(void); |
extern void interrupt_init(void); |
extern void extint_handler(int n, istate_t *istate); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/cycle.h |
---|
0,0 → 1,46 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_CYCLE_H_ |
#define KERN_ppc64_CYCLE_H_ |
static inline uint64_t get_cycle(void) |
{ |
return 0; |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/elf.h |
---|
0,0 → 1,45 |
/* |
* Copyright (c) 2006 Sergey Bondari |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_ELF_H_ |
#define KERN_ppc64_ELF_H_ |
#define ELF_MACHINE EM_PPC64 |
#define ELF_DATA_ENCODING ELFDATA2MSB |
#define ELF_CLASS ELFCLASS32 |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/arg.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_ARG_H_ |
#define KERN_ppc64_ARG_H_ |
#include <stdarg.h> |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/atomic.h |
---|
0,0 → 1,97 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_ATOMIC_H_ |
#define KERN_ppc64_ATOMIC_H_ |
static inline void atomic_inc(atomic_t *val) |
{ |
long tmp; |
asm volatile ( |
"1:\n" |
"lwarx %0, 0, %2\n" |
"addic %0, %0, 1\n" |
"stwcx. %0, 0, %2\n" |
"bne- 1b" |
: "=&r" (tmp), "=m" (val->count) |
: "r" (&val->count), "m" (val->count) |
: "cc" |
); |
} |
static inline void atomic_dec(atomic_t *val) |
{ |
long tmp; |
asm volatile ( |
"1:\n" |
"lwarx %0, 0, %2\n" |
"addic %0, %0, -1\n" |
"stwcx. %0, 0, %2\n" |
"bne- 1b" |
: "=&r" (tmp), "=m" (val->count) |
: "r" (&val->count), "m" (val->count) |
: "cc" |
); |
} |
static inline long atomic_postinc(atomic_t *val) |
{ |
atomic_inc(val); |
return val->count - 1; |
} |
static inline long atomic_postdec(atomic_t *val) |
{ |
atomic_dec(val); |
return val->count + 1; |
} |
static inline long atomic_preinc(atomic_t *val) |
{ |
atomic_inc(val); |
return val->count; |
} |
static inline long atomic_predec(atomic_t *val) |
{ |
atomic_dec(val); |
return val->count; |
} |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/boot/boot.h |
---|
0,0 → 1,92 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_BOOT_H_ |
#define KERN_ppc64_BOOT_H_ |
#define BOOT_OFFSET 0x4000 |
/* Temporary stack size for boot process */ |
#define TEMP_STACK_SIZE 0x100 |
#define TASKMAP_MAX_RECORDS 32 |
#define MEMMAP_MAX_RECORDS 32 |
#ifndef __ASM__ |
#include <arch/types.h> |
typedef struct { |
uintptr_t addr; |
uint64_t size; |
} utask_t; |
typedef struct { |
uint32_t count; |
utask_t tasks[TASKMAP_MAX_RECORDS]; |
} taskmap_t; |
typedef struct { |
uintptr_t start; |
uint64_t size; |
} memzone_t; |
typedef struct { |
uint64_t total; |
uint32_t count; |
memzone_t zones[MEMMAP_MAX_RECORDS]; |
} memmap_t; |
typedef struct { |
uintptr_t addr; |
unsigned int width; |
unsigned int height; |
unsigned int bpp; |
unsigned int scanline; |
} screen_t; |
typedef struct { |
taskmap_t taskmap; |
memmap_t memmap; |
screen_t screen; |
} bootinfo_t; |
extern bootinfo_t bootinfo; |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/arch.h |
---|
0,0 → 1,41 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_ARCH_H_ |
#define KERN_ppc64_ARCH_H_ |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/proc/task.h |
---|
0,0 → 1,47 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64proc |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_TASK_H_ |
#define KERN_ppc64_TASK_H_ |
typedef struct { |
} task_arch_t; |
#define task_create_arch(t) |
#define task_destroy_arch(t) |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/proc/thread.h |
---|
0,0 → 1,48 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64proc |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_THREAD_H_ |
#define KERN_ppc64_THREAD_H_ |
typedef struct { |
} thread_arch_t; |
#define thr_constructor_arch(t) |
#define thr_destructor_arch(t) |
#define thread_create_arch(t) |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/asm.h |
---|
0,0 → 1,161 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_ASM_H_ |
#define KERN_ppc64_ASM_H_ |
#include <arch/types.h> |
#include <config.h> |
/** Enable interrupts. |
* |
* Enable interrupts and return previous |
* value of EE. |
* |
* @return Old interrupt priority level. |
*/ |
static inline ipl_t interrupts_enable(void) |
{ |
ipl_t v; |
ipl_t tmp; |
asm volatile ( |
"mfmsr %0\n" |
"mfmsr %1\n" |
"ori %1, %1, 1 << 15\n" |
"mtmsr %1\n" |
: "=r" (v), "=r" (tmp) |
); |
return v; |
} |
/** Disable interrupts. |
* |
* Disable interrupts and return previous |
* value of EE. |
* |
* @return Old interrupt priority level. |
*/ |
static inline ipl_t interrupts_disable(void) |
{ |
ipl_t v; |
ipl_t tmp; |
asm volatile ( |
"mfmsr %0\n" |
"mfmsr %1\n" |
"rlwinm %1, %1, 0, 17, 15\n" |
"mtmsr %1\n" |
: "=r" (v), "=r" (tmp) |
); |
return v; |
} |
/** Restore interrupt priority level. |
* |
* Restore EE. |
* |
* @param ipl Saved interrupt priority level. |
*/ |
static inline void interrupts_restore(ipl_t ipl) |
{ |
ipl_t tmp; |
asm volatile ( |
"mfmsr %1\n" |
"rlwimi %0, %1, 0, 17, 15\n" |
"cmpw 0, %0, %1\n" |
"beq 0f\n" |
"mtmsr %0\n" |
"0:\n" |
: "=r" (ipl), "=r" (tmp) |
: "0" (ipl) |
: "cr0" |
); |
} |
/** Return interrupt priority level. |
* |
* Return EE. |
* |
* @return Current interrupt priority level. |
*/ |
static inline ipl_t interrupts_read(void) |
{ |
ipl_t v; |
asm volatile ( |
"mfmsr %0\n" |
: "=r" (v) |
); |
return v; |
} |
/** Return base address of current stack. |
* |
* Return the base address of the current stack. |
* The stack is assumed to be STACK_SIZE bytes long. |
* The stack must start on page boundary. |
*/ |
static inline uintptr_t get_stack_base(void) |
{ |
uintptr_t v; |
asm volatile ( |
"and %0, %%sp, %1\n" |
: "=r" (v) |
: "r" (~(STACK_SIZE - 1)) |
); |
return v; |
} |
static inline void cpu_sleep(void) |
{ |
} |
static inline void cpu_halt(void) |
{ |
asm volatile ( |
"b 0\n" |
); |
} |
void asm_delay_loop(uint32_t t); |
extern void userspace_asm(uintptr_t uspace_uarg, uintptr_t stack, uintptr_t entry); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/faddr.h |
---|
0,0 → 1,45 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_FADDR_H_ |
#define KERN_ppc64_FADDR_H_ |
#include <arch/types.h> |
#define FADDR(fptr) ((uintptr_t) (fptr)) |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/include/debug.h |
---|
0,0 → 1,41 |
/* |
* Copyright (c) 2005 |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64debug |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_ppc64_DEBUG_H_ |
#define KERN_ppc64_DEBUG_H_ |
#endif |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/asm.S |
---|
0,0 → 1,315 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include <arch/asm/regname.h> |
.text |
.global userspace_asm |
.global iret |
.global iret_syscall |
.global memsetb |
.global memcpy |
.global memcpy_from_uspace |
.global memcpy_to_uspace |
.global memcpy_from_uspace_failover_address |
.global memcpy_to_uspace_failover_address |
userspace_asm: |
# r3 = uspace_uarg |
# r4 = stack |
# r5 = entry |
# disable interrupts |
mfmsr r31 |
rlwinm r31, r31, 0, 17, 15 |
mtmsr r31 |
# set entry point |
mtsrr0 r5 |
# set problem state, enable interrupts |
ori r31, r31, msr_pr |
ori r31, r31, msr_ee |
mtsrr1 r31 |
# set stack |
mr sp, r4 |
# %r3 is defined to hold pcb_ptr - set it to 0 |
xor r3, r3, r3 |
# jump to userspace |
rfi |
iret: |
# disable interrupts |
mfmsr r31 |
rlwinm r31, r31, 0, 17, 15 |
mtmsr r31 |
lwz r0, 8(sp) |
lwz r2, 12(sp) |
lwz r3, 16(sp) |
lwz r4, 20(sp) |
lwz r5, 24(sp) |
lwz r6, 28(sp) |
lwz r7, 32(sp) |
lwz r8, 36(sp) |
lwz r9, 40(sp) |
lwz r10, 44(sp) |
lwz r11, 48(sp) |
lwz r13, 52(sp) |
lwz r14, 56(sp) |
lwz r15, 60(sp) |
lwz r16, 64(sp) |
lwz r17, 68(sp) |
lwz r18, 72(sp) |
lwz r19, 76(sp) |
lwz r20, 80(sp) |
lwz r21, 84(sp) |
lwz r22, 88(sp) |
lwz r23, 92(sp) |
lwz r24, 96(sp) |
lwz r25, 100(sp) |
lwz r26, 104(sp) |
lwz r27, 108(sp) |
lwz r28, 112(sp) |
lwz r29, 116(sp) |
lwz r30, 120(sp) |
lwz r31, 124(sp) |
lwz r12, 128(sp) |
mtcr r12 |
lwz r12, 132(sp) |
mtsrr0 r12 |
lwz r12, 136(sp) |
mtsrr1 r12 |
lwz r12, 140(sp) |
mtlr r12 |
lwz r12, 144(sp) |
mtctr r12 |
lwz r12, 148(sp) |
mtxer r12 |
lwz r12, 152(sp) |
lwz sp, 156(sp) |
rfi |
iret_syscall: |
# reset decrementer |
li r31, 1000 |
mtdec r31 |
# disable interrupts |
mfmsr r31 |
rlwinm r31, r31, 0, 17, 15 |
mtmsr r31 |
lwz r0, 8(sp) |
lwz r2, 12(sp) |
lwz r4, 20(sp) |
lwz r5, 24(sp) |
lwz r6, 28(sp) |
lwz r7, 32(sp) |
lwz r8, 36(sp) |
lwz r9, 40(sp) |
lwz r10, 44(sp) |
lwz r11, 48(sp) |
lwz r13, 52(sp) |
lwz r14, 56(sp) |
lwz r15, 60(sp) |
lwz r16, 64(sp) |
lwz r17, 68(sp) |
lwz r18, 72(sp) |
lwz r19, 76(sp) |
lwz r20, 80(sp) |
lwz r21, 84(sp) |
lwz r22, 88(sp) |
lwz r23, 92(sp) |
lwz r24, 96(sp) |
lwz r25, 100(sp) |
lwz r26, 104(sp) |
lwz r27, 108(sp) |
lwz r28, 112(sp) |
lwz r29, 116(sp) |
lwz r30, 120(sp) |
lwz r31, 124(sp) |
lwz r12, 128(sp) |
mtcr r12 |
lwz r12, 132(sp) |
mtsrr0 r12 |
lwz r12, 136(sp) |
mtsrr1 r12 |
lwz r12, 140(sp) |
mtlr r12 |
lwz r12, 144(sp) |
mtctr r12 |
lwz r12, 148(sp) |
mtxer r12 |
lwz r12, 152(sp) |
lwz sp, 156(sp) |
rfi |
memsetb: |
rlwimi r5, r5, 8, 16, 23 |
rlwimi r5, r5, 16, 0, 15 |
addi r14, r3, -4 |
cmplwi 0, r4, 4 |
blt 7f |
stwu r5, 4(r14) |
beqlr |
andi. r15, r14, 3 |
add r4, r15, r4 |
subf r14, r15, r14 |
srwi r15, r4, 2 |
mtctr r15 |
bdz 6f |
1: |
stwu r5, 4(r14) |
bdnz 1b |
6: |
andi. r4, r4, 3 |
7: |
cmpwi 0, r4, 0 |
beqlr |
mtctr r4 |
addi r6, r6, 3 |
8: |
stbu r5, 1(r14) |
bdnz 8b |
blr |
memcpy: |
memcpy_from_uspace: |
memcpy_to_uspace: |
srwi. r7, r5, 3 |
addi r6, r3, -4 |
addi r4, r4, -4 |
beq 2f |
andi. r0, r6, 3 |
mtctr r7 |
bne 5f |
1: |
lwz r7, 4(r4) |
lwzu r8, 8(r4) |
stw r7, 4(r6) |
stwu r8, 8(r6) |
bdnz 1b |
andi. r5, r5, 7 |
2: |
cmplwi 0, r5, 4 |
blt 3f |
lwzu r0, 4(r4) |
addi r5, r5, -4 |
stwu r0, 4(r6) |
3: |
cmpwi 0, r5, 0 |
beqlr |
mtctr r5 |
addi r4, r4, 3 |
addi r6, r6, 3 |
4: |
lbzu r0, 1(r4) |
stbu r0, 1(r6) |
bdnz 4b |
blr |
5: |
subfic r0, r0, 4 |
mtctr r0 |
6: |
lbz r7, 4(r4) |
addi r4, r4, 1 |
stb r7, 4(r6) |
addi r6, r6, 1 |
bdnz 6b |
subf r5, r0, r5 |
rlwinm. r7, r5, 32-3, 3, 31 |
beq 2b |
mtctr r7 |
b 1b |
memcpy_from_uspace_failover_address: |
memcpy_to_uspace_failover_address: |
b memcpy_from_uspace_failover_address |
/branches/arm/kernel/arch/ppc64/src/mm/page.c |
---|
0,0 → 1,305 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/mm/page.h> |
#include <genarch/mm/page_pt.h> |
#include <arch/mm/frame.h> |
#include <arch/asm.h> |
#include <mm/frame.h> |
#include <mm/page.h> |
#include <mm/as.h> |
#include <arch.h> |
#include <arch/types.h> |
#include <arch/exception.h> |
#include <align.h> |
#include <config.h> |
#include <print.h> |
#include <symtab.h> |
static phte_t *phte; |
/** Try to find PTE for faulting address |
* |
* Try to find PTE for faulting address. |
* The as->lock must be held on entry to this function |
* if lock is true. |
* |
* @param as Address space. |
* @param lock Lock/unlock the address space. |
* @param badvaddr Faulting virtual address. |
* @param access Access mode that caused the fault. |
* @param istate Pointer to interrupted state. |
* @param pfrc Pointer to variable where as_page_fault() return code will be stored. |
* @return PTE on success, NULL otherwise. |
* |
*/ |
static pte_t *find_mapping_and_check(as_t *as, bool lock, uintptr_t badvaddr, int access, |
istate_t *istate, int *pfrc) |
{ |
/* |
* Check if the mapping exists in page tables. |
*/ |
pte_t *pte = page_mapping_find(as, badvaddr); |
if ((pte) && (pte->p)) { |
/* |
* Mapping found in page tables. |
* Immediately succeed. |
*/ |
return pte; |
} else { |
int rc; |
/* |
* Mapping not found in page tables. |
* Resort to higher-level page fault handler. |
*/ |
page_table_unlock(as, lock); |
switch (rc = as_page_fault(badvaddr, access, istate)) { |
case AS_PF_OK: |
/* |
* The higher-level page fault handler succeeded, |
* The mapping ought to be in place. |
*/ |
page_table_lock(as, lock); |
pte = page_mapping_find(as, badvaddr); |
ASSERT((pte) && (pte->p)); |
*pfrc = 0; |
return pte; |
case AS_PF_DEFER: |
page_table_lock(as, lock); |
*pfrc = rc; |
return NULL; |
case AS_PF_FAULT: |
page_table_lock(as, lock); |
printf("Page fault.\n"); |
*pfrc = rc; |
return NULL; |
default: |
panic("unexpected rc (%d)\n", rc); |
} |
} |
} |
static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate) |
{ |
char *symbol = ""; |
char *sym2 = ""; |
char *s = get_symtab_entry(istate->pc); |
if (s) |
symbol = s; |
s = get_symtab_entry(istate->lr); |
if (s) |
sym2 = s; |
panic("%p: PHT Refill Exception at %p (%s<-%s)\n", badvaddr, istate->pc, symbol, sym2); |
} |
static void pht_insert(const uintptr_t vaddr, const pfn_t pfn) |
{ |
uint32_t page = (vaddr >> 12) & 0xffff; |
uint32_t api = (vaddr >> 22) & 0x3f; |
uint32_t vsid; |
asm volatile ( |
"mfsrin %0, %1\n" |
: "=r" (vsid) |
: "r" (vaddr) |
); |
/* Primary hash (xor) */ |
uint32_t h = 0; |
uint32_t hash = vsid ^ page; |
uint32_t base = (hash & 0x3ff) << 3; |
uint32_t i; |
bool found = false; |
/* Find unused or colliding |
PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if ((!phte[base + i].v) || ((phte[base + i].vsid == vsid) && (phte[base + i].api == api))) { |
found = true; |
break; |
} |
} |
if (!found) { |
/* Secondary hash (not) */ |
uint32_t base2 = (~hash & 0x3ff) << 3; |
/* Find unused or colliding |
PTE in PTEG */ |
for (i = 0; i < 8; i++) { |
if ((!phte[base2 + i].v) || ((phte[base2 + i].vsid == vsid) && (phte[base2 + i].api == api))) { |
found = true; |
base = base2; |
h = 1; |
break; |
} |
} |
if (!found) { |
// TODO: A/C precedence groups |
i = page % 8; |
} |
} |
phte[base + i].v = 1; |
phte[base + i].vsid = vsid; |
phte[base + i].h = h; |
phte[base + i].api = api; |
phte[base + i].rpn = pfn; |
phte[base + i].r = 0; |
phte[base + i].c = 0; |
phte[base + i].pp = 2; // FIXME |
} |
/** Process Instruction/Data Storage Interrupt |
* |
* @param data True if Data Storage Interrupt. |
* @param istate Interrupted register context. |
* |
*/ |
void pht_refill(bool data, istate_t *istate) |
{ |
uintptr_t badvaddr; |
pte_t *pte; |
int pfrc; |
as_t *as; |
bool lock; |
if (AS == NULL) { |
as = AS_KERNEL; |
lock = false; |
} else { |
as = AS; |
lock = true; |
} |
if (data) { |
asm volatile ( |
"mfdar %0\n" |
: "=r" (badvaddr) |
); |
} else |
badvaddr = istate->pc; |
page_table_lock(as, lock); |
pte = find_mapping_and_check(as, lock, badvaddr, PF_ACCESS_READ /* FIXME */, istate, &pfrc); |
if (!pte) { |
switch (pfrc) { |
case AS_PF_FAULT: |
goto fail; |
break; |
case AS_PF_DEFER: |
/* |
* The page fault came during copy_from_uspace() |
* or copy_to_uspace(). |
*/ |
page_table_unlock(as, lock); |
return; |
default: |
panic("Unexpected pfrc (%d)\n", pfrc); |
} |
} |
pte->a = 1; /* Record access to PTE */ |
pht_insert(badvaddr, pte->pfn); |
page_table_unlock(as, lock); |
return; |
fail: |
page_table_unlock(as, lock); |
pht_refill_fail(badvaddr, istate); |
} |
void pht_init(void) |
{ |
memsetb(phte, 1 << PHT_BITS, 0); |
} |
void page_arch_init(void) |
{ |
if (config.cpu_active == 1) { |
page_mapping_operations = &pt_mapping_operations; |
uintptr_t cur; |
int flags; |
for (cur = 128 << 20; cur < last_frame; cur += FRAME_SIZE) { |
flags = PAGE_CACHEABLE | PAGE_WRITE; |
if ((PA2KA(cur) >= config.base) && (PA2KA(cur) < config.base + config.kernel_size)) |
flags |= PAGE_GLOBAL; |
page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
} |
/* Allocate page hash table */ |
phte_t *physical_phte = (phte_t *) frame_alloc(PHT_ORDER, FRAME_KA | FRAME_ATOMIC); |
ASSERT((uintptr_t) physical_phte % (1 << PHT_BITS) == 0); |
pht_init(); |
asm volatile ( |
"mtsdr1 %0\n" |
: |
: "r" ((uintptr_t) physical_phte) |
); |
} |
} |
uintptr_t hw_map(uintptr_t physaddr, size_t size) |
{ |
if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) |
panic("Unable to map physical memory %p (%" PRIs " bytes)", physaddr, size) |
uintptr_t virtaddr = PA2KA(last_frame); |
pfn_t i; |
for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) |
page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i), physaddr + PFN2ADDR(i), PAGE_NOT_CACHEABLE | PAGE_WRITE); |
last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE); |
return virtaddr; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/mm/frame.c |
---|
0,0 → 1,84 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/boot/boot.h> |
#include <arch/mm/frame.h> |
#include <mm/frame.h> |
#include <align.h> |
#include <macros.h> |
#include <print.h> |
uintptr_t last_frame = 0; |
void physmem_print(void) |
{ |
unsigned int i; |
printf("Base Size\n"); |
printf("---------- ----------\n"); |
for (i = 0; i < bootinfo.memmap.count; i++) { |
printf("%#10x %#10x\n", bootinfo.memmap.zones[i].start, |
bootinfo.memmap.zones[i].size); |
} |
} |
void frame_arch_init(void) |
{ |
pfn_t minconf = 2; |
count_t i; |
pfn_t start, conf; |
size_t size; |
for (i = 0; i < bootinfo.memmap.count; i++) { |
start = ADDR2PFN(ALIGN_UP(bootinfo.memmap.zones[i].start, FRAME_SIZE)); |
size = SIZE2FRAMES(ALIGN_DOWN(bootinfo.memmap.zones[i].size, FRAME_SIZE)); |
if ((minconf < start) || (minconf >= start + size)) |
conf = start; |
else |
conf = minconf; |
zone_create(start, size, conf, 0); |
if (last_frame < ALIGN_UP(bootinfo.memmap.zones[i].start + bootinfo.memmap.zones[i].size, FRAME_SIZE)) |
last_frame = ALIGN_UP(bootinfo.memmap.zones[i].start + bootinfo.memmap.zones[i].size, FRAME_SIZE); |
} |
/* First is exception vector, second is 'implementation specific', third and fourth is reserved */ |
frame_mark_unavailable(0, 4); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/mm/as.c |
---|
0,0 → 1,46 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/mm/as.h> |
#include <genarch/mm/page_pt.h> |
/** Architecture dependent address space init. */ |
void as_arch_init(void) |
{ |
as_operations = &as_pt_operations; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/mm/tlb.c |
---|
0,0 → 1,86 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64mm |
* @{ |
*/ |
/** @file |
*/ |
#include <mm/tlb.h> |
/** Initialize Page Hash Table. |
* |
* Setup the Page Hash Table with no entries. |
* |
*/ |
void tlb_arch_init(void) |
{ |
tlb_invalidate_all(); |
} |
void tlb_invalidate_all(void) |
{ |
asm volatile ( |
"tlbia\n" |
"tlbsync\n" |
); |
} |
/** Invalidate all entries in TLB that belong to specified address space. |
* |
* @param asid This parameter is ignored as the architecture doesn't support it. |
*/ |
void tlb_invalidate_asid(asid_t asid) |
{ |
tlb_invalidate_all(); |
} |
/** Invalidate TLB entries for specified page range belonging to specified address space. |
* |
* @param asid This parameter is ignored as the architecture doesn't support it. |
* @param page Address of the first page whose entry is to be invalidated. |
* @param cnt Number of entries to invalidate. |
*/ |
void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
{ |
tlb_invalidate_all(); |
} |
/** Print contents of Page Hash Table. */ |
void tlb_print(void) |
{ |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/cpu/cpu.c |
---|
0,0 → 1,60 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/cpu.h> |
#include <arch/cpuid.h> |
#include <cpu.h> |
#include <arch.h> |
#include <print.h> |
void cpu_arch_init(void) |
{ |
} |
void cpu_identify(void) |
{ |
cpu_info_t info; |
cpu_version(&info); |
CPU->arch.version = info.version; |
CPU->arch.revision = info.revision; |
} |
void cpu_print_report(cpu_t *m) |
{ |
printf("cpu%u: version=%d, revision=%d\n", m->id, m->arch.version, m->arch.revision); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/interrupt.c |
---|
0,0 → 1,108 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64interrupt |
* @{ |
*/ |
/** @file |
*/ |
#include <ddi/irq.h> |
#include <interrupt.h> |
#include <arch/interrupt.h> |
#include <arch/types.h> |
#include <arch.h> |
#include <time/clock.h> |
#include <ipc/sysipc.h> |
#include <arch/drivers/pic.h> |
#include <arch/mm/tlb.h> |
#include <print.h> |
void start_decrementer(void) |
{ |
asm volatile ( |
"mtdec %0\n" |
: |
: "r" (1000) |
); |
} |
/** Handler of external interrupts */ |
static void exception_external(int n, istate_t *istate) |
{ |
int inum; |
while ((inum = pic_get_pending()) != -1) { |
bool ack = false; |
irq_t *irq = irq_dispatch_and_lock(inum); |
if (irq) { |
/* |
* The IRQ handler was found. |
*/ |
if (irq->preack) { |
/* Acknowledge the interrupt before processing */ |
pic_ack_interrupt(inum); |
ack = true; |
} |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
/* |
* Spurious interrupt. |
*/ |
#ifdef CONFIG_DEBUG |
printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, inum); |
#endif |
} |
if (!ack) |
pic_ack_interrupt(inum); |
} |
} |
static void exception_decrementer(int n, istate_t *istate) |
{ |
clock(); |
start_decrementer(); |
} |
/* Initialize basic tables for exception dispatching */ |
void interrupt_init(void) |
{ |
exc_register(VECTOR_EXTERNAL, "external", exception_external); |
exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/context.S |
---|
0,0 → 1,61 |
# |
# Copyright (c) 2005 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include <arch/asm/regname.h> |
#include <arch/context_offset.h> |
.text |
.global context_save_arch |
.global context_restore_arch |
context_save_arch: |
CONTEXT_SAVE_ARCH_CORE r3 |
mflr r4 |
stw r4, OFFSET_PC(r3) |
mfcr r4 |
stw r4, OFFSET_CR(r3) |
# context_save returns 1 |
li r3, 1 |
blr |
context_restore_arch: |
CONTEXT_RESTORE_ARCH_CORE r3 |
lwz r4, OFFSET_CR(r3) |
mtcr r4 |
lwz r4, OFFSET_PC(r3) |
mtlr r4 |
# context_restore returns 0 |
li r3, 0 |
blr |
/branches/arm/kernel/arch/ppc64/src/ppc64.c |
---|
0,0 → 1,144 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#include <arch.h> |
#include <arch/boot/boot.h> |
#include <arch/interrupt.h> |
#include <genarch/fb/fb.h> |
#include <genarch/fb/visuals.h> |
#include <userspace.h> |
#include <proc/uarg.h> |
#include <console/console.h> |
bootinfo_t bootinfo; |
void arch_pre_main(void) |
{ |
/* Setup usermode */ |
init.cnt = bootinfo.taskmap.count; |
uint32_t i; |
for (i = 0; i < bootinfo.taskmap.count; i++) { |
init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr); |
init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
} |
} |
void arch_pre_mm_init(void) |
{ |
/* Initialize dispatch table */ |
interrupt_init(); |
/* Start decrementer */ |
start_decrementer(); |
} |
void arch_post_mm_init(void) |
{ |
if (config.cpu_active == 1) { |
/* Initialize framebuffer */ |
unsigned int visual; |
switch (bootinfo.screen.bpp) { |
case 8: |
visual = VISUAL_INDIRECT_8; |
break; |
case 16: |
visual = VISUAL_RGB_5_5_5; |
break; |
case 24: |
visual = VISUAL_RGB_8_8_8; |
break; |
case 32: |
visual = VISUAL_RGB_0_8_8_8; |
break; |
default: |
panic("Unsupported bits per pixel"); |
} |
fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual); |
/* Merge all zones to 1 big zone */ |
zone_merge_all(); |
} |
} |
void arch_post_cpu_init(void) |
{ |
} |
void arch_pre_smp_init(void) |
{ |
} |
void arch_post_smp_init(void) |
{ |
} |
void calibrate_delay_loop(void) |
{ |
} |
void userspace(uspace_arg_t *kernel_uarg) |
{ |
userspace_asm((uintptr_t) kernel_uarg->uspace_uarg, (uintptr_t) kernel_uarg->uspace_stack + THREAD_STACK_SIZE - SP_DELTA, (uintptr_t) kernel_uarg->uspace_entry); |
/* Unreachable */ |
for (;;) |
; |
} |
/** Acquire console back for kernel |
* |
*/ |
void arch_grab_console(void) |
{ |
} |
/** Return console to userspace |
* |
*/ |
void arch_release_console(void) |
{ |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/ddi/ddi.c |
---|
0,0 → 1,55 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64ddi |
* @{ |
*/ |
/** @file |
*/ |
#include <ddi/ddi.h> |
#include <proc/task.h> |
#include <arch/types.h> |
/** Enable I/O space range for task. |
* |
* Interrupts are disabled and task is locked. |
* |
* @param task Task. |
* @param ioaddr Startign I/O space address. |
* @param size Size of the enabled I/O range. |
* |
* @return 0 on success or an error code from errno.h. |
*/ |
int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size) |
{ |
return 0; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/drivers/pic.c |
---|
0,0 → 1,94 |
/* |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64 |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/drivers/pic.h> |
#include <mm/page.h> |
#include <byteorder.h> |
#include <bitops.h> |
static volatile uint32_t *pic; |
void pic_init(uintptr_t base, size_t size) |
{ |
pic = (uint32_t *) hw_map(base, size); |
} |
void pic_enable_interrupt(int intnum) |
{ |
if (intnum < 32) { |
pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] | (1 << intnum); |
} else { |
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum - 32)); |
} |
} |
void pic_disable_interrupt(int intnum) |
{ |
if (intnum < 32) { |
pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] & (~(1 << intnum)); |
} else { |
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum - 32))); |
} |
} |
void pic_ack_interrupt(int intnum) |
{ |
if (intnum < 32) |
pic[PIC_ACK_LOW] = 1 << intnum; |
else |
pic[PIC_ACK_HIGH] = 1 << (intnum - 32); |
} |
/** Return number of pending interrupt */ |
int pic_get_pending(void) |
{ |
int pending; |
pending = pic[PIC_PENDING_LOW]; |
if (pending) |
return fnzb32(pending); |
pending = pic[PIC_PENDING_HIGH]; |
if (pending) |
return fnzb32(pending) + 32; |
return -1; |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/exception.S |
---|
0,0 → 1,237 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include <arch/asm/regname.h> |
#include <arch/mm/page.h> |
.section K_UNMAPPED_TEXT_START, "ax" |
.macro CONTEXT_STORE |
# save R12 in SPRG1, backup CR in R12 |
# save SP in SPRG2 |
mtsprg1 r12 |
mfcr r12 |
mtsprg2 sp |
# check whether SP is in kernel |
andis. sp, sp, 0x8000 |
bne 1f |
# stack is in user-space |
mfsprg0 sp |
b 2f |
1: |
# stack is in kernel |
mfsprg2 sp |
subis sp, sp, 0x8000 |
2: |
subi sp, sp, 160 |
stw r0, 8(sp) |
stw r2, 12(sp) |
stw r3, 16(sp) |
stw r4, 20(sp) |
stw r5, 24(sp) |
stw r6, 28(sp) |
stw r7, 32(sp) |
stw r8, 36(sp) |
stw r9, 40(sp) |
stw r10, 44(sp) |
stw r11, 48(sp) |
stw r13, 52(sp) |
stw r14, 56(sp) |
stw r15, 60(sp) |
stw r16, 64(sp) |
stw r17, 68(sp) |
stw r18, 72(sp) |
stw r19, 76(sp) |
stw r20, 80(sp) |
stw r21, 84(sp) |
stw r22, 88(sp) |
stw r23, 92(sp) |
stw r24, 96(sp) |
stw r25, 100(sp) |
stw r26, 104(sp) |
stw r27, 108(sp) |
stw r28, 112(sp) |
stw r29, 116(sp) |
stw r30, 120(sp) |
stw r31, 124(sp) |
stw r12, 128(sp) |
mfsrr0 r12 |
stw r12, 132(sp) |
mfsrr1 r12 |
stw r12, 136(sp) |
mflr r12 |
stw r12, 140(sp) |
mfctr r12 |
stw r12, 144(sp) |
mfxer r12 |
stw r12, 148(sp) |
mfsprg1 r12 |
stw r12, 152(sp) |
mfsprg2 r12 |
stw r12, 156(sp) |
.endm |
.org 0x060 |
jump_to_kernel: |
lis r12, iret@ha |
addi r12, r12, iret@l |
mtlr r12 |
mfmsr r12 |
ori r12, r12, (msr_ir | msr_dr)@l |
mtsrr1 r12 |
addis sp, sp, 0x8000 |
mr r4, sp |
addi r4, r4, 8 |
rfi |
jump_to_kernel_syscall: |
lis r12, syscall_handler@ha |
addi r12, r12, syscall_handler@l |
mtsrr0 r12 |
lis r12, iret_syscall@ha |
addi r12, r12, iret_syscall@l |
mtlr r12 |
mfmsr r12 |
ori r12, r12, (msr_ir | msr_dr)@l |
mtsrr1 r12 |
addis sp, sp, 0x8000 |
rfi |
.org 0x100 |
.global exc_system_reset |
exc_system_reset: |
b exc_system_reset |
.org 0x200 |
.global exc_machine_check |
exc_machine_check: |
b exc_machine_check |
.org 0x300 |
.global exc_data_storage |
exc_data_storage: |
CONTEXT_STORE |
lis r12, pht_refill@ha |
addi r12, r12, pht_refill@l |
mtsrr0 r12 |
li r3, 1 |
b jump_to_kernel |
.org 0x400 |
.global exc_instruction_storage |
exc_instruction_storage: |
CONTEXT_STORE |
lis r12, pht_refill@ha |
addi r12, r12, pht_refill@l |
mtsrr0 r12 |
li r3, 0 |
b jump_to_kernel |
.org 0x500 |
.global exc_external |
exc_external: |
b exc_external |
.org 0x600 |
.global exc_alignment |
exc_alignment: |
b exc_alignment |
.org 0x700 |
.global exc_program |
exc_program: |
b exc_program |
.org 0x800 |
.global exc_fp_unavailable |
exc_fp_unavailable: |
b exc_fp_unavailable |
.org 0x900 |
.global exc_decrementer |
exc_decrementer: |
CONTEXT_STORE |
lis r12, exc_dispatch@ha |
addi r12, r12, exc_dispatch@l |
mtsrr0 r12 |
li r3, 10 |
b jump_to_kernel |
.org 0xa00 |
.global exc_reserved0 |
exc_reserved0: |
b exc_reserved0 |
.org 0xb00 |
.global exc_reserved1 |
exc_reserved1: |
b exc_reserved1 |
.org 0xc00 |
.global exc_syscall |
exc_syscall: |
CONTEXT_STORE |
b jump_to_kernel_syscall |
.org 0xd00 |
.global exc_trace |
exc_trace: |
b exc_trace |
/branches/arm/kernel/arch/ppc64/src/fpu_context.S |
---|
0,0 → 1,105 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include <arch/asm/regname.h> |
#include <arch/context_offset.h> |
.text |
.global fpu_context_save |
.global fpu_context_restore |
.global fpu_init |
.global fpu_enable |
.global fpu_disable |
.macro FPU_CONTEXT_STORE r |
stfd fr14, OFFSET_FR14(\r) |
stfd fr15, OFFSET_FR15(\r) |
stfd fr16, OFFSET_FR16(\r) |
stfd fr17, OFFSET_FR17(\r) |
stfd fr18, OFFSET_FR18(\r) |
stfd fr19, OFFSET_FR19(\r) |
stfd fr20, OFFSET_FR20(\r) |
stfd fr21, OFFSET_FR21(\r) |
stfd fr22, OFFSET_FR22(\r) |
stfd fr23, OFFSET_FR23(\r) |
stfd fr24, OFFSET_FR24(\r) |
stfd fr25, OFFSET_FR25(\r) |
stfd fr26, OFFSET_FR26(\r) |
stfd fr27, OFFSET_FR27(\r) |
stfd fr28, OFFSET_FR28(\r) |
stfd fr29, OFFSET_FR29(\r) |
stfd fr30, OFFSET_FR30(\r) |
stfd fr31, OFFSET_FR31(\r) |
.endm |
.macro FPU_CONTEXT_LOAD r |
lfd fr14, OFFSET_FR14(\r) |
lfd fr15, OFFSET_FR15(\r) |
lfd fr16, OFFSET_FR16(\r) |
lfd fr17, OFFSET_FR17(\r) |
lfd fr18, OFFSET_FR18(\r) |
lfd fr19, OFFSET_FR19(\r) |
lfd fr20, OFFSET_FR20(\r) |
lfd fr21, OFFSET_FR21(\r) |
lfd fr22, OFFSET_FR22(\r) |
lfd fr23, OFFSET_FR23(\r) |
lfd fr24, OFFSET_FR24(\r) |
lfd fr25, OFFSET_FR25(\r) |
lfd fr26, OFFSET_FR26(\r) |
lfd fr27, OFFSET_FR27(\r) |
lfd fr28, OFFSET_FR28(\r) |
lfd fr29, OFFSET_FR29(\r) |
lfd fr30, OFFSET_FR30(\r) |
lfd fr31, OFFSET_FR31(\r) |
.endm |
fpu_context_save: |
// FPU_CONTEXT_STORE r3 |
// |
// mffs fr0 |
// stfd fr0, OFFSET_FPSCR(r3) |
blr |
fpu_context_restore: |
// FPU_CONTEXT_LOAD r3 |
// |
// lfd fr0, OFFSET_FPSCR(r3) |
// mtfsf 7, fr0 |
blr |
fpu_init: |
blr |
fpu_enable: |
blr |
fpu_disable: |
blr |
/branches/arm/kernel/arch/ppc64/src/boot/boot.S |
---|
0,0 → 1,81 |
# |
# Copyright (c) 2005 Jakub Jermar |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include <arch/asm/regname.h> |
#include <arch/boot/boot.h> |
.section K_TEXT_START, "ax" |
.global kernel_image_start |
kernel_image_start: |
# load temporal kernel stack |
lis sp, kernel_stack@ha |
addi sp, sp, kernel_stack@l |
# set kernel stack for interrupt handling |
mr r31, sp |
subis r31, r31, 0x8000 |
mtsprg0 r31 |
# r3 contains physical address of bootinfo_t |
# r4 contains size of bootinfo_t |
addis r3, r3, 0x8000 |
lis r31, bootinfo@ha |
addi r31, r31, bootinfo@l # r31 = bootinfo |
cmpwi r4, 0 |
beq bootinfo_end |
bootinfo_loop: |
lwz r30, 0(r3) |
stw r30, 0(r31) |
addi r3, r3, 4 |
addi r31, r31, 4 |
subi r4, r4, 4 |
cmpwi r4, 0 |
bgt bootinfo_loop |
bootinfo_end: |
bl arch_pre_main |
b main_bsp |
.section K_DATA_START, "aw", @progbits |
.align 12 |
kernel_stack_bottom: |
.space TEMP_STACK_SIZE |
kernel_stack: |
/branches/arm/kernel/arch/ppc64/src/proc/scheduler.c |
---|
0,0 → 1,63 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup ppc64proc |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/mm/page.h> |
#include <arch/boot/boot.h> |
#include <proc/scheduler.h> |
#include <proc/thread.h> |
#include <arch.h> |
/** Perform ppc64 specific tasks needed before the new task is run. */ |
void before_task_runs_arch(void) |
{ |
} |
/** Perform ppc64 specific tasks needed before the new thread is scheduled. */ |
void before_thread_runs_arch(void) |
{ |
pht_init(); |
tlb_invalidate_all(); |
asm volatile ( |
"mtsprg0 %0\n" |
: |
: "r" (KA2PA(&THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA])) |
); |
} |
void after_thread_ran_arch(void) |
{ |
} |
/** @} |
*/ |
/branches/arm/kernel/arch/ppc64/src/debug/panic.s |
---|
0,0 → 1,38 |
# |
# Copyright (c) 2005 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include <arch/asm/macro.h> |
.text |
.global panic_printf |
panic_printf: |
lis %r14, halt@ha |
addi %r14, %r14, halt@l |
mtlr %r14 # fake stack to make printf return to halt |
b printf |
/branches/arm/kernel/arch/ppc64/src/dummy.s |
---|
0,0 → 1,38 |
# |
# Copyright (c) 2005 Jakub Jermar |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
.text |
.global asm_delay_loop |
.global sys_tls_set |
sys_tls_set: |
b sys_tls_set |
asm_delay_loop: |
blr |
/branches/arm/kernel/arch/ppc64/_link.ld.in |
---|
0,0 → 1,58 |
/** PPC64 linker script |
* |
* umapped section: |
* kernel text |
* kernel data |
* mapped section: |
* kernel text |
* kernel data |
* |
*/ |
#include <arch/boot/boot.h> |
#include <arch/mm/page.h> |
ENTRY(kernel_image_start) |
OUTPUT_FORMAT("elf64-powerpc") |
OUTPUT_ARCH(powerpc:common64) |
SECTIONS { |
.unmapped 0: AT (0) { |
unmapped_ktext_start = .; |
*(K_UNMAPPED_TEXT_START); |
unmapped_ktext_end = .; |
unmapped_kdata_start = .; |
*(K_UNMAPPED_DATA_START); |
unmapped_kdata_start = .; |
} |
.mapped PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) { |
ktext_start = .; |
*(K_TEXT_START); |
*(.text); |
ktext_end = .; |
kdata_start = .; |
*(K_DATA_START); |
*(.rodata); |
*(.rodata.*); |
*(.data); /* initialized data */ |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
hardcoded_ktext_size = .; |
LONG(ktext_end - ktext_start); |
hardcoded_kdata_size = .; |
LONG(kdata_end - kdata_start); |
hardcoded_load_address = .; |
LONG(PA2KA(BOOT_OFFSET)); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
symbol_table = .; |
*(symtab.*); /* Symbol table, must be LAST symbol!*/ |
kdata_end = .; |
} |
} |
/branches/arm/kernel/genarch/include/drivers/z8530/z8530.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/drivers/via-cuda/cuda.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/drivers/ega/ega.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/drivers/pl050/pl050.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/drivers/ns16550/ns16550.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/drivers/dsrln/dsrlnin.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/drivers/dsrln/dsrlnout.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/drivers/legacy/ia32/io.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/drivers/i8042/i8042.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/kbrd/kbrd.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/kbrd/scanc_mac.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/kbrd/scanc.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/kbrd/scanc_pl050.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/kbrd/scanc_pc.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/kbrd/scanc_sun.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/kbrd |
---|
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/multiboot/multiboot.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/srln/srln.h |
---|
File deleted |
/branches/arm/kernel/genarch/include/fb/logo-196x66.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/include/fb/visuals.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
/** @addtogroup genarch |
* @{ |
*/ |
/** @file |
35,16 → 35,16 |
#ifndef KERN_VISUALS_H_ |
#define KERN_VISUALS_H_ |
#define VISUAL_INDIRECT_8 0 |
#define VISUAL_INDIRECT_8 0 |
#define VISUAL_RGB_5_5_5 1 |
#define VISUAL_RGB_5_6_5 2 |
#define VISUAL_RGB_8_8_8 3 |
#define VISUAL_RGB_8_8_8_0 4 |
#define VISUAL_RGB_0_8_8_8 5 |
#define VISUAL_RGB_5_5_5 1 |
#define VISUAL_RGB_5_6_5 2 |
#define VISUAL_RGB_8_8_8 3 |
#define VISUAL_RGB_8_8_8_0 4 |
#define VISUAL_RGB_0_8_8_8 5 |
#define VISUAL_BGR_0_8_8_8 6 |
#define VISUAL_BGR_8_8_8 7 |
#define VISUAL_BGR_0_8_8_8 6 |
#define VISUAL_BGR_8_8_8_0 7 |
#endif |
/branches/arm/kernel/genarch/include/fb/fb.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
/** @addtogroup genarch |
* @{ |
*/ |
/** @file |
38,37 → 38,9 |
#include <arch/types.h> |
#include <synch/spinlock.h> |
/** |
* Properties of the framebuffer device. |
*/ |
typedef struct fb_properties { |
/** Physical address of the framebuffer device. */ |
uintptr_t addr; |
/** |
* Address where the first (top left) pixel is mapped, |
* relative to "addr". |
*/ |
unsigned int offset; |
/** Screen width in pixels. */ |
unsigned int x; |
/** Screen height in pixels. */ |
unsigned int y; |
/** Bytes per one scanline. */ |
unsigned int scan; |
/** Color model. */ |
unsigned int visual; |
} fb_properties_t; |
SPINLOCK_EXTERN(fb_lock); |
void fb_init(uintptr_t addr, unsigned int x, unsigned int y, unsigned int scan, unsigned int visual); |
void fb_redraw(void); |
void fb_init(fb_properties_t *props); |
#endif |
/** @} |
/branches/arm/kernel/genarch/include/fb/font-8x16.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
/** @addtogroup genarch |
* @{ |
*/ |
/** @file |
35,15 → 35,11 |
#ifndef KERN_FONT_8X16_H_ |
#define KERN_FONT_8X16_H_ |
#define FONT_GLYPHS 2899 |
#define FONT_WIDTH 8 |
#define FONT_SCANLINES 16 |
#define FONT_GLIPHS 256 |
#define FONT_SCANLINES 16 |
#include <typedefs.h> |
extern unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES]; |
extern uint16_t fb_font_glyph(const wchar_t ch); |
extern uint8_t fb_font[FONT_GLYPHS][FONT_SCANLINES]; |
#endif |
/** @} |
/branches/arm/kernel/genarch/include/ofw/ofw_tree.h |
---|
30,7 → 30,6 |
#define KERN_OFW_TREE_H_ |
#include <arch/types.h> |
#include <ddi/irq.h> |
#include <typedefs.h> |
#define OFW_TREE_PROPERTY_MAX_NAMELEN 32 |
44,11 → 43,11 |
ofw_tree_node_t *peer; |
ofw_tree_node_t *child; |
uint32_t node_handle; /**< Old OpenFirmware node handle. */ |
uint32_t node_handle; /**< Old OpenFirmware node handle. */ |
char *da_name; /**< Disambigued name. */ |
char *da_name; /**< Disambigued name. */ |
unsigned properties; /**< Number of properties. */ |
unsigned properties; /**< Number of properties. */ |
ofw_tree_property_t *property; |
/** |
106,7 → 105,7 |
uint32_t child_space; |
uint32_t child_base; |
uint32_t parent_space; |
uint64_t parent_base; /* group phys.mid and phys.lo together */ |
uint64_t parent_base; /* group phys.mid and phys.lo together */ |
uint32_t size; |
} __attribute__ ((packed)); |
typedef struct ofw_ebus_range ofw_ebus_range_t; |
128,8 → 127,8 |
typedef struct ofw_ebus_intr_mask ofw_ebus_intr_mask_t; |
struct ofw_pci_reg { |
uint32_t space; /* needs to be masked to obtain pure space id */ |
uint64_t addr; /* group phys.mid and phys.lo together */ |
uint32_t space; /* needs to be masked to obtain pure space id */ |
uint64_t addr; /* group phys.mid and phys.lo together */ |
uint64_t size; |
} __attribute__ ((packed)); |
typedef struct ofw_pci_reg ofw_pci_reg_t; |
136,7 → 135,7 |
struct ofw_pci_range { |
uint32_t space; |
uint64_t child_base; /* group phys.mid and phys.lo together */ |
uint64_t child_base; /* group phys.mid and phys.lo together */ |
uint64_t parent_base; |
uint64_t size; |
} __attribute__ ((packed)); |
161,43 → 160,27 |
} __attribute__ ((packed)); |
typedef struct ofw_upa_reg ofw_upa_reg_t; |
extern void ofw_tree_init(ofw_tree_node_t *); |
extern void ofw_tree_init(ofw_tree_node_t *root); |
extern void ofw_tree_print(void); |
extern const char *ofw_tree_node_name(const ofw_tree_node_t *); |
extern ofw_tree_node_t *ofw_tree_lookup(const char *); |
extern ofw_tree_property_t *ofw_tree_getprop(const ofw_tree_node_t *, |
const char *); |
extern ofw_tree_node_t *ofw_tree_find_child(ofw_tree_node_t *, const char *); |
extern ofw_tree_node_t *ofw_tree_find_child_by_device_type(ofw_tree_node_t *, |
const char *); |
extern ofw_tree_node_t *ofw_tree_find_peer_by_device_type(ofw_tree_node_t *, |
const char *); |
extern ofw_tree_node_t *ofw_tree_find_peer_by_name(ofw_tree_node_t *node, |
const char *name); |
extern ofw_tree_node_t *ofw_tree_find_node_by_handle(ofw_tree_node_t *, |
uint32_t); |
extern const char *ofw_tree_node_name(const ofw_tree_node_t *node); |
extern ofw_tree_node_t *ofw_tree_lookup(const char *path); |
extern ofw_tree_property_t *ofw_tree_getprop(const ofw_tree_node_t *node, const char *name); |
extern ofw_tree_node_t *ofw_tree_find_child(ofw_tree_node_t *node, const char *name); |
extern ofw_tree_node_t *ofw_tree_find_child_by_device_type(ofw_tree_node_t *node, const char *device_type); |
extern ofw_tree_node_t *ofw_tree_find_peer_by_device_type(ofw_tree_node_t *node, const char *device_type); |
extern ofw_tree_node_t *ofw_tree_find_node_by_handle(ofw_tree_node_t *root, uint32_t handle); |
extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *, ofw_fhc_reg_t *, |
uintptr_t *); |
extern bool ofw_central_apply_ranges(ofw_tree_node_t *, ofw_central_reg_t *, |
uintptr_t *); |
extern bool ofw_ebus_apply_ranges(ofw_tree_node_t *, ofw_ebus_reg_t *, |
uintptr_t *); |
extern bool ofw_pci_apply_ranges(ofw_tree_node_t *, ofw_pci_reg_t *, |
uintptr_t *); |
extern bool ofw_sbus_apply_ranges(ofw_tree_node_t *, ofw_sbus_reg_t *, |
uintptr_t *); |
extern bool ofw_upa_apply_ranges(ofw_tree_node_t *, ofw_upa_reg_t *, |
uintptr_t *); |
extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uintptr_t *pa); |
extern bool ofw_central_apply_ranges(ofw_tree_node_t *node, ofw_central_reg_t *reg, uintptr_t *pa); |
extern bool ofw_ebus_apply_ranges(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uintptr_t *pa); |
extern bool ofw_pci_apply_ranges(ofw_tree_node_t *node, ofw_pci_reg_t *reg, uintptr_t *pa); |
extern bool ofw_sbus_apply_ranges(ofw_tree_node_t *node, ofw_sbus_reg_t *reg, uintptr_t *pa); |
extern bool ofw_upa_apply_ranges(ofw_tree_node_t *node, ofw_upa_reg_t *reg, uintptr_t *pa); |
extern bool ofw_pci_reg_absolutize(ofw_tree_node_t *, ofw_pci_reg_t *, |
ofw_pci_reg_t *); |
extern bool ofw_pci_reg_absolutize(ofw_tree_node_t *node, ofw_pci_reg_t *reg, ofw_pci_reg_t *out); |
extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *, |
uint32_t, int *, cir_t *, void **); |
extern bool ofw_ebus_map_interrupt(ofw_tree_node_t *, ofw_ebus_reg_t *, |
uint32_t, int *, cir_t *, void **); |
extern bool ofw_pci_map_interrupt(ofw_tree_node_t *, ofw_pci_reg_t *, |
int, int *, cir_t *, void **); |
extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uint32_t interrupt, int *inr); |
extern bool ofw_ebus_map_interrupt(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *inr); |
extern bool ofw_pci_map_interrupt(ofw_tree_node_t *node, ofw_pci_reg_t *reg, int ino, int *inr); |
#endif |
/branches/arm/kernel/genarch/include/kbd/z8530.h |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Headers for Zilog 8530 serial port / keyboard driver. |
*/ |
#ifndef KERN_Z8530_H_ |
#define KERN_Z8530_H_ |
#include <console/chardev.h> |
#include <ipc/irq.h> |
extern bool z8530_belongs_to_kernel; |
extern void z8530_init(devno_t devno, inr_t inr, uintptr_t vaddr); |
extern void z8530_poll(void); |
extern void z8530_grab(void); |
extern void z8530_release(void); |
extern void z8530_interrupt(void); |
extern char z8530_key_read(chardev_t *d); |
extern irq_ownership_t z8530_claim(void); |
extern void z8530_irq_handler(irq_t *irq, void *arg, ...); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/genarch/include/kbd/ns16550.h |
---|
0,0 → 1,54 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Headers for NS 16550 serial port / keyboard driver. |
*/ |
#ifndef KERN_NS16550_H_ |
#define KERN_NS16550_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); |
extern void ns16550_grab(void); |
extern void ns16550_release(void); |
extern char ns16550_key_read(chardev_t *d); |
extern irq_ownership_t ns16550_claim(void); |
extern void ns16550_irq_handler(irq_t *irq, void *arg, ...); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/genarch/include/kbd/i8042.h |
---|
0,0 → 1,49 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KERN_I8042_H_ |
#define KERN_I8042_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); |
extern void i8042_grab(void); |
extern void i8042_release(void); |
extern char i8042_key_read(chardev_t *d); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/genarch/include/kbd/key.h |
---|
0,0 → 1,55 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
*/ |
#ifndef KERN_KEY_H_ |
#define KERN_KEY_H_ |
#include <arch/types.h> |
#include <console/chardev.h> |
#define KEY_RELEASE 0x80 |
extern chardev_t kbrd; |
extern void key_released(uint8_t sc); |
extern void key_pressed(uint8_t sc); |
extern uint8_t active_read_buff_read(void); |
extern void active_read_buff_write(uint8_t ch); |
extern void active_read_key_pressed(uint8_t sc); |
#endif |
/** @} |
*/ |
/branches/arm/kernel/genarch/include/kbd/scanc_pc.h |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Scan codes for pc keyboards. |
*/ |
#ifndef KERN_SCANC_PC_H_ |
#define KERN_SCANC_PC_H_ |
#define SC_ESC 0x01 |
#define SC_BACKSPACE 0x0e |
#define SC_LSHIFT 0x2a |
#define SC_RSHIFT 0x36 |
#define SC_CAPSLOCK 0x3a |
#define SC_SPEC_ESCAPE 0xe0 |
#define SC_LEFTARR 0x4b |
#define SC_RIGHTARR 0x4d |
#define SC_UPARR 0x48 |
#define SC_DOWNARR 0x50 |
#define SC_DELETE 0x53 |
#define SC_HOME 0x47 |
#define SC_END 0x4f |
#endif |
/** @} |
*/ |
/branches/arm/kernel/genarch/include/kbd/scanc_sun.h |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Scan codes for sun keyboards. |
*/ |
#ifndef KERN_SCANC_SUN_H_ |
#define KERN_SCANC_SUN_H_ |
#define SC_ESC 0x1d |
#define SC_BACKSPACE 0x2b |
#define SC_LSHIFT 0x63 |
#define SC_RSHIFT 0x6e |
#define SC_CAPSLOCK 0x77 |
#define SC_SPEC_ESCAPE 0xe0 /* ??? */ |
#define SC_LEFTARR 0x18 |
#define SC_RIGHTARR 0x1c |
#define SC_UPARR 0x14 |
#define SC_DOWNARR 0x1b |
#define SC_DELETE 0x42 |
#define SC_HOME 0x34 |
#define SC_END 0x4a |
#endif |
/** @} |
*/ |
/branches/arm/kernel/genarch/include/kbd/scanc.h |
---|
0,0 → 1,47 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
*/ |
#ifndef KERN_SCANC_H_ |
#define KERN_SCANC_H_ |
#define SPECIAL '?' |
extern char sc_primary_map[]; |
extern char sc_secondary_map[]; |
#endif |
/** @} |
*/ |
/branches/arm/kernel/genarch/src/drivers/i8042/i8042.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/drivers/z8530/z8530.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/drivers/via-cuda/cuda.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/drivers/ega/ega.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/drivers/pl050/pl050.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/drivers/ns16550/ns16550.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/drivers/dsrln/dsrlnin.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/drivers/dsrln/dsrlnout.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/kbrd/kbrd.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/kbrd/kbrd_pl050.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/kbrd/scanc_mac.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/kbrd/scanc_pl050.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/kbrd/scanc_pc.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/kbrd/scanc_sun.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/kbrd |
---|
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/multiboot/multiboot.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/srln/srln.c |
---|
File deleted |
/branches/arm/kernel/genarch/src/fb/logo-196x66.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/genarch/src/fb/fb.c |
---|
1,5 → 1,4 |
/* |
* Copyright (c) 2008 Martin Decky |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
27,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
/** @addtogroup genarch |
* @{ |
*/ |
/** @file |
34,7 → 33,6 |
*/ |
#include <genarch/fb/font-8x16.h> |
#include <genarch/fb/logo-196x66.h> |
#include <genarch/fb/visuals.h> |
#include <genarch/fb/fb.h> |
#include <console/chardev.h> |
41,132 → 39,159 |
#include <console/console.h> |
#include <sysinfo/sysinfo.h> |
#include <mm/slab.h> |
#include <align.h> |
#include <panic.h> |
#include <memstr.h> |
#include <config.h> |
#include <bitops.h> |
#include <print.h> |
#include <string.h> |
#include <ddi/ddi.h> |
#include <arch/types.h> |
SPINLOCK_INITIALIZE(fb_lock); |
#include "helenos.xbm" |
static uint8_t *fb_addr; |
static uint16_t *backbuf; |
static uint8_t *glyphs; |
static uint8_t *bgscan; |
static parea_t fb_parea; /**< Physical memory area for fb. */ |
static unsigned int xres; |
static unsigned int yres; |
SPINLOCK_INITIALIZE(fb_lock); |
static unsigned int ylogo; |
static unsigned int ytrim; |
static unsigned int rowtrim; |
static uint8_t *fbaddress = NULL; |
static unsigned int scanline; |
static unsigned int glyphscanline; |
static uint8_t *blankline = NULL; |
static uint8_t *dbbuffer = NULL; /* Buffer for fast scrolling console */ |
static index_t dboffset; |
static unsigned int pixelbytes; |
static unsigned int glyphbytes; |
static unsigned int bgscanbytes; |
static unsigned int xres = 0; |
static unsigned int yres = 0; |
static unsigned int scanline = 0; |
static unsigned int pixelbytes = 0; |
#ifdef FB_INVERT_COLORS |
static bool invert_colors = true; |
#else |
static bool invert_colors = false; |
#endif |
static unsigned int cols; |
static unsigned int rows; |
static unsigned int position = 0; |
static unsigned int columns = 0; |
static unsigned int rows = 0; |
#define BG_COLOR 0x000080 |
#define FG_COLOR 0xffff00 |
#define INV_COLOR 0xaaaaaa |
#define COL_WIDTH 8 |
#define ROW_BYTES (scanline * FONT_SCANLINES) |
#define RED(x, bits) ((x >> (8 + 8 + 8 - bits)) & ((1 << bits) - 1)) |
#define GREEN(x, bits) ((x >> (8 + 8 - bits)) & ((1 << bits) - 1)) |
#define BLUE(x, bits) ((x >> (8 - bits)) & ((1 << bits) - 1)) |
#define BGCOLOR 0x000080 |
#define FGCOLOR 0xffff00 |
#define LOGOCOLOR 0x2020b0 |
#define COL2X(col) ((col) * FONT_WIDTH) |
#define ROW2Y(row) ((row) * FONT_SCANLINES) |
#define RED(x, bits) ((x >> (8 + 8 + 8 - bits)) & ((1 << bits) - 1)) |
#define GREEN(x, bits) ((x >> (8 + 8 - bits)) & ((1 << bits) - 1)) |
#define BLUE(x, bits) ((x >> (8 - bits)) & ((1 << bits) - 1)) |
#define X2COL(x) ((x) / FONT_WIDTH) |
#define Y2ROW(y) ((y) / FONT_SCANLINES) |
#define POINTPOS(x, y) ((y) * scanline + (x) * pixelbytes) |
#define FB_POS(x, y) ((y) * scanline + (x) * pixelbytes) |
#define BB_POS(col, row) ((row) * cols + (col)) |
#define GLYPH_POS(glyph, y) ((glyph) * glyphbytes + (y) * glyphscanline) |
/***************************************************************/ |
/* Pixel specific fuctions */ |
static void (*rgb2scr)(void *, int); |
static int (*scr2rgb)(void *); |
static void (*rgb_conv)(void *, uint32_t); |
static inline int COLOR(int color) |
{ |
return invert_colors ? ~color : color; |
} |
/* Conversion routines between different color representations */ |
static void rgb_byte0888(void *dst, int rgb) |
{ |
*((int *) dst) = rgb; |
} |
/** ARGB 8:8:8:8 conversion |
* |
*/ |
static void rgb_0888(void *dst, uint32_t rgb) |
static int byte0888_rgb(void *src) |
{ |
*((uint32_t *) dst) = rgb & 0xffffff; |
return (*((int *) src)) & 0xffffff; |
} |
static void bgr_byte0888(void *dst, int rgb) |
{ |
*((uint32_t *) dst) = BLUE(rgb, 8) << 16 | GREEN(rgb, 8) << 8 | |
RED(rgb, 8); |
} |
/** ABGR 8:8:8:8 conversion |
* |
*/ |
static void bgr_0888(void *dst, uint32_t rgb) |
static int byte0888_bgr(void *src) |
{ |
*((uint32_t *) dst) |
= (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | RED(rgb, 8); |
int color = *(uint32_t *)(src); |
return ((color & 0xff) << 16) | (((color >> 8) & 0xff) << 8) | |
((color >> 16) & 0xff); |
} |
static void rgb_8880(void *dst, uint32_t rgb) |
static void rgb_byte888(void *dst, int rgb) |
{ |
*((uint32_t *) dst) |
= (RED(rgb, 8) << 24) | (GREEN(rgb, 8) << 16) | (BLUE(rgb, 8) << 8); |
uint8_t *scr = (uint8_t *) dst; |
#if defined(FB_INVERT_ENDIAN) |
scr[0] = RED(rgb, 8); |
scr[1] = GREEN(rgb, 8); |
scr[2] = BLUE(rgb, 8); |
#else |
scr[2] = RED(rgb, 8); |
scr[1] = GREEN(rgb, 8); |
scr[0] = BLUE(rgb, 8); |
#endif |
} |
static int byte888_rgb(void *src) |
{ |
uint8_t *scr = (uint8_t *) src; |
#if defined(FB_INVERT_ENDIAN) |
return scr[0] << 16 | scr[1] << 8 | scr[2]; |
#else |
return scr[2] << 16 | scr[1] << 8 | scr[0]; |
#endif |
} |
static void bgr_byte8880(void *dst, int rgb) |
{ |
uint8_t *scr = (uint8_t *) dst; |
scr[3] = RED(rgb, 8); |
scr[2] = GREEN(rgb, 8); |
scr[1] = BLUE(rgb, 8); |
} |
/** RGB 8:8:8 conversion |
* |
*/ |
static void rgb_888(void *dst, uint32_t rgb) |
static int byte8880_bgr(void *src) |
{ |
((uint8_t *) dst)[0] = BLUE(rgb, 8); |
((uint8_t *) dst)[1] = GREEN(rgb, 8); |
((uint8_t *) dst)[2] = RED(rgb, 8); |
uint8_t *scr = (uint8_t *) src; |
return scr[3] << 16 | scr[2] << 8 | scr[1]; |
} |
/** 16-bit depth (5:5:5) */ |
static void rgb_byte555(void *dst, int rgb) |
{ |
/* 5-bit, 5-bits, 5-bits */ |
*((uint16_t *) dst) = RED(rgb, 5) << 10 | GREEN(rgb, 5) << 5 | |
BLUE(rgb, 5); |
} |
/** BGR 8:8:8 conversion |
* |
*/ |
static void bgr_888(void *dst, uint32_t rgb) |
/** 16-bit depth (5:5:5) */ |
static int byte555_rgb(void *src) |
{ |
((uint8_t *) dst)[0] = RED(rgb, 8); |
((uint8_t *) dst)[1] = GREEN(rgb, 8); |
((uint8_t *) dst)[2] = BLUE(rgb, 8); |
int color = *(uint16_t *)(src); |
return (((color >> 10) & 0x1f) << (16 + 3)) | |
(((color >> 5) & 0x1f) << (8 + 3)) | ((color & 0x1f) << 3); |
} |
/** RGB 5:5:5 conversion |
* |
*/ |
static void rgb_555(void *dst, uint32_t rgb) |
/** 16-bit depth (5:6:5) */ |
static void rgb_byte565(void *dst, int rgb) |
{ |
*((uint16_t *) dst) |
= (RED(rgb, 5) << 10) | (GREEN(rgb, 5) << 5) | BLUE(rgb, 5); |
/* 5-bit, 6-bits, 5-bits */ |
*((uint16_t *) dst) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 | |
BLUE(rgb, 5); |
} |
/** RGB 5:6:5 conversion |
* |
*/ |
static void rgb_565(void *dst, uint32_t rgb) |
/** 16-bit depth (5:6:5) */ |
static int byte565_rgb(void *src) |
{ |
*((uint16_t *) dst) |
= (RED(rgb, 5) << 11) | (GREEN(rgb, 6) << 5) | BLUE(rgb, 5); |
int color = *(uint16_t *)(src); |
return (((color >> 11) & 0x1f) << (16 + 3)) | |
(((color >> 5) & 0x3f) << (8 + 2)) | ((color & 0x1f) << 3); |
} |
/** RGB 3:2:3 |
/** Put pixel - 8-bit depth (color palette/3:2:3) |
* |
* Even though we try 3:2:3 color scheme here, an 8-bit framebuffer |
* will most likely use a color palette. The color appearance |
173,279 → 198,258 |
* will be pretty random and depend on the default installed |
* palette. This could be fixed by supporting custom palette |
* and setting it to simulate the 8-bit truecolor. |
* |
* Currently we set the palette on the ia32, amd64 and sparc64 port. |
* |
* Note that the byte is being inverted by this function. The reason is |
* that we would like to use a color palette where the white color code |
* is 0 and the black color code is 255, as some machines (Sun Blade 1500) |
* use these codes for black and white and prevent to set codes |
* 0 and 255 to other colors. |
* |
*/ |
static void rgb_323(void *dst, uint32_t rgb) |
static void rgb_byte8(void *dst, int rgb) |
{ |
*((uint8_t *) dst) |
= ~((RED(rgb, 3) << 5) | (GREEN(rgb, 2) << 3) | BLUE(rgb, 3)); |
*((uint8_t *) dst) = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | |
BLUE(rgb, 3); |
} |
/** Hide logo and refresh screen |
/** Return pixel color - 8-bit depth (color palette/3:2:3) |
* |
* See the comment for rgb_byte(). |
*/ |
static void logo_hide(bool silent) |
static int byte8_rgb(void *src) |
{ |
ylogo = 0; |
ytrim = yres; |
rowtrim = rows; |
if (!silent) |
fb_redraw(); |
int color = *(uint8_t *)src; |
return (((color >> 5) & 0x7) << (16 + 5)) | |
(((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5); |
} |
static void putpixel(unsigned int x, unsigned int y, int color) |
{ |
(*rgb2scr)(&fbaddress[POINTPOS(x, y)], COLOR(color)); |
/** Draw character at given position |
* |
*/ |
static void glyph_draw(uint16_t glyph, unsigned int col, unsigned int row, bool silent, bool overlay) |
if (dbbuffer) { |
int dline = (y + dboffset) % yres; |
(*rgb2scr)(&dbbuffer[POINTPOS(x, dline)], COLOR(color)); |
} |
} |
/** Get pixel from viewport */ |
static int getpixel(unsigned int x, unsigned int y) |
{ |
unsigned int x = COL2X(col); |
unsigned int y = ROW2Y(row); |
unsigned int yd; |
if (y >= ytrim) |
logo_hide(silent); |
if (!overlay) |
backbuf[BB_POS(col, row)] = glyph; |
if (!silent) { |
for (yd = 0; yd < FONT_SCANLINES; yd++) |
memcpy(&fb_addr[FB_POS(x, y + yd + ylogo)], |
&glyphs[GLYPH_POS(glyph, yd)], glyphscanline); |
if (dbbuffer) { |
int dline = (y + dboffset) % yres; |
return COLOR((*scr2rgb)(&dbbuffer[POINTPOS(x, dline)])); |
} |
return COLOR((*scr2rgb)(&fbaddress[POINTPOS(x, y)])); |
} |
/** Scroll screen down by one row |
* |
* |
*/ |
static void screen_scroll(bool silent) |
/** Fill screen with background color */ |
static void clear_screen(void) |
{ |
if (ylogo > 0) { |
logo_hide(silent); |
return; |
unsigned int y; |
for (y = 0; y < yres; y++) { |
memcpy(&fbaddress[scanline * y], blankline, xres * pixelbytes); |
if (dbbuffer) |
memcpy(&dbbuffer[scanline * y], blankline, |
xres * pixelbytes); |
} |
if (!silent) { |
unsigned int row; |
} |
/** Scroll screen one row up */ |
static void scroll_screen(void) |
{ |
if (dbbuffer) { |
count_t first; |
for (row = 0; row < rows; row++) { |
unsigned int y = ROW2Y(row); |
unsigned int yd; |
for (yd = 0; yd < FONT_SCANLINES; yd++) { |
unsigned int x; |
unsigned int col; |
for (col = 0, x = 0; col < cols; col++, |
x += FONT_WIDTH) { |
uint16_t glyph; |
if (row < rows - 1) { |
if (backbuf[BB_POS(col, row)] == |
backbuf[BB_POS(col, row + 1)]) |
continue; |
glyph = backbuf[BB_POS(col, row + 1)]; |
} else |
glyph = 0; |
memcpy(&fb_addr[FB_POS(x, y + yd)], |
&glyphs[GLYPH_POS(glyph, yd)], |
glyphscanline); |
} |
} |
/* Clear the last row */ |
memcpy(&dbbuffer[dboffset * scanline], blankline, ROW_BYTES); |
dboffset = (dboffset + FONT_SCANLINES) % yres; |
first = yres - dboffset; |
/* Move all rows one row up */ |
if (xres * pixelbytes == scanline) { |
memcpy(fbaddress, &dbbuffer[dboffset * scanline], |
first * scanline); |
memcpy(&fbaddress[first * scanline], dbbuffer, |
dboffset * scanline); |
} else { |
/* |
* When the scanline is bigger than number of bytes |
* in the X-resolution, chances are that the |
* frame buffer memory past the X-resolution is special |
* in some way. For example, the SUNW,ffb framebuffer |
* wraps this area around the beginning of the same |
* line. To avoid troubles, copy only memory as |
* specified by the resolution. |
*/ |
unsigned int i; |
for (i = 0; i < first; i++) |
memcpy(&fbaddress[i * scanline], |
&dbbuffer[(dboffset + i) * scanline], |
xres * pixelbytes); |
for (i = 0; i < dboffset; i++) |
memcpy(&fbaddress[(first + i) * scanline], |
&dbbuffer[i * scanline], xres * pixelbytes); |
} |
} else { |
uint8_t *lastline = &fbaddress[(rows - 1) * ROW_BYTES]; |
if (xres * pixelbytes == scanline) { |
/* Move all rows one row up */ |
memcpy((void *) fbaddress, |
(void *) &fbaddress[ROW_BYTES], |
scanline * yres - ROW_BYTES); |
/* Clear the last row */ |
memcpy((void *) lastline, (void *) blankline, |
ROW_BYTES); |
} else { |
/* |
* See the comment in the dbbuffer case. |
*/ |
unsigned int i; |
/* Move all rows one row up */ |
for (i = 0; i < yres - FONT_SCANLINES; i++) |
memcpy(&fbaddress[i * scanline], |
&fbaddress[(i + FONT_SCANLINES) * scanline], |
xres * pixelbytes); |
/* Clear the last row */ |
for (i = 0; i < FONT_SCANLINES; i++) |
memcpy(&lastline[i * scanline], |
&blankline[i * scanline], |
xres * pixelbytes); |
} |
} |
memmove(backbuf, &backbuf[BB_POS(0, 1)], cols * (rows - 1) * sizeof(uint16_t)); |
memsetw(&backbuf[BB_POS(0, rows - 1)], cols, 0); |
} |
static void cursor_put(bool silent) |
static void invert_pixel(unsigned int x, unsigned int y) |
{ |
unsigned int col = position % cols; |
unsigned int row = position / cols; |
glyph_draw(fb_font_glyph(U_CURSOR), col, row, silent, true); |
putpixel(x, y, ~getpixel(x, y)); |
} |
static void cursor_remove(bool silent) |
/** Draw one line of glyph at a given position */ |
static void draw_glyph_line(unsigned int glline, unsigned int x, unsigned int y) |
{ |
unsigned int col = position % cols; |
unsigned int row = position / cols; |
glyph_draw(backbuf[BB_POS(col, row)], col, row, silent, true); |
unsigned int i; |
for (i = 0; i < 8; i++) |
if (glline & (1 << (7 - i))) { |
putpixel(x + i, y, FGCOLOR); |
} else |
putpixel(x + i, y, BGCOLOR); |
} |
/***************************************************************/ |
/* Character-console functions */ |
/** Draw character at given position */ |
static void draw_glyph(uint8_t glyph, unsigned int col, unsigned int row) |
{ |
unsigned int y; |
for (y = 0; y < FONT_SCANLINES; y++) |
draw_glyph_line(fb_font[glyph * FONT_SCANLINES + y], |
col * COL_WIDTH, row * FONT_SCANLINES + y); |
} |
/** Invert character at given position */ |
static void invert_char(unsigned int col, unsigned int row) |
{ |
unsigned int x; |
unsigned int y; |
for (x = 0; x < COL_WIDTH; x++) |
for (y = 0; y < FONT_SCANLINES; y++) |
invert_pixel(col * COL_WIDTH + x, |
row * FONT_SCANLINES + y); |
} |
/** Draw character at default position */ |
static void draw_char(char chr) |
{ |
draw_glyph(chr, position % columns, position / columns); |
} |
static void draw_logo(unsigned int startx, unsigned int starty) |
{ |
unsigned int x; |
unsigned int y; |
unsigned int byte; |
unsigned int rowbytes; |
rowbytes = (helenos_width - 1) / 8 + 1; |
for (y = 0; y < helenos_height; y++) |
for (x = 0; x < helenos_width; x++) { |
byte = helenos_bits[rowbytes * y + x / 8]; |
byte >>= x % 8; |
if (byte & 1) |
putpixel(startx + x, starty + y, |
COLOR(LOGOCOLOR)); |
} |
} |
/***************************************************************/ |
/* Stdout specific functions */ |
static void invert_cursor(void) |
{ |
invert_char(position % columns, position / columns); |
} |
/** Print character to screen |
* |
* Emulate basic terminal commands. |
* |
* Emulate basic terminal commands |
*/ |
static void fb_putchar(outdev_t *dev, wchar_t ch, bool silent) |
static void fb_putchar(chardev_t *dev, char ch) |
{ |
spinlock_lock(&fb_lock); |
switch (ch) { |
case '\n': |
cursor_remove(silent); |
position += cols; |
position -= position % cols; |
invert_cursor(); |
position += columns; |
position -= position % columns; |
break; |
case '\r': |
cursor_remove(silent); |
position -= position % cols; |
invert_cursor(); |
position -= position % columns; |
break; |
case '\b': |
cursor_remove(silent); |
if (position % cols) |
invert_cursor(); |
if (position % columns) |
position--; |
break; |
case '\t': |
cursor_remove(silent); |
invert_cursor(); |
do { |
glyph_draw(fb_font_glyph(' '), position % cols, |
position / cols, silent, false); |
draw_char(' '); |
position++; |
} while ((position % 8) && (position < cols * rows)); |
} while ((position % 8) && position < columns * rows); |
break; |
default: |
glyph_draw(fb_font_glyph(ch), position % cols, |
position / cols, silent, false); |
draw_char(ch); |
position++; |
} |
if (position >= cols * rows) { |
position -= cols; |
screen_scroll(silent); |
if (position >= columns * rows) { |
position -= columns; |
scroll_screen(); |
} |
cursor_put(silent); |
invert_cursor(); |
spinlock_unlock(&fb_lock); |
} |
static outdev_t fb_console; |
static outdev_operations_t fb_ops = { |
.write = fb_putchar |
static chardev_t framebuffer; |
static chardev_operations_t fb_ops = { |
.write = fb_putchar, |
}; |
/** Render glyphs |
/** Initialize framebuffer as a chardev output device |
* |
* Convert glyphs from device independent font |
* description to current visual representation. |
* |
*/ |
static void glyphs_render(void) |
{ |
/* Prerender glyphs */ |
uint16_t glyph; |
for (glyph = 0; glyph < FONT_GLYPHS; glyph++) { |
uint32_t fg_color; |
if (glyph == FONT_GLYPHS - 1) |
fg_color = INV_COLOR; |
else |
fg_color = FG_COLOR; |
unsigned int y; |
for (y = 0; y < FONT_SCANLINES; y++) { |
unsigned int x; |
for (x = 0; x < FONT_WIDTH; x++) { |
void *dst = &glyphs[GLYPH_POS(glyph, y) + |
x * pixelbytes]; |
uint32_t rgb = (fb_font[glyph][y] & |
(1 << (7 - x))) ? fg_color : BG_COLOR; |
rgb_conv(dst, rgb); |
} |
} |
} |
/* Prerender background scanline */ |
unsigned int x; |
for (x = 0; x < xres; x++) |
rgb_conv(&bgscan[x * pixelbytes], BG_COLOR); |
} |
/** Refresh the screen |
* |
*/ |
void fb_redraw(void) |
{ |
if (ylogo > 0) { |
unsigned int y; |
for (y = 0; y < LOGO_HEIGHT; y++) { |
unsigned int x; |
for (x = 0; x < xres; x++) |
rgb_conv(&fb_addr[FB_POS(x, y)], |
(x < LOGO_WIDTH) ? |
fb_logo[y * LOGO_WIDTH + x] : |
LOGO_COLOR); |
} |
} |
unsigned int row; |
for (row = 0; row < rowtrim; row++) { |
unsigned int y = ylogo + ROW2Y(row); |
unsigned int yd; |
for (yd = 0; yd < FONT_SCANLINES; yd++) { |
unsigned int x; |
unsigned int col; |
for (col = 0, x = 0; col < cols; |
col++, x += FONT_WIDTH) { |
uint16_t glyph = backbuf[BB_POS(col, row)]; |
void *dst = &fb_addr[FB_POS(x, y + yd)]; |
void *src = &glyphs[GLYPH_POS(glyph, yd)]; |
memcpy(dst, src, glyphscanline); |
} |
} |
} |
if (COL2X(cols) < xres) { |
unsigned int y; |
unsigned int size = (xres - COL2X(cols)) * pixelbytes; |
for (y = ylogo; y < yres; y++) |
memcpy(&fb_addr[FB_POS(COL2X(cols), y)], bgscan, size); |
} |
if (ROW2Y(rowtrim) + ylogo < yres) { |
unsigned int y; |
for (y = ROW2Y(rowtrim) + ylogo; y < yres; y++) |
memcpy(&fb_addr[FB_POS(0, y)], bgscan, bgscanbytes); |
} |
} |
/** Initialize framebuffer as a output character device |
* |
* @param addr Physical address of the framebuffer |
* @param x Screen width in pixels |
* @param y Screen height in pixels |
453,102 → 457,106 |
* @param visual Color model |
* |
*/ |
void fb_init(fb_properties_t *props) |
void fb_init(uintptr_t addr, unsigned int x, unsigned int y, unsigned int scan, |
unsigned int visual) |
{ |
switch (props->visual) { |
switch (visual) { |
case VISUAL_INDIRECT_8: |
rgb_conv = rgb_323; |
rgb2scr = rgb_byte8; |
scr2rgb = byte8_rgb; |
pixelbytes = 1; |
break; |
case VISUAL_RGB_5_5_5: |
rgb_conv = rgb_555; |
rgb2scr = rgb_byte555; |
scr2rgb = byte555_rgb; |
pixelbytes = 2; |
break; |
case VISUAL_RGB_5_6_5: |
rgb_conv = rgb_565; |
rgb2scr = rgb_byte565; |
scr2rgb = byte565_rgb; |
pixelbytes = 2; |
break; |
case VISUAL_RGB_8_8_8: |
rgb_conv = rgb_888; |
rgb2scr = rgb_byte888; |
scr2rgb = byte888_rgb; |
pixelbytes = 3; |
break; |
case VISUAL_BGR_8_8_8: |
rgb_conv = bgr_888; |
pixelbytes = 3; |
break; |
case VISUAL_RGB_8_8_8_0: |
rgb_conv = rgb_8880; |
rgb2scr = rgb_byte888; |
scr2rgb = byte888_rgb; |
pixelbytes = 4; |
break; |
case VISUAL_RGB_0_8_8_8: |
rgb_conv = rgb_0888; |
rgb2scr = rgb_byte0888; |
scr2rgb = byte0888_rgb; |
pixelbytes = 4; |
break; |
case VISUAL_BGR_0_8_8_8: |
rgb_conv = bgr_0888; |
rgb2scr = bgr_byte0888; |
scr2rgb = byte0888_bgr; |
pixelbytes = 4; |
break; |
case VISUAL_BGR_8_8_8_0: |
rgb2scr = bgr_byte8880; |
scr2rgb = byte8880_bgr; |
pixelbytes = 4; |
break; |
default: |
panic("Unsupported visual."); |
panic("Unsupported visual.\n"); |
} |
xres = props->x; |
yres = props->y; |
scanline = props->scan; |
unsigned int fbsize = scan * y; |
cols = X2COL(xres); |
rows = Y2ROW(yres); |
/* Map the framebuffer */ |
fbaddress = (uint8_t *) hw_map((uintptr_t) addr, fbsize); |
if (yres > ylogo) { |
ylogo = LOGO_HEIGHT; |
rowtrim = rows - Y2ROW(ylogo); |
if (ylogo % FONT_SCANLINES > 0) |
rowtrim--; |
ytrim = ROW2Y(rowtrim); |
} else { |
ylogo = 0; |
ytrim = yres; |
rowtrim = rows; |
} |
xres = x; |
yres = y; |
scanline = scan; |
glyphscanline = FONT_WIDTH * pixelbytes; |
glyphbytes = ROW2Y(glyphscanline); |
bgscanbytes = xres * pixelbytes; |
size_t fbsize = scanline * yres; |
size_t bbsize = cols * rows * sizeof(uint16_t); |
size_t glyphsize = FONT_GLYPHS * glyphbytes; |
backbuf = (uint16_t *) malloc(bbsize, 0); |
if (!backbuf) |
panic("Unable to allocate backbuffer."); |
glyphs = (uint8_t *) malloc(glyphsize, 0); |
if (!glyphs) |
panic("Unable to allocate glyphs."); |
bgscan = malloc(bgscanbytes, 0); |
if (!bgscan) |
panic("Unable to allocate background pixel."); |
memsetw(backbuf, cols * rows, 0); |
glyphs_render(); |
fb_addr = (uint8_t *) hw_map((uintptr_t) props->addr, fbsize); |
rows = y / FONT_SCANLINES; |
columns = x / COL_WIDTH; |
fb_parea.pbase = (uintptr_t) addr; |
fb_parea.vbase = (uintptr_t) fbaddress; |
fb_parea.frames = SIZE2FRAMES(fbsize); |
fb_parea.cacheable = false; |
ddi_parea_register(&fb_parea); |
sysinfo_set_item_val("fb", NULL, true); |
sysinfo_set_item_val("fb.kind", NULL, 1); |
sysinfo_set_item_val("fb.width", NULL, xres); |
sysinfo_set_item_val("fb.height", NULL, yres); |
sysinfo_set_item_val("fb.scanline", NULL, scanline); |
sysinfo_set_item_val("fb.visual", NULL, props->visual); |
sysinfo_set_item_val("fb.address.physical", NULL, props->addr); |
sysinfo_set_item_val("fb.scanline", NULL, scan); |
sysinfo_set_item_val("fb.visual", NULL, visual); |
sysinfo_set_item_val("fb.address.physical", NULL, addr); |
sysinfo_set_item_val("fb.invert-colors", NULL, invert_colors); |
/* Allocate double buffer */ |
unsigned int order = fnzb(SIZE2FRAMES(fbsize) - 1) + 1; |
dbbuffer = (uint8_t *) frame_alloc(order, FRAME_ATOMIC | FRAME_KA); |
if (!dbbuffer) |
printf("Failed to allocate scroll buffer.\n"); |
dboffset = 0; |
/* Initialized blank line */ |
blankline = (uint8_t *) malloc(ROW_BYTES, FRAME_ATOMIC); |
if (!blankline) |
panic("Failed to allocate blank line for framebuffer."); |
for (y = 0; y < FONT_SCANLINES; y++) |
for (x = 0; x < xres; x++) |
(*rgb2scr)(&blankline[POINTPOS(x, y)], COLOR(BGCOLOR)); |
fb_redraw(); |
outdev_initialize("fb", &fb_console, &fb_ops); |
stdout = &fb_console; |
clear_screen(); |
/* Update size of screen to match text area */ |
yres = rows * FONT_SCANLINES; |
draw_logo(xres - helenos_width, 0); |
invert_cursor(); |
chardev_initialize("fb", &framebuffer, &fb_ops); |
stdout = &framebuffer; |
} |
/** @} |
/branches/arm/kernel/genarch/src/fb/font-8x16.c |
---|
1,6 → 1,5 |
/* |
* Copyright (c) 2000 Dmitry Bolkhovityanov |
* Copyright (c) 2009 Martin Decky |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
27,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
/** @addtogroup genarch |
* @{ |
*/ |
/** @file |
35,3235 → 34,4616 |
#include <genarch/fb/font-8x16.h> |
/** Convert character to font glyph index |
* |
* The font does not cover all Unicode characters. |
* This function converts the character to an appropriate |
* glyph in the font or returns an index to the question |
* mark glyph if no specific glyph exists. |
*/ |
uint16_t fb_font_glyph(const wchar_t ch) |
{ |
if (ch == 0x0000) |
return 0; |
if ((ch >= 0x0020) && (ch <= 0x007f)) |
return (ch - 32); |
if ((ch >= 0x00a0) && (ch <= 0x021f)) |
return (ch - 64); |
if ((ch >= 0x0222) && (ch <= 0x0233)) |
return (ch - 66); |
if ((ch >= 0x0250) && (ch <= 0x02ad)) |
return (ch - 94); |
if ((ch >= 0x02b0) && (ch <= 0x02cf)) |
return (ch - 96); |
if ((ch >= 0x02d8) && (ch <= 0x02dd)) |
return (ch - 104); |
if (ch == 0x02ee) |
return 630; |
if ((ch >= 0x0300) && (ch <= 0x0301)) |
return (ch - 137); |
if (ch == 0x0303) |
return 633; |
if (ch == 0x0309) |
return 634; |
if ((ch >= 0x0312) && (ch <= 0x0314)) |
return (ch - 151); |
if (ch == 0x0323) |
return 638; |
if ((ch >= 0x0340) && (ch <= 0x0341)) |
return (ch - 193); |
if ((ch >= 0x0374) && (ch <= 0x0375)) |
return (ch - 243); |
if (ch == 0x037a) |
return 643; |
if (ch == 0x037e) |
return 644; |
if ((ch >= 0x0384) && (ch <= 0x038a)) |
return (ch - 255); |
if (ch == 0x038c) |
return 652; |
if ((ch >= 0x038e) && (ch <= 0x03a1)) |
return (ch - 257); |
if ((ch >= 0x03a3) && (ch <= 0x03ce)) |
return (ch - 258); |
if ((ch >= 0x03d0) && (ch <= 0x03d7)) |
return (ch - 259); |
if ((ch >= 0x03da) && (ch <= 0x03f3)) |
return (ch - 261); |
if ((ch >= 0x0400) && (ch <= 0x0486)) |
return (ch - 273); |
if ((ch >= 0x0488) && (ch <= 0x04ce)) |
return (ch - 274); |
if ((ch >= 0x04d0) && (ch <= 0x04f5)) |
return (ch - 275); |
if ((ch >= 0x04f8) && (ch <= 0x04f9)) |
return (ch - 277); |
if ((ch >= 0x0500) && (ch <= 0x050f)) |
return (ch - 283); |
if ((ch >= 0x0530) && (ch <= 0x0556)) |
return (ch - 315); |
if ((ch >= 0x0559) && (ch <= 0x055f)) |
return (ch - 317); |
if ((ch >= 0x0561) && (ch <= 0x0587)) |
return (ch - 318); |
if ((ch >= 0x0589) && (ch <= 0x058a)) |
return (ch - 319); |
if ((ch >= 0x0591) && (ch <= 0x05a1)) |
return (ch - 325); |
if ((ch >= 0x05a3) && (ch <= 0x05b9)) |
return (ch - 326); |
if ((ch >= 0x05bb) && (ch <= 0x05c4)) |
return (ch - 327); |
if ((ch >= 0x05d0) && (ch <= 0x05ea)) |
return (ch - 338); |
if ((ch >= 0x05f0) && (ch <= 0x05f4)) |
return (ch - 343); |
if (ch == 0x060c) |
return 1182; |
if (ch == 0x061b) |
return 1183; |
if (ch == 0x061f) |
return 1184; |
if ((ch >= 0x0621) && (ch <= 0x063a)) |
return (ch - 384); |
if ((ch >= 0x0640) && (ch <= 0x0655)) |
return (ch - 389); |
if ((ch >= 0x0660) && (ch <= 0x066d)) |
return (ch - 399); |
if ((ch >= 0x0670) && (ch <= 0x06ed)) |
return (ch - 401); |
if ((ch >= 0x06f0) && (ch <= 0x06fe)) |
return (ch - 403); |
if (ch == 0x10d3) |
return 1388; |
if (ch == 0x10d7) |
return 1389; |
if (ch == 0x10da) |
return 1390; |
if (ch == 0x10dd) |
return 1391; |
if (ch == 0x10e6) |
return 1392; |
if ((ch >= 0x1e00) && (ch <= 0x1e9b)) |
return (ch - 6287); |
if ((ch >= 0x1ea0) && (ch <= 0x1ef9)) |
return (ch - 6291); |
if ((ch >= 0x1f00) && (ch <= 0x1f07)) |
return (ch - 6297); |
if ((ch >= 0x2000) && (ch <= 0x2027)) |
return (ch - 6545); |
if ((ch >= 0x2030) && (ch <= 0x2046)) |
return (ch - 6553); |
if ((ch >= 0x2048) && (ch <= 0x204d)) |
return (ch - 6554); |
if (ch == 0x2070) |
return 1716; |
if ((ch >= 0x2074) && (ch <= 0x208f)) |
return (ch - 6591); |
if ((ch >= 0x20a0) && (ch <= 0x20af)) |
return (ch - 6607); |
if ((ch >= 0x2100) && (ch <= 0x213a)) |
return (ch - 6687); |
if ((ch >= 0x2153) && (ch <= 0x2183)) |
return (ch - 6711); |
if ((ch >= 0x2190) && (ch <= 0x21f3)) |
return (ch - 6723); |
if ((ch >= 0x2200) && (ch <= 0x22f1)) |
return (ch - 6735); |
if (ch == 0x2300) |
return 2211; |
if (ch == 0x2302) |
return 2212; |
if ((ch >= 0x2308) && (ch <= 0x230b)) |
return (ch - 6755); |
if (ch == 0x2310) |
return 2217; |
if (ch == 0x2318) |
return 2218; |
if ((ch >= 0x231a) && (ch <= 0x231b)) |
return (ch - 6767); |
if ((ch >= 0x2320) && (ch <= 0x2321)) |
return (ch - 6771); |
if ((ch >= 0x2329) && (ch <= 0x232a)) |
return (ch - 6778); |
if ((ch >= 0x239b) && (ch <= 0x23bd)) |
return (ch - 6890); |
if (ch == 0x23ce) |
return 2260; |
if ((ch >= 0x2409) && (ch <= 0x240d)) |
return (ch - 6964); |
if ((ch >= 0x2423) && (ch <= 0x2424)) |
return (ch - 6985); |
if (ch == 0x2426) |
return 2268; |
if ((ch >= 0x2500) && (ch <= 0x2595)) |
return (ch - 7203); |
if ((ch >= 0x25a0) && (ch <= 0x25f7)) |
return (ch - 7213); |
if ((ch >= 0x2600) && (ch <= 0x2602)) |
return (ch - 7221); |
if ((ch >= 0x2605) && (ch <= 0x260d)) |
return (ch - 7223); |
if ((ch >= 0x2610) && (ch <= 0x2613)) |
return (ch - 7225); |
if (ch == 0x2620) |
return 2523; |
if (ch == 0x2622) |
return 2524; |
if (ch == 0x2626) |
return 2525; |
if ((ch >= 0x2628) && (ch <= 0x262b)) |
return (ch - 7242); |
if ((ch >= 0x262e) && (ch <= 0x2637)) |
return (ch - 7244); |
if ((ch >= 0x2639) && (ch <= 0x2653)) |
return (ch - 7245); |
if ((ch >= 0x2660) && (ch <= 0x2667)) |
return (ch - 7257); |
if ((ch >= 0x2669) && (ch <= 0x266f)) |
return (ch - 7258); |
if ((ch >= 0xfb00) && (ch <= 0xfb05)) |
return (ch - 61674); |
if ((ch >= 0xfb50) && (ch <= 0xfbb1)) |
return (ch - 61748); |
if ((ch >= 0xfbd3) && (ch <= 0xfbe9)) |
return (ch - 61781); |
if ((ch >= 0xfbfc) && (ch <= 0xfbff)) |
return (ch - 61799); |
if ((ch >= 0xfc5b) && (ch <= 0xfc63)) |
return (ch - 61890); |
if (ch == 0xfc90) |
return 2722; |
if ((ch >= 0xfcf2) && (ch <= 0xfcf4)) |
return (ch - 62031); |
if ((ch >= 0xfd3c) && (ch <= 0xfd3f)) |
return (ch - 62102); |
if (ch == 0xfdf2) |
return 2730; |
if ((ch >= 0xfe50) && (ch <= 0xfe52)) |
return (ch - 62373); |
if ((ch >= 0xfe54) && (ch <= 0xfe66)) |
return (ch - 62374); |
if ((ch >= 0xfe68) && (ch <= 0xfe6b)) |
return (ch - 62375); |
if ((ch >= 0xfe70) && (ch <= 0xfe72)) |
return (ch - 62379); |
if (ch == 0xfe74) |
return 2760; |
if ((ch >= 0xfe76) && (ch <= 0xfefc)) |
return (ch - 62381); |
if (ch == 0xfeff) |
return 2896; |
return 2898; |
} |
unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES] = { |
uint8_t fb_font[FONT_GLYPHS][FONT_SCANLINES] = { |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0x86, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xde, 0xde, 0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, 0x0c, 0x0e, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00}, |
{0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x3c, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x99, 0xa5, 0xa1, 0xa1, 0xa5, 0x99, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x44, 0xba, 0xb2, 0xaa, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0x30, 0x60, 0xc8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0x30, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xf6, 0xc0, 0xc0, 0xc0, 0x00}, |
{0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x30, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xce, 0x9e, 0x3e, 0x06, 0x06, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xdc, 0x86, 0x0c, 0x18, 0x3e, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0x36, 0xec, 0x18, 0x30, 0x66, 0xce, 0x9e, 0x3e, 0x06, 0x06, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x18, 0x0c, 0x38, 0x00}, |
{0x30, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x3c, 0x42, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0xf6, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7a, 0xc4, 0xce, 0xce, 0xd6, 0xd6, 0xe6, 0xe6, 0x46, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x6c, 0x66, 0x66, 0x66, 0x66, 0xec, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0x1c, 0x3c, 0x06, 0x7e, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0xc4, 0xce, 0xd6, 0xe6, 0x46, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x30, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x7c, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x0c, 0x18, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x0c, 0x18, 0x0e, 0x00}, |
{0x0c, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0xf6, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x3e, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x18, 0x30, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x6c, 0x38, 0x10, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x6c, 0x38, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x18, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x18, 0x30, 0x30, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x10, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xff, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf8, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7e, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7e, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x3c, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x3c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x30, 0x1c, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x30, 0x1c, 0x00}, |
{0x18, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf7, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7b, 0x7b, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x00, 0xee, 0x66, 0x66, 0x66, 0x66, 0x66, 0xf6, 0x06, 0x66, 0x3c, 0x00}, |
{0x08, 0x1c, 0x22, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x0e, 0x1b, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x30, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x30}, |
{0x6c, 0x38, 0x10, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x66, 0x66, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x30, 0x30, 0x30, 0x36, 0x36, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x78, 0xe0, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x1e, 0x78, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x18, 0x18, 0x30}, |
{0x6c, 0x38, 0x10, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x60, 0x60, 0xc0, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0xcc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6e, 0xd8, 0xd8, 0xd8, 0xde, 0xd8, 0xd8, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xd6, 0xd6, 0xde, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x18, 0x18, 0x30}, |
{0x6c, 0x38, 0x10, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x6c, 0x38, 0x10, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x18, 0x0c, 0x38, 0x00}, |
{0x6c, 0x38, 0x10, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x10, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x3c, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0xfc, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x78, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x78, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x38, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0xcc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x30, 0x60, 0x38, 0x00}, |
{0x10, 0x38, 0x44, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x66, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf8, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xb3, 0xb3, 0x33, 0x3e, 0x33, 0x33, 0x33, 0x33, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x64, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x62, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xe6, 0xe6, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xe0, 0xe0, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x86, 0x06, 0x06, 0x06, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x03, 0x3e, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x7e, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0xf6, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xb6, 0xb3, 0x33, 0x33, 0x33, 0x33, 0x33, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x4c, 0x0c, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0x4c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x18, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0xfe, 0xcc, 0x8c, 0x2c, 0x3c, 0x2c, 0x0c, 0x8c, 0xcc, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x06, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc2, 0xc0, 0x78, 0xc0, 0xc0, 0xc2, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xc0, 0x00}, |
{0x00, 0x00, 0x1c, 0x36, 0x32, 0x30, 0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0, 0x00}, |
{0x00, 0x03, 0x3e, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x38, 0x6c, 0x38, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xf3, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x6d, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc8, 0x38, 0x70, 0xd0, 0x38, 0x38, 0x6c, 0x64, 0xc6, 0xc2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0xec, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x76, 0x7e, 0x7e, 0x6e, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0xc0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x73, 0xdf, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x73, 0x03, 0x03, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0xdf, 0xdb, 0xdb, 0xdb, 0xdb, 0x73, 0x03, 0x03, 0x03, 0x00}, |
{0x00, 0x00, 0x7e, 0xb3, 0xb3, 0x33, 0x3e, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x6c, 0xe6, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x38, 0x60, 0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x0c, 0x38, 0x60, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x62, 0x30, 0x18, 0x18, 0x30, 0x62, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b, 0x0e, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x0c, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0x7e, 0xfe, 0x9a, 0x58, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x36, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00}, |
{0x03, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0x6c, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x63, 0xb3, 0xb3, 0x33, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x0d, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x18, 0xf0, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x7e, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0xfc, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x30, 0x7c, 0x06, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0x60, 0x30, 0x78, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x7c, 0xc0, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x7e, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x60, 0x60, 0x78, 0x0c, 0x06, 0x06, 0x06, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x60, 0x78, 0x0c, 0x06, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x18, 0x4c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x70, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x1b, 0x0e, 0x04, 0xf7, 0xd9, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0xdc, 0xf7, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf5, 0xda, 0xd8, 0xdf, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0xf7, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3d, 0x1a, 0x18, 0x7f, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0x6f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xcb, 0xf6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf3, 0x63, 0x60, 0x67, 0x63, 0x63, 0x63, 0x67, 0x6f, 0xff, 0x03, 0x1b, 0x0e, 0x00}, |
{0x00, 0x00, 0xe3, 0x63, 0x60, 0x67, 0x63, 0x63, 0x63, 0x63, 0x63, 0xf3, 0x03, 0x33, 0x1e, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xfb, 0xfb, 0xfb, 0xdb, 0xdb, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xf8, 0xff, 0xfb, 0xfb, 0xdb, 0xdb, 0xdb, 0xdb, 0x03, 0x33, 0x1e, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x00, 0xb7, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x03, 0x33, 0x1e, 0x00}, |
{0x6c, 0x38, 0x10, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x78, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x10, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x30, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x28, 0x10, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x78, 0x30, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x10, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x30, 0x30, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xdf, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x3e, 0xcc, 0x78, 0x00}, |
{0x6c, 0x38, 0x10, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x6c, 0x38, 0x10, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xe0, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x6c, 0x38, 0x10, 0xfe, 0x0c, 0x18, 0x30, 0x7c, 0x06, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00}, |
{0x00, 0x1b, 0x0e, 0x04, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0xf7, 0xd9, 0xd9, 0xda, 0xda, 0xda, 0xda, 0xdc, 0xdc, 0xf7, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0xd8, 0xd8, 0xdf, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0xf7, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x7f, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0x6f, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x30, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xdb, 0xfb, 0xdb, 0xdb, 0xdb, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x70, 0x60, 0x60, 0x60, 0x60, 0xe0, 0x00}, |
{0x60, 0x30, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x38, 0x6c, 0x38, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x38, 0x6c, 0x38, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7a, 0xc4, 0xce, 0xce, 0xd6, 0xe6, 0xe6, 0x46, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7a, 0xc4, 0xce, 0xd6, 0xe6, 0x46, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x3c, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x1c, 0x74, 0x06, 0x06, 0x06, 0x06, 0x1c, 0xf0, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0e, 0x3c, 0x06, 0x06, 0x1c, 0xf0, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc0, 0xfc, 0x06, 0x0c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc0, 0xfc, 0x06, 0x0c, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x7c, 0x00, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x72, 0x9c, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x3c, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x5c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xdc, 0xe6, 0x7c, 0x80, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0d, 0x06, 0x00}, |
{0x00, 0x00, 0x06, 0x0d, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x6c, 0x8e, 0x16, 0x26, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0x78, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0xcd, 0x0d, 0x38, 0x0c, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xdc, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x06, 0x06, 0x1f, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x0d, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xce, 0xc6, 0xc6, 0x7a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x46, 0x6c, 0x2c, 0x2c, 0x38, 0x18, 0x18, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x64, 0x28, 0x38, 0x38, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xdc, 0x6c, 0x0c, 0x0c, 0x0e, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x7b, 0xde, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x78, 0x58, 0x3e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b, 0x0e, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x7f, 0x63, 0x66, 0x6c, 0x7e, 0x63, 0xf3, 0x03, 0x33, 0x1e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6e, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0xc0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0xd8, 0xd8, 0xde, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0xcc, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0xcc, 0xdc, 0x6c, 0x0c, 0x0d, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0x60, 0x60, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x66, 0x6c, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xfc, 0xc0, 0xd8, 0x70, 0x00}, |
{0x00, 0x00, 0x0e, 0x1b, 0x19, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x98, 0xd8, 0x70, 0x00}, |
{0x00, 0x00, 0x0e, 0x1b, 0x19, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x98, 0xd8, 0x70, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x18, 0x18, 0x18, 0x18, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0e, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0xd8, 0x70, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x3b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xd6, 0xd6, 0xd6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x60, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x06, 0x06, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x66, 0xcb, 0xfe, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x7e, 0xc7, 0x7c, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0x70, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc3, 0xc3, 0xdb, 0xdb, 0xc3, 0xc3, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x76, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x7e, 0xc6, 0xc0, 0xce, 0xc6, 0xc6, 0x7a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0x00, 0x1c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x7e, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0xcc, 0x6c, 0x3c, 0x3c, 0x6c, 0xcc, 0x0c, 0x0c, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x0d, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x1c, 0x18, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0x70, 0x30, 0xfc, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x7f, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0x6f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x7f, 0xdb, 0xdb, 0xde, 0xde, 0xdb, 0x6b, 0x03, 0x1b, 0x0e, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x7f, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0x6f, 0x04, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x60, 0x60, 0xf6, 0x6d, 0x6c, 0x66, 0x63, 0x6b, 0x36, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x26, 0x6d, 0x6c, 0xfc, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x3c, 0x0c, 0x2c, 0x18, 0x00}, |
{0x00, 0x00, 0x20, 0x60, 0x60, 0xf6, 0x6d, 0x6c, 0x6c, 0x6e, 0x6d, 0x36, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0xc0, 0xfe, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x03, 0x03, 0x0e, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6d, 0x6c, 0x66, 0x63, 0x6b, 0xf6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6f, 0x6b, 0x63, 0x66, 0x6c, 0x6d, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xd6, 0x7c, 0x6c, 0x28, 0xc6, 0xd6, 0x7c, 0x6c, 0x28, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xf0, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xc0, 0xf0, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xb0, 0xd8, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x18, 0xd8, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x18, 0xd8, 0x68, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xd8, 0xd8, 0xf0, 0xd8, 0xd8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0xd6, 0x7c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd8, 0x78, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0x18, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0xc0, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x70, 0xc0, 0x70, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0x70, 0x18, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x20, 0x20, 0x70, 0x70, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xd8, 0xd8, 0x70, 0x70, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x1c, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x6c, 0x6c, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x34, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00}, |
{0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x34, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x3e, 0x32, 0x30, 0x34, 0x3c, 0x34, 0x30, 0x30, 0x32, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x33, 0x33, 0x33, 0x33, 0x3f, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x36, 0x36, 0x36, 0x77, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x6c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x82, 0x44, 0x7c, 0x44, 0x00, 0x82, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x62, 0x30, 0x18, 0x18, 0x30, 0x62, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x92, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc0, 0x78, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x6c, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x6c, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x46, 0x6c, 0x2c, 0x2c, 0x38, 0x18, 0x18, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x30, 0x18, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0x78, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x46, 0x7c, 0x18, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x7c, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0x20, 0x30, 0x10, 0x38, 0x38, 0x6c, 0x64, 0xc6, 0xc2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xf6, 0xc0, 0xc0, 0xc0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x66, 0x6c, 0x3c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x3c, 0x30, 0x60, 0x3c, 0x60, 0xc0, 0xc0, 0xc0, 0x7c, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0x7c, 0x06, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x46, 0x2c, 0x2c, 0x18, 0x30, 0x68, 0x68, 0xc4, 0xc2, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x6c, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x36, 0x1e, 0xc6, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc2, 0x65, 0x24, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x21, 0x32, 0x12, 0x1c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc2, 0x65, 0x24, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xa6, 0x2c, 0x38, 0x68, 0xca, 0xc4, 0x0c, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0x60, 0x3c, 0x06, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x7c, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x78, 0x68, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x32, 0x30, 0x30, 0x3c, 0x34, 0x30, 0x30, 0x30, 0x30, 0x00}, |
{0x00, 0x60, 0x30, 0x30, 0x60, 0x63, 0xff, 0xc6, 0x06, 0x0c, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x60, 0x60, 0xfe, 0xfe, 0x0c, 0x0c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xac, 0x26, 0x26, 0x0b, 0x0b, 0x1b, 0x1b, 0x1b, 0x1b, 0x03, 0x02, 0x04, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x30, 0x18, 0x28, 0x4c, 0x14, 0x24, 0x06, 0x02, 0x02, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x6d, 0x03, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x6d, 0x03, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xd6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x36, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x06, 0x76, 0x9c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x7c, 0xd6, 0x66, 0x06, 0x06, 0x66, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x3c, 0x60, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x26, 0x1c, 0x70, 0xc0, 0xc2, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0x68, 0x38, 0x30, 0x38, 0x38, 0x4c, 0x4c, 0x86, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0xba, 0x30, 0x38, 0x28, 0x4c, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xc0, 0xcc, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xc0, 0xdc, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x7e, 0x99, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x1c, 0x18, 0x7e, 0x58, 0x18, 0x18, 0x18, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xa6, 0x2c, 0x38, 0x68, 0xca, 0xc4, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0xc0, 0x60, 0x3c, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x30, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xb2, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x03, 0x06, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xf8, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xd8, 0xd8, 0xd8, 0xde, 0xdb, 0xdb, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xd8, 0xfe, 0xdb, 0xdb, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xb2, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x18, 0x00, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x38, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xfe, 0xc6, 0x82, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x3c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0xc6, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xfe, 0x06, 0x02, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xff, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xb0, 0xb0, 0x30, 0x3c, 0x36, 0x36, 0x36, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xf3, 0xdb, 0xdb, 0xdb, 0xdb, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x86, 0x06, 0x3e, 0x06, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x9c, 0xb6, 0xb6, 0xb6, 0xf6, 0xb6, 0xb6, 0xb6, 0xb6, 0x9c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xcc, 0xcc, 0xcc, 0x7c, 0x6c, 0x6c, 0x6c, 0x6c, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x7c, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xfe, 0xc6, 0x82, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xfe, 0x06, 0x02, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xff, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xb0, 0x30, 0x3c, 0x36, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xf3, 0xdb, 0xdb, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3e, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0xb6, 0xb6, 0xf6, 0xb6, 0xb6, 0x9c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xcc, 0xcc, 0x7c, 0x6c, 0x6c, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf8, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xf8, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xd8, 0xd8, 0xde, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xfe, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf8, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x38, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0xfc, 0xb4, 0x30, 0x3c, 0x36, 0x36, 0x36, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x30, 0xfc, 0xb4, 0x30, 0x3c, 0x36, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xce, 0xdb, 0xd9, 0xd8, 0xfe, 0xd8, 0xd8, 0xd9, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0xdb, 0xd8, 0xfe, 0xd8, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0x6c, 0xfe, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x6c, 0x7c, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x88, 0x8c, 0x9c, 0x96, 0xf6, 0xb6, 0xbf, 0xab, 0xeb, 0xeb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x8c, 0x9c, 0xf6, 0xbe, 0xab, 0xeb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x6c, 0x6c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x6c, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xa3, 0xb2, 0x96, 0xfc, 0x9c, 0xbe, 0xaa, 0xab, 0xeb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xa3, 0x96, 0xfe, 0xab, 0xab, 0xeb, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x7c, 0xc6, 0x06, 0x06, 0x7c, 0x06, 0x06, 0x06, 0x7c, 0xc0, 0x7c, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0x86, 0x06, 0x7c, 0x06, 0x06, 0x7c, 0xc0, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x96, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x96, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc2, 0xc6, 0xc6, 0xc4, 0xcc, 0x6c, 0x68, 0x78, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x64, 0x6c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0xc2, 0xc6, 0xc4, 0xc4, 0x6c, 0x68, 0x78, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0xc2, 0xc6, 0x64, 0x6c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0xd8, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x6f, 0x03, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x6f, 0x03, 0x06, 0x1c, 0x00}, |
{0x00, 0x10, 0x7c, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0x7c, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0xd6, 0xc6, 0xc6, 0xc6, 0xd6, 0x7c, 0x10, 0x00, 0x00, 0x00}, |
{0x04, 0x7c, 0x40, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x7c, 0x40, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x54, 0x00, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0x54, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x60, 0x3c, 0x0c, 0x0c, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0x78, 0x18, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x3c, 0x0f, 0x18, 0x18, 0xf0, 0x3c, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x7c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x24, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x40, 0x7c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x7c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x66, 0x00, 0xc3, 0x00, 0x66, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x50, 0x46, 0x00, 0x82, 0x41, 0x00, 0x62, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0xc6, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x60, 0xf0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x6e, 0x64, 0x7a, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x6e, 0x64, 0x7a, 0x60, 0x60, 0xf0, 0x00}, |
{0x02, 0x06, 0xfe, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x02, 0x06, 0xfe, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0xf8, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0xf8, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xf6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x78, 0x6c, 0x66, 0xf6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0xd7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x3c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xdc, 0xf8, 0xdc, 0xd6, 0xd6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xdc, 0xf8, 0xdc, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0xf6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0xf0, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf3, 0xb3, 0xb3, 0x36, 0x3c, 0x3c, 0x36, 0x33, 0x33, 0x73, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, 0xb6, 0xbc, 0x3c, 0x36, 0x33, 0x73, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xdf, 0xdb, 0xd9, 0xd8, 0xf8, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xdb, 0xd9, 0xf8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xd8, 0xd8, 0xd8, 0xde, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x03, 0x0b, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xfe, 0xdb, 0xdb, 0xdb, 0x03, 0x0b, 0x06, 0x00}, |
{0x00, 0x00, 0x7c, 0xc2, 0xcc, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xcc, 0x7a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc2, 0xcc, 0xd6, 0xd6, 0xcc, 0x7a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0c, 0x04, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0c, 0x04, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x3c, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x3c, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xf6, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7f, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7f, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0x7e, 0x16, 0x16, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0x7e, 0x16, 0x16, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x33, 0xb3, 0xb3, 0x7f, 0x30, 0x30, 0x30, 0x33, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xb3, 0x7f, 0x30, 0x30, 0x33, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x33, 0xb3, 0xb3, 0x7f, 0x30, 0x30, 0x30, 0x33, 0x1e, 0x0c, 0x18, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xb3, 0x7f, 0x30, 0x30, 0x33, 0x1e, 0x0c, 0x18, 0x0e, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0xd6, 0xd6, 0xd6, 0x7c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0e, 0x0c, 0x08, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x0e, 0x0c, 0x08, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x06, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x3c, 0x06, 0x86, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00}, |
{0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x78, 0xcc, 0x86, 0x06, 0x3e, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x06, 0x3e, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x66, 0xcc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc3, 0xc3, 0xc3, 0xf3, 0xdb, 0xdb, 0xdb, 0xdb, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc3, 0xc3, 0xc3, 0xf3, 0xdb, 0xdb, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x7c, 0xcd, 0xcd, 0xcd, 0xcd, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcd, 0xcd, 0xcd, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x8c, 0x0c, 0x38, 0x0d, 0x0d, 0x0d, 0x0d, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0x0c, 0x39, 0x0d, 0x0d, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x3c, 0x06, 0x06, 0x06, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6d, 0x6d, 0x6d, 0x6d, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x6d, 0x6d, 0x6d, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xfc, 0xcd, 0xcd, 0xcd, 0xcd, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xfd, 0xcd, 0xcd, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xce, 0xc6, 0xc6, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xce, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x1b, 0x1b, 0x1b, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x5a, 0x18, 0x1b, 0x1b, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x64, 0x94, 0xba, 0x52, 0x4c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0x7b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x7f, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x7e, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x0c, 0xd8, 0xfe, 0xc3, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7c, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x60, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xcf, 0xd6, 0xd6, 0xd6, 0xd6, 0xcc, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x0c, 0x7f, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7c, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xf6, 0xd6, 0xd6, 0xd6, 0xd6, 0xcc, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0x7f, 0x24, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, 0xf0, 0x3c, 0x0e, 0x04, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x6c, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x0c, 0x0c, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x30, 0x60, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcf, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x06, 0x06, 0x7c, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x60, 0x60, 0x60, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x6c, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x16, 0x16, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x76, 0x1e, 0x0e, 0x0c, 0xd8, 0xfe, 0xc3, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x30, 0x18, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x06, 0x06, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x63, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xfe, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd0, 0xd0, 0xd0, 0x7c, 0x16, 0x16, 0x16, 0xd6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x3c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x36, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x60, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x6a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7f, 0x0c, 0x0c, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0x0c, 0x0c, 0x0c, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x0f, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x7c, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x0c, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x7e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc6, 0xc6, 0xcf, 0xd6, 0xd6, 0xcc, 0xc0, 0xc0, 0xc0, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x7f, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3e, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xf6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xca, 0xc0, 0xc0, 0xc0, 0x00}, |
{0x00, 0x00, 0x60, 0x38, 0x0c, 0x7f, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x1c, 0x0c, 0x18, 0x3c, 0x64, 0x66, 0x62, 0x63, 0x3d, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x0c, 0x0c, 0x0f, 0x00}, |
{0x00, 0x00, 0x0e, 0x18, 0x30, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0f, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x3e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x3e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7e, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x76, 0x1c, 0x18, 0x30, 0x60, 0x3e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x0f, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0xdc, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x76, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0xfe, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd0, 0xd0, 0x7c, 0x16, 0x16, 0x16, 0x16, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0x77, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x6c}, |
{0x18, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x38, 0x10, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x60, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0c, 0x00}, |
{0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x74, 0xd6, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x18, 0x30, 0x00}, |
{0x0c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1b, 0x36, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x44, 0xaa, 0x6c, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x0a, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0x50, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x3c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x6c, 0xd8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x08, 0x30}, |
{0x60, 0x30, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0xa0, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x38, 0x10, 0x10}, |
{0x18, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x06, 0x03, 0x00}, |
{0x48, 0xa8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x33, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x00, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x60, 0x66, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x18}, |
{0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x66, 0x76, 0xdc, 0xcc, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf8, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x0c, 0x0c, 0x0c, 0x1c, 0x36, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xcc, 0xd6, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0x06, 0x0c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xee, 0x66, 0x66, 0x66, 0x66, 0x66, 0x2c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf8, 0x4c, 0xcc, 0xcc, 0xec, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x46, 0xc6, 0xc6, 0xe6, 0x06, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xee, 0x66, 0x66, 0x6c, 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x70, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xee, 0x66, 0x66, 0x34, 0x18, 0x0c, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x66, 0x64, 0x6c, 0x6e, 0x60, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xf6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x66, 0xe6, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x66, 0x66, 0xc6, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x22, 0x20, 0x10, 0x08, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x20, 0x1e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x3c, 0x40, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x20, 0x1c, 0x20, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x18, 0x20, 0x1c, 0x20, 0x00, 0x00}, |
{0x00, 0x30, 0x40, 0x38, 0x40, 0x07, 0x08, 0x88, 0x86, 0x81, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x28, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x14, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x88, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x20, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x40, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x09, 0x47, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x19, 0x21, 0x19, 0x21, 0x01, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x3c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x40, 0x30, 0x4e, 0x49, 0x39, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x24, 0x00}, |
{0x0c, 0x30, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x12, 0xca, 0x2c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0c, 0x30, 0x00, 0x00}, |
{0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x14, 0x0c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00}, |
{0x0a, 0x2a, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x7e, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x10, 0x0c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x10, 0x0c, 0x10}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x70, 0x70, 0x38, 0x18, 0x18, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x44, 0xfc, 0xf8, 0x60, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4a, 0xfe, 0xf4, 0x60, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x20, 0x40, 0x30, 0x10, 0x20, 0x42, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x2c, 0x44, 0x42, 0x82, 0x82, 0xfe, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xf8, 0x78, 0x08, 0x08, 0x08, 0x0c, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x82, 0xc6, 0xc6, 0x6c, 0x28, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x38, 0x28, 0x6c, 0xc6, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xf8, 0x88, 0xf8, 0x78, 0x08, 0x0c, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x91, 0x92, 0x64, 0x08, 0x10, 0x26, 0x49, 0x89, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x18, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0xfe, 0x7c, 0x38, 0x6c, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x29, 0x5e, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x28, 0x5e, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x06, 0x28, 0x5e, 0x00, 0x00, 0x00}, |
{0x00, 0x07, 0x08, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x04, 0x03, 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x04, 0x03, 0x04, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x23, 0x54, 0x33, 0x24, 0x40, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x04, 0x03, 0x04, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x14, 0x40, 0x81, 0x81, 0x7e, 0x08, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x08, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00}, |
{0x06, 0x08, 0x06, 0x08, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x08, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x94, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x88, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x94, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x20, 0x38, 0x28, 0x70, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x08, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x38, 0x28, 0x70, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x08, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x14, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x1c, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x14, 0x08, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x12, 0x04, 0x18, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x14, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x14, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x15, 0x88, 0x88, 0x8a, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0x88, 0x88, 0x90, 0x65, 0x00, 0x02, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x00, 0x0a, 0x00, 0x01, 0x15, 0x88, 0x88, 0x90, 0x65, 0x00, 0x02, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x90, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x2a, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x00, 0x50, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x0a, 0x00, 0x04, 0x00, 0x00, 0x00}, |
{0x0a, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x09, 0x47, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x09, 0x47, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x01, 0x02, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x20, 0x40, 0x3e, 0x01, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x01, 0x02, 0x05, 0x0b, 0x48, 0x84, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x19, 0x21, 0x19, 0x21, 0x01, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x29, 0x01, 0x19, 0x21, 0x19, 0xa1, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x19, 0x21, 0x19, 0x21, 0x01, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x05, 0x0b, 0x48, 0x84, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xa4, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x44, 0x09, 0xa2, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x08, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x02, 0x2a, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x14, 0x00, 0x08, 0x00}, |
{0x00, 0x08, 0x00, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x04, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x08, 0x14, 0x08, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0x3c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x38, 0x40, 0x38, 0x40, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x40, 0x38, 0x40, 0x00, 0x0c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x0c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x12, 0x2c, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x3c, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x18, 0x10, 0x20, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x08, 0x08, 0x08, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x20, 0x47, 0x88, 0x08, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x50, 0x20, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x82, 0x7c, 0x00, 0x08, 0x00, 0x08}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x82, 0x7c, 0x00, 0x14, 0x00, 0x08}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x60, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x80, 0x60, 0x80, 0x08, 0x14, 0x60, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0x40, 0x43, 0x55, 0x7e, 0x80, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x2a, 0x20, 0x26, 0x2a, 0x7c, 0x80, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0e, 0x1c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x14, 0x08, 0x14, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x2c, 0x10, 0x28, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x15, 0x8a, 0x90, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x5a, 0xa5, 0x66, 0x5b, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x5a, 0x66, 0xa5, 0x5a, 0x00}, |
{0x00, 0x00, 0x18, 0x66, 0x42, 0x42, 0x81, 0x99, 0x99, 0x81, 0x42, 0x42, 0x66, 0x18, 0x00, 0x00}, |
{0x08, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x26, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x8a, 0x90, 0x60}, |
{0x32, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x0c, 0x04, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x30, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x54, 0xaa, 0x92, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x82, 0xfe, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x14, 0x08}, |
{0x08, 0x14, 0x22, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x10, 0x10, 0x10}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x70, 0x70, 0x38, 0x18, 0x18, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x44, 0xfc, 0xf8, 0x60, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4a, 0xfe, 0xf4, 0x60, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4e, 0xf0, 0xfe, 0x7c, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x38, 0x2c, 0x44, 0x42, 0x82, 0x92, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x60, 0x7e, 0x3c, 0x30, 0x60, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x82, 0xc6, 0xc6, 0x6c, 0x28, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x38, 0x28, 0x6c, 0xc6, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xf8, 0x88, 0xf8, 0x78, 0x08, 0x0c, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x01, 0x15, 0x88, 0x88, 0x88, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x40, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x88, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x20, 0x1e, 0x20, 0x00, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x3c, 0x40, 0x54, 0x54, 0x54, 0x54, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x4c, 0x30, 0x4c, 0x02, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x64, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xaa, 0xaa, 0xaa, 0x82, 0x82, 0x40, 0x30, 0x4c, 0x02, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x82, 0x82, 0x44, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x82, 0x82, 0x40, 0x30, 0x4c, 0x02, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x38, 0x6c, 0x38}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x38, 0x6c, 0x38}, |
{0x18, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x0c, 0xec, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x7c, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x30, 0x30, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x60, 0x0c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x30, 0x18, 0x70, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x30, 0x18, 0x70, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x10, 0x38, 0x6c, 0x00}, |
{0x60, 0x30, 0x00, 0x7c, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x76, 0xdc, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x76, 0xdc, 0x00}, |
{0x6c, 0x38, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x18, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x38, 0x6c, 0x64, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0c, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x60, 0x30, 0xe0, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x30, 0x18, 0x70, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x76, 0xdc, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x76, 0xdc, 0x00}, |
{0x0c, 0x18, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x0c, 0xec, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x7c, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x7c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x10, 0x38, 0x6c, 0x00}, |
{0x0c, 0x18, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x10, 0x38, 0x6c, 0x00}, |
{0x0c, 0x18, 0x72, 0x9c, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x00, 0x72, 0x9c, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x18, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x18, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x7c, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x7c, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x60, 0x6c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0x70, 0x1c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x60, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x44, 0x38, 0x10, 0x7c, 0xc6, 0xc6, 0x70, 0x1c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x44, 0x38, 0x10, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x18, 0x18, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x16, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x08, 0x1c, 0x36, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x6c, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x6c, 0x6c, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x76, 0xdc, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x76, 0xdc, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x10, 0x38, 0x6c, 0x00}, |
{0x0c, 0x18, 0x72, 0x9c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x76, 0xdc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0xcc, 0x00, 0xfc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x18, 0x18, 0x00}, |
{0x60, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x30, 0x30, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x10, 0x38, 0x44, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x7c, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x10, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x18, 0x0c, 0x18, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x38, 0x6c, 0x64, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x16, 0x38, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x16, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x68, 0x1c, 0x36, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x68, 0x1c, 0x36, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x28, 0x54, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x38, 0x44, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x0c, 0x18, 0x44, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x44, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x44, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x44, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x08, 0x54, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x08, 0x54, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x72, 0x9c, 0x44, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x72, 0x9c, 0x44, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x23, 0x76, 0x88, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x26, 0x70, 0xd8, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xc4, 0x6e, 0x11, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x64, 0x0e, 0x1b, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x38, 0x44, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x38, 0x44, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x23, 0x76, 0x88, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x26, 0x70, 0xd8, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xc4, 0x6e, 0x11, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x64, 0x0e, 0x1b, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x28, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x38, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x18, 0x33, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1b, 0x33, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x33, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x63, 0x33, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x70, 0x1b, 0x33, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x1b, 0x33, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x68, 0xb3, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x68, 0xb3, 0x03, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x18, 0x30, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x33, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1b, 0x33, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x33, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x63, 0x33, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x70, 0x1b, 0x33, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x1b, 0x33, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x68, 0xb3, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x68, 0xb3, 0x03, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x30, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x0c, 0x18, 0xf6, 0x06, 0x00}, |
{0x38, 0x0c, 0x18, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x3a, 0x5c, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x18, 0x18, 0x30, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x18, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x60, 0x6c, 0xc6, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xcc, 0x66, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x60, 0x66, 0xcc, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc6, 0x6c, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x34, 0x58, 0x0c, 0x18, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x34, 0x58, 0x30, 0x18, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0xfe, 0x00, 0xa4, 0xaa, 0xea, 0xea, 0xa6, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xa4, 0xea, 0xaa, 0xaa, 0xa6, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x8a, 0xce, 0x8e, 0xea, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x8e, 0xca, 0x8a, 0xea, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xca, 0x2e, 0x4a, 0x2a, 0xca, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xaa, 0xae, 0xea, 0x2a, 0x2a, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x6a, 0x8e, 0xca, 0xaa, 0x4a, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x38, 0x20, 0x30, 0x20, 0x20, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x30, 0x28, 0x30, 0x20, 0x20, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x4a, 0x4e, 0x4a, 0x4a, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x28, 0x28, 0x38, 0x28, 0x28, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x2a, 0x4e, 0x8e, 0xee, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x2a, 0x4e, 0x8e, 0xee, 0x00, 0xa2, 0xa2, 0xe2, 0xea, 0xa4, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x2a, 0x4e, 0x8e, 0xee, 0x00, 0x08, 0x08, 0x08, 0x28, 0x10, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x80, 0x80, 0x80, 0xf0, 0x28, 0x30, 0x28, 0x0a, 0x0e, 0x0e, 0x0a, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xc0, 0xa0, 0xc0, 0xa0, 0x20, 0x20, 0x38, 0x0a, 0x0e, 0x0e, 0x0a, 0x00, 0xfe, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x9c, 0xd2, 0xbc, 0x92, 0x9c, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0xfe, 0x00}, |
{0x00, 0x18, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x66, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00}, |
{0x00, 0xcc, 0xcc, 0xcc, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x38, 0x3c, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x6b, 0x6b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x92, 0x44, 0x28, 0x92, 0x28, 0x44, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xc3, 0xdb, 0x1b, 0x1e, 0x1c, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x7c, 0x00, 0x00}, |
{0x7c, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x28, 0x00, 0x00, 0x44, 0xee, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7b, 0xcf, 0xcf, 0x1b, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xde, 0xf3, 0xf3, 0xc6, 0xcc, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x06, 0x06, 0x0c, 0x0c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xdb, 0xdb, 0xdb, 0xde, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x3e, 0x72, 0xf2, 0xf2, 0xf2, 0x72, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf8, 0x9c, 0x9e, 0x9e, 0x9e, 0x9c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x38, 0x78, 0xd8, 0xfc, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xf8, 0xc0, 0xf0, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x78, 0xc0, 0xf0, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xf8, 0xd8, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0x70, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0xd8, 0x78, 0x18, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x60, 0x60, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x60, 0x30, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xb0, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x30, 0x60, 0xc8, 0xf8, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x30, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0xd8, 0xfc, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xc0, 0xf0, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xc0, 0xf0, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xd8, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x70, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0xd8, 0x78, 0x18, 0xf0, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x60, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xc0, 0xcf, 0xcc, 0xcc, 0x7f, 0x0c, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x04, 0x7c, 0xce, 0xc8, 0xc8, 0xd0, 0xd0, 0xd0, 0xe0, 0xe6, 0x7c, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xd6, 0xd8, 0xd8, 0xd8, 0xde, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xc0, 0xc0, 0xc0, 0xf0, 0xcd, 0xce, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0xf8, 0x60, 0xf8, 0x60, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0xec, 0xd6, 0xde, 0xd6, 0xd6, 0xf6, 0xd6, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x76, 0xff, 0x76, 0x6e, 0xff, 0x6e, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x62, 0x66, 0x6f, 0x66, 0x66, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xf8, 0xe0, 0xf3, 0xd6, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x81, 0x81, 0x81, 0x5a, 0xff, 0x5a, 0xff, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf2, 0x8a, 0xaa, 0xaa, 0xaa, 0xaa, 0xa2, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x3e, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x36, 0x60, 0xfc, 0x60, 0xf8, 0x60, 0x60, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x6c, 0x78, 0xfe, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x1e, 0x78, 0x1e, 0x78, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x7c, 0xb6, 0x36, 0x33, 0x33, 0x33, 0x63, 0x66, 0xf6, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd0, 0xd2, 0xd6, 0x7c, 0x18, 0x30, 0x6e, 0xd8, 0x98, 0x18, 0x0e, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd0, 0xd2, 0xd6, 0x7c, 0x18, 0x30, 0x6e, 0xd8, 0x8c, 0x06, 0x1c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x62, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0x62, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4e, 0xb9, 0x58, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x7c, 0xda, 0xd8, 0xd8, 0xda, 0x7c, 0x19, 0x3f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xc0, 0xc2, 0xc6, 0x7c, 0x18, 0x30, 0x6e, 0xdb, 0x9b, 0x1b, 0x0e, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xc0, 0xc2, 0xc6, 0x7c, 0x18, 0x30, 0x7b, 0xdb, 0x9b, 0x1b, 0x0d, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc2, 0xc0, 0x78, 0xc0, 0xc0, 0xc2, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x86, 0x26, 0x3e, 0x26, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7f, 0xb9, 0x58, 0x1a, 0x1e, 0x1a, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x66, 0x46, 0x87, 0x8c, 0x8c, 0x7c, 0x98, 0x98, 0x70, 0x00}, |
{0x00, 0x00, 0x52, 0xb5, 0x15, 0x16, 0x2c, 0x34, 0x68, 0xa9, 0xaa, 0x4c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x48, 0xb0, 0x80, 0x48, 0x7c, 0x66, 0x26, 0x26, 0xa6, 0x46, 0x06, 0x34, 0x48, 0x00}, |
{0x00, 0x00, 0xe2, 0xa2, 0xa2, 0xa2, 0xbe, 0xa2, 0xa2, 0xa2, 0xa2, 0xe2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x36, 0x3b, 0x3b, 0x33, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x1e, 0x18, 0x76, 0x3b, 0x3b, 0x33, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x33, 0x4e, 0x06, 0x06, 0x0c, 0x0c, 0x1f, 0x6c, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x71, 0x8e, 0x04, 0x0c, 0x06, 0x03, 0x63, 0xc3, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x46, 0x49, 0x39, 0x1e, 0x18, 0x30, 0x70, 0xb1, 0xba, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0e, 0x19, 0x31, 0x32, 0x64, 0x68, 0x70, 0xe1, 0x66, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd8, 0xff, 0xd8, 0xde, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe2, 0xa2, 0xb2, 0xb2, 0xaa, 0xaa, 0xa6, 0xa6, 0xa2, 0xe2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcf, 0xed, 0xff, 0xfc, 0xdf, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0xb9, 0xa5, 0xa5, 0xb9, 0xa1, 0xa1, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x40, 0x8e, 0x93, 0xa3, 0x63, 0x4b, 0x6a, 0xa4, 0xb0, 0xb0, 0x60, 0x00}, |
{0x00, 0x00, 0xfc, 0xa2, 0xa2, 0xa2, 0xa2, 0xbc, 0xa0, 0xa0, 0xa0, 0xe0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xa2, 0xa2, 0xa2, 0xa2, 0xa2, 0xa2, 0xaa, 0xa6, 0x7e, 0x01, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x4d, 0x4d, 0x19, 0x1e, 0x1c, 0x34, 0x34, 0xb5, 0x62, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x58, 0xa6, 0xa3, 0x6c, 0xb8, 0x26, 0x26, 0x26, 0xa7, 0xc2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0xa2, 0xa2, 0xa2, 0xa2, 0xbc, 0xb0, 0xa8, 0xa4, 0xe2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x6d, 0x67, 0x66, 0xee, 0x08, 0x00, 0x00, 0x00}, |
{0x30, 0x0c, 0xfc, 0xc6, 0xc6, 0xc6, 0xfc, 0xd8, 0xdc, 0xdc, 0xe6, 0xe6, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x71, 0xdb, 0x35, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x52, 0x5a, 0x52, 0x5f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf1, 0x5b, 0x55, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x18, 0xce, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xe6, 0x6c, 0x38, 0x50, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x0a, 0x14, 0x14, 0x28, 0x28, 0x50, 0x50, 0xa0, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x9c, 0x30, 0xfe, 0x0c, 0x18, 0x38, 0x0c, 0x06, 0x06, 0xc6, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0x6c, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x26, 0x03, 0x13, 0x0c, 0x13, 0x03, 0x03, 0x66, 0x98, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x38, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x2d, 0x2d, 0x1a, 0x1e, 0x1b, 0x31, 0x31, 0xb2, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x14, 0x6b, 0xc8, 0xcc, 0xc6, 0xc6, 0xcc, 0xc0, 0x63, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xe7, 0xff, 0xe0, 0x67, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x26, 0x44, 0xf8, 0xc0, 0xc8, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4c, 0x52, 0x3c, 0x10, 0x3c, 0x60, 0xc0, 0xc3, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x73, 0xce, 0x18, 0x3a, 0x5c, 0x18, 0x30, 0x30, 0xb0, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x2c, 0x3c, 0x2c, 0x8c, 0xcc, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x12, 0x12, 0x12, 0x16, 0x36, 0x3e, 0x3a, 0x5a, 0x52, 0x91, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x26, 0x46, 0xc6, 0xc4, 0xc8, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x42, 0xc6, 0xe7, 0x7a, 0x38, 0x5c, 0xce, 0xe7, 0x63, 0xe2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xfc, 0x7e, 0x06, 0x06, 0x06, 0x06, 0x0c, 0x7e, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x40, 0x78, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x1e, 0x7e, 0xf2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xfe, 0x7e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x38, 0x00, 0x78, 0x38, 0x38, 0x38, 0x38, 0x38, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xff, 0x83, 0x86, 0x82, 0xfe, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xdc, 0x86, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0xc6, 0xfc, 0x18, 0x30, 0x60, 0xdc, 0x86, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xde, 0x98, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0xc6, 0xfc, 0x18, 0x30, 0x60, 0xde, 0x98, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0x36, 0xec, 0x18, 0x30, 0x60, 0xde, 0x98, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0x30, 0x70, 0xb2, 0xf6, 0x3c, 0x18, 0x30, 0x60, 0xde, 0x98, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xdc, 0xb0, 0x3c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xf0, 0xc0, 0xe2, 0x36, 0xec, 0x18, 0x30, 0x60, 0xdc, 0xb0, 0x3c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xdc, 0xb6, 0x1c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0x36, 0xec, 0x18, 0x30, 0x60, 0xdc, 0xb6, 0x1c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xf0, 0x80, 0xe2, 0x36, 0xec, 0x18, 0x30, 0x60, 0xdc, 0xb6, 0x1c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xf0, 0x30, 0x62, 0x66, 0x6c, 0x18, 0x30, 0x60, 0xdc, 0xb6, 0x1c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xce, 0xce, 0xc4, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x73, 0x73, 0x23, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x65, 0x65, 0x65, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xce, 0xce, 0xce, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0x73, 0x73, 0x73, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x95, 0x95, 0x95, 0x65, 0x65, 0x65, 0x95, 0x95, 0x95, 0x95, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xce, 0xc4, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x73, 0x23, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x05, 0x05, 0x00, 0x95, 0x95, 0x95, 0x95, 0x95, 0x65, 0x65, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x15, 0x15, 0x00, 0xb5, 0xb5, 0xb5, 0xb5, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0x00, 0xdb, 0xdb, 0xce, 0xce, 0xce, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x00, 0xdb, 0xdb, 0x73, 0x73, 0x73, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x05, 0x05, 0x00, 0x95, 0x95, 0x65, 0x65, 0x95, 0x95, 0x95, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x5a, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x5a, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xcc, 0xe6, 0xd6, 0xd6, 0xd6, 0xd6, 0xe6, 0xcc, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x5a, 0x99, 0xbd, 0xdb, 0xdb, 0xbd, 0x99, 0x5a, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x86, 0x06, 0x06, 0x06, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xff, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0xff, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xf0, 0xe0, 0xb0, 0x18, 0x0c, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0f, 0x07, 0x0d, 0x18, 0x30, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x30, 0x18, 0x0d, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x0c, 0x18, 0xb0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x62, 0xff, 0x64, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x26, 0xff, 0x46, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x73, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xff, 0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x36, 0xff, 0x36, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x66, 0xfc, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x3f, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x63, 0xff, 0x63, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xc6, 0xff, 0xc6, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x33, 0x63, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0xc6, 0x7f, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x3b, 0x6b, 0xfe, 0x68, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x60, 0xdc, 0xd6, 0x7f, 0x16, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x5a, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x6e, 0xff, 0x76, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x60, 0x63, 0xff, 0xc6, 0x16, 0x1c, 0x1c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x66, 0x36, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0xcc, 0xd8, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x36, 0x66, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xd8, 0xcc, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0c, 0x0c, 0x3f, 0x1e, 0x0c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x36, 0x66, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x1e, 0x33, 0x33, 0x33, 0x30, 0xfc, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0x0c, 0x3f, 0x1e, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x00, 0xf0, 0xe0, 0xb0, 0x18, 0x0c, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x98, 0xb0, 0xff, 0xb0, 0x98, 0x19, 0x0d, 0xff, 0x0d, 0x19, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x1e, 0x1c, 0x16, 0x03, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x78, 0x38, 0x68, 0xc0, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x1c, 0x1e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1e, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x06, 0xff, 0x06, 0x0c, 0x30, 0x60, 0xff, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x2e, 0x3f, 0x24, 0x24, 0x24, 0x24, 0xfc, 0x74, 0x24, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x60, 0xff, 0x60, 0x30, 0x0c, 0x06, 0xff, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x7e, 0xff, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xff, 0x7e, 0x24, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xff, 0x00, 0xff, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0xff, 0x00, 0xff, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7f, 0xc4, 0x7f, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x7e, 0xcb, 0x7e, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xfe, 0x23, 0xfe, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7f, 0xc0, 0x7f, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x7c, 0xee, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0x03, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xee, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x7e, 0xc3, 0x7e, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x7c, 0xee, 0x6c, 0x6c, 0x6c, 0x6c, 0xee, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xf0, 0xe0, 0xb0, 0xd8, 0xec, 0xb6, 0x1b, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0f, 0x07, 0x0d, 0x1b, 0x37, 0x6d, 0xd8, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x20, 0x30, 0xd8, 0x6d, 0x37, 0x1b, 0x0d, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x0c, 0x1b, 0xb6, 0xec, 0xd8, 0xb0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x3f, 0x60, 0xff, 0x60, 0x3f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0xfc, 0x06, 0xff, 0x06, 0xfc, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6a, 0xff, 0x65, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xa6, 0xff, 0x56, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x3c, 0x18, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x3c, 0x18, 0x3c, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xd5, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x66, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0xab, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xb0, 0xff, 0xb0, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x0d, 0xff, 0x0d, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x3f, 0x41, 0x81, 0x41, 0x3f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0xc6, 0x44, 0x44, 0x44, 0x44, 0x44, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0xfc, 0x82, 0x81, 0x82, 0xfc, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0x44, 0x44, 0x44, 0x44, 0x44, 0xc6, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0xc6, 0x44, 0x44, 0x7c, 0x00, 0x7c, 0x44, 0x7c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0xc6, 0x44, 0x44, 0x44, 0xc6, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x7c, 0xc6, 0x44, 0x44, 0x44, 0xc6, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x54, 0xd6, 0x54, 0x54, 0x54, 0xd6, 0x92, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x28, 0x54, 0xee, 0x44, 0xc6, 0x44, 0x44, 0x44, 0x44, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x28, 0x54, 0xee, 0x44, 0xc6, 0x44, 0x44, 0xc6, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xe8, 0xbc, 0x82, 0x81, 0x82, 0xbc, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x80, 0xbc, 0xb8, 0xac, 0x86, 0x83, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x01, 0x81, 0xc1, 0x61, 0x35, 0x1d, 0x3d, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0xc6, 0x44, 0x44, 0x44, 0xc6, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xfe, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x60, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x06, 0x06, 0x3e, 0x66, 0xc6, 0xc6, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x7e, 0x06, 0x06, 0x06, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0xfe, 0x16, 0x16, 0x16, 0x7e, 0x16, 0x26, 0x26, 0x26, 0xfe, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x3e, 0x66, 0xcf, 0xdb, 0xdb, 0xf3, 0x66, 0x7c, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x3e, 0x60, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, 0x60, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x3e, 0x64, 0xc8, 0xc8, 0xfe, 0xc8, 0xd0, 0x70, 0x3e, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x3e, 0x60, 0xc0, 0xfe, 0xc0, 0x60, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xf8, 0x0c, 0x06, 0x06, 0xfe, 0x06, 0x06, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0xf8, 0x1c, 0x16, 0x26, 0xfe, 0x26, 0x26, 0x4c, 0xf8, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf8, 0x0c, 0x06, 0xfe, 0x06, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xe7, 0x00, 0x00}, |
{0x00, 0x00, 0xe7, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x0c, 0x18, 0x30, 0x60, 0xc1, 0xff, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x7e, 0x18, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0x06, 0x06, 0x0c, 0xcc, 0x6c, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe3, 0x33, 0x66, 0x36, 0xe6, 0x0c, 0xcc, 0x6c, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x33, 0x73, 0xb6, 0xf6, 0x36, 0x0c, 0xcc, 0x6c, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdb, 0xdb, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x16, 0x0c, 0x1c, 0x34, 0x62, 0xff, 0x02, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x38, 0xe8, 0x38, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x1a, 0x1c, 0x38, 0x58, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6e, 0x7c, 0xec, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x1a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x58, 0x30, 0x00, 0x00}, |
{0x33, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00}, |
{0x2a, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x00, 0x00}, |
{0x0c, 0x1a, 0x18, 0x18, 0x3c, 0x5a, 0x99, 0x99, 0x5a, 0x3c, 0x18, 0x18, 0x58, 0x30, 0x00, 0x00}, |
{0x33, 0x66, 0x66, 0x66, 0x7e, 0xe7, 0xe7, 0xe7, 0xe7, 0x7e, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00}, |
{0x2a, 0x54, 0x54, 0x54, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x54, 0x54, 0x54, 0xa8, 0x00, 0x00}, |
{0x18, 0x34, 0x30, 0x30, 0x38, 0x35, 0x33, 0x37, 0x30, 0x30, 0x30, 0x30, 0xb0, 0x60, 0x00, 0x00}, |
{0x0c, 0x1a, 0x18, 0x18, 0x3c, 0x5a, 0xfa, 0x5a, 0x5a, 0x3c, 0x18, 0x18, 0x58, 0x30, 0x00, 0x00}, |
{0x0c, 0x1a, 0x18, 0x18, 0x3c, 0x5a, 0x5f, 0x5a, 0x5a, 0x3c, 0x18, 0x18, 0x58, 0x30, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0xfc, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x7e, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x76, 0xdc, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xdb, 0xdb, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0xdb, 0xdb, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x1c, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x10, 0x76, 0xdc, 0x10, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x76, 0xdc, 0x10, 0xfe, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x08, 0xfe, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x08, 0x76, 0xdc, 0x10, 0xfe, 0x20, 0xfe, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x76, 0xdc, 0x10, 0x76, 0xdc, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x7c, 0x00, 0x7c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x00, 0x00, 0x66, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc0, 0xdf, 0x00, 0x00, 0xdf, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0xfb, 0x00, 0x00, 0xfb, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x28, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x10, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x44, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x44, 0x28, 0x10, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x10, 0x7c, 0x28, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x28, 0x44, 0x7c, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x26, 0x7c, 0xb4, 0x6c, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x68, 0x54, 0x54, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x08, 0x10, 0x00, 0x10, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x08, 0x7e, 0x08, 0x10, 0x7e, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x08, 0xfe, 0x08, 0x10, 0xfe, 0x10, 0x20, 0xfe, 0x20, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x08, 0xfe, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x08, 0xfe, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x1b, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 0x1b, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0xce, 0x7c, 0x10, 0x7c, 0xe6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x04, 0x0e, 0x38, 0xe8, 0x38, 0x0e, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0xe0, 0x38, 0x2e, 0x38, 0xe0, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x04, 0x0e, 0x38, 0xe8, 0x38, 0x0e, 0x10, 0xfe, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0xe0, 0x38, 0x2e, 0x38, 0xe0, 0x40, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x04, 0x0e, 0x38, 0xe8, 0x38, 0x0e, 0x10, 0x76, 0xdc, 0x20, 0x20, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0xe0, 0x38, 0x2e, 0x38, 0xe0, 0x40, 0x76, 0xdc, 0x80, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x0e, 0x38, 0xe8, 0x38, 0x1e, 0xf0, 0x38, 0x2e, 0x38, 0xe0, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0xe8, 0x38, 0x0e, 0x38, 0xf0, 0x1e, 0x38, 0xe0, 0x38, 0x2e, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x02, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x80, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x02, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0xf2, 0x1c, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x9e, 0x70, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x02, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x02, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x80, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x06, 0x0c, 0x38, 0xe8, 0x38, 0x1c, 0x16, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0xd0, 0x70, 0x38, 0x2e, 0x38, 0x60, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0xc0, 0xc0, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x7e, 0xc8, 0xc8, 0xd0, 0xd0, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0xfc, 0x16, 0x16, 0x26, 0x26, 0xfc, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0xc0, 0xc0, 0x7e, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0xfc, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x7e, 0xc8, 0xc8, 0xd0, 0xd0, 0x7e, 0x20, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0xfc, 0x16, 0x16, 0x26, 0x26, 0xfc, 0x40, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0xc0, 0xc0, 0x7e, 0x08, 0xfe, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0xfc, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0x92, 0xa2, 0xfa, 0xa2, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x92, 0xba, 0xba, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x92, 0xba, 0x92, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x54, 0x92, 0xfe, 0x92, 0x54, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0xfe, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0xaa, 0x92, 0xaa, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x8a, 0x92, 0xa2, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x92, 0xba, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x92, 0xaa, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x54, 0xd6, 0xba, 0xd6, 0x54, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0xba, 0x82, 0xba, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0xba, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x92, 0x92, 0xfe, 0x92, 0x92, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0xfe, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xaa, 0x92, 0xaa, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x92, 0xba, 0x92, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0xff, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x7e, 0x60, 0x7e, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xd8, 0xdf, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xaf, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xdf, 0xd8, 0xdf, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc2, 0xc4, 0xc4, 0xff, 0xc8, 0xc8, 0xd0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc4, 0xc4, 0xff, 0xc8, 0xff, 0xd0, 0xd0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd9, 0xda, 0xda, 0xdf, 0xda, 0xda, 0xdc, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd9, 0xda, 0xdf, 0xda, 0xdf, 0xda, 0xdc, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0c, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x60, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x1e, 0x76, 0xc6, 0x76, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xf0, 0xdc, 0xc6, 0xdc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x1e, 0x76, 0xc6, 0x76, 0x1e, 0x06, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xf0, 0xdc, 0xc6, 0xdc, 0xf0, 0xc0, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xbf, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfd, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0xc6, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xf0, 0xc8, 0xc4, 0xc4, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0b, 0x13, 0x23, 0x43, 0x83, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x92, 0x44, 0x28, 0x92, 0x28, 0x44, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0xc6, 0xaa, 0x92, 0xaa, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0xc4, 0xa8, 0x90, 0xa8, 0xc4, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0x46, 0x2a, 0x12, 0x2a, 0x46, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x28, 0x44, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x28, 0x44, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x3e, 0x60, 0xce, 0xd8, 0xd8, 0xce, 0x60, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xf8, 0x0c, 0xe6, 0x36, 0x36, 0xe6, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x44, 0x92, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x38, 0x54, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x64, 0xce, 0x64, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x4c, 0xe6, 0x4c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x15, 0x2a, 0x54, 0xa8, 0x54, 0x2a, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0x2a, 0x15, 0x2a, 0x54, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0xfe, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0x00}, |
{0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0xfe, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x02, 0x06, 0x1c, 0xf2, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xc0, 0x70, 0x9e, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0a, 0x0e, 0x1c, 0xf0, 0x1c, 0x16, 0xf2, 0x1c, 0x26, 0x22, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x88, 0xc8, 0x70, 0x1e, 0x70, 0xd0, 0x9e, 0x70, 0xe0, 0xa0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0xfe, 0xc8, 0xc8, 0xd0, 0xd0, 0xfe, 0x20, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0xfe, 0x16, 0x16, 0x26, 0x26, 0xfe, 0x40, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x08, 0xfe, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0xfe, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x10, 0x76, 0xdc, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x10, 0x76, 0xdc, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x02, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x02, 0x10, 0x76, 0xdc, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x80, 0x10, 0x76, 0xdc, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x0e, 0x1e, 0x76, 0xd6, 0x76, 0x1e, 0x26, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0xc8, 0xf0, 0xdc, 0xd6, 0xdc, 0xf0, 0xe0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x0e, 0x1e, 0x76, 0xd6, 0x76, 0x1e, 0x26, 0x20, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0xc8, 0xf0, 0xdc, 0xd6, 0xdc, 0xf0, 0xe0, 0x20, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x3d, 0x66, 0xc7, 0xcb, 0xd3, 0xe3, 0x66, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x42, 0xa5, 0x7e, 0x24, 0x24, 0x7e, 0xa5, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x38, 0x54, 0x8a, 0xf6, 0x82, 0x54, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xfe, 0xfe, 0x44, 0x44, 0x28, 0x10, 0x28, 0x44, 0x44, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x00, 0x00}, |
{0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00}, |
{0x00, 0x03, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, |
{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, |
{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x03, 0x00, 0x00}, |
{0x00, 0xc0, 0x60, 0x30, 0x30, 0x18, 0x18, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, |
{0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, |
{0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x18, 0x18, 0x30, 0x30, 0x60, 0xc0, 0x00, 0x00}, |
{0x00, 0x3f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, |
{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, |
{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3f, 0x00, 0x00}, |
{0x00, 0xfc, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, |
{0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, |
{0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xfc, 0x00, 0x00}, |
{0x00, 0x07, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xe0, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x07, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0xe0, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x07, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xe0, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x07, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xe0}, |
{0xe0, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x07}, |
{0x00, 0x00, 0xff, 0xc1, 0xc0, 0x60, 0x60, 0x60, 0x60, 0x30, 0x30, 0x30, 0x30, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x30, 0x30, 0x30, 0x30, 0x60, 0x60, 0x60, 0x60, 0xc0, 0xc1, 0xff, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xff, 0x00, 0xff, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0x78, 0x78, 0x38, 0x38, 0x18, 0x18, 0x00, 0x00}, |
{0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}, |
{0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03}, |
{0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x07, 0x05, 0x05, 0x05, 0x05, 0x25, 0x79, 0xc2, 0x7c, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd8, 0xd8, 0xf8, 0xd8, 0xd8, 0x0f, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xf0, 0x0f, 0x0c, 0x0e, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd8, 0xd8, 0xf8, 0x70, 0x20, 0x0f, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0xc0, 0xe0, 0xc0, 0xc0, 0x0f, 0x0c, 0x0e, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xc0, 0xc0, 0xc0, 0x70, 0x1e, 0x1b, 0x1e, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x98, 0xd8, 0xf8, 0xd8, 0xd8, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xfe, 0xc6, 0xc6, 0x60, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0xfc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xfc, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xfc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0e, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80}, |
{0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01}, |
{0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe}, |
{0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc}, |
{0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8}, |
{0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0}, |
{0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0}, |
{0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}, |
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80}, |
{0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f}, |
{0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44}, |
{0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa}, |
{0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77}, |
{0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, |
{0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0xba, 0xba, 0xba, 0xba, 0xba, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0xfe, 0x82, 0xfe, 0x82, 0xfe, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xaa, 0xfe, 0xaa, 0xfe, 0xaa, 0xfe, 0xaa, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x8a, 0xc6, 0xa2, 0x92, 0x8a, 0xc6, 0xa2, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xa2, 0xc6, 0x8a, 0x92, 0xa2, 0xc6, 0x8a, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xaa, 0xc6, 0xaa, 0x92, 0xaa, 0xc6, 0xaa, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x44, 0x44, 0x44, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x42, 0x84, 0x84, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x80, 0xc0, 0xa0, 0x90, 0x88, 0x84, 0x88, 0x90, 0xa0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x70, 0x78, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x70, 0x48, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x98, 0x86, 0x98, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0x7e, 0x3e, 0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x06, 0x0a, 0x12, 0x22, 0x42, 0x22, 0x12, 0x0a, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x38, 0x78, 0x38, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x38, 0x48, 0x38, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x32, 0xc2, 0x32, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0x44, 0x82, 0x82, 0x44, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0x54, 0xba, 0xba, 0x54, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x99, 0xbd, 0xbd, 0xbd, 0xbd, 0x99, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x28, 0x44, 0x82, 0x82, 0x44, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x14, 0x40, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x02, 0x28, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x99, 0xa5, 0xa5, 0xa5, 0xa5, 0x99, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x72, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0x72, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x4e, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x4e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x81, 0xff, 0xff, 0xff, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x7e, 0xff, 0xff, 0xff, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x4e, 0x8f, 0x8f, 0x8f, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x4e, 0x8f, 0x8f, 0x8f, 0xff, 0xff, 0xff, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x70, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x70, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0xff, 0xff, 0xc3, 0xbd, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0xbd, 0xc3, 0xff, 0xff, 0xff, 0xff}, |
{0xff, 0xff, 0xc3, 0xbd, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0xbd, 0xc3, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x30, 0x40, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x1f, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f, 0xff, 0xff}, |
{0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff}, |
{0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xf8, 0xf8, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80}, |
{0xff, 0xff, 0x7f, 0x7f, 0x3f, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01, 0x01}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xff, 0xfd, 0xf9, 0xf1, 0xf1, 0xe1, 0xc1, 0x81, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x81, 0x83, 0x87, 0x8f, 0x8f, 0x9f, 0xbf, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x92, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x74, 0x74, 0xf2, 0xf2, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x5c, 0x5c, 0x9e, 0x9e, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x92, 0x92, 0x92, 0xf2, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0xf2, 0x92, 0x92, 0x92, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0x9e, 0x92, 0x92, 0x92, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x92, 0x92, 0x92, 0x9e, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x4a, 0x89, 0x89, 0x89, 0xf9, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0xf9, 0x89, 0x89, 0x89, 0x4a, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x9f, 0x91, 0x91, 0x91, 0x52, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x52, 0x91, 0x91, 0x91, 0x9f, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x54, 0x38, 0xfe, 0x38, 0x54, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x30, 0x7c, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x7c, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0xfe, 0x7c, 0x38, 0x6c, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0xee, 0x44, 0x54, 0x6c, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x34, 0x1c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xcc, 0xd8, 0xf0, 0xd8, 0xcd, 0xc7, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x92, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0xa5, 0xa5, 0x42, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x42, 0xa5, 0xa5, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x78, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x36, 0x36, 0x1c, 0x18, 0x30, 0x70, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x86, 0x8a, 0xba, 0x92, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0xee, 0xba, 0xba, 0xee, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x82, 0xc6, 0x6c, 0x7c, 0x38, 0x7c, 0x6c, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x82, 0xaa, 0x82, 0x44, 0x7c, 0x44, 0x38, 0x00, 0x44, 0xc6, 0x38, 0xc6, 0x44, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x44, 0xee, 0xfe, 0x92, 0xba, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x7e, 0x18, 0x18, 0xff, 0x18, 0x1e, 0x78, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x7e, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x10, 0x10, 0x92, 0xfe, 0x92, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x72, 0xe0, 0xc4, 0xdf, 0xce, 0xca, 0xe0, 0x72, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x54, 0x28, 0x54, 0xaa, 0xaa, 0xaa, 0xaa, 0x54, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x5a, 0x99, 0x99, 0x99, 0xbd, 0xff, 0xdb, 0x5a, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x85, 0xb1, 0xf9, 0xff, 0xdf, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0x81, 0x99, 0xa5, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xa5, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xdb, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x54, 0x28, 0xc6, 0x28, 0x54, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0x14, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x14, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x28, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x28, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x06, 0x0e, 0x1a, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x03, 0x03, 0x7b, 0xcf, 0xcf, 0xcf, 0x0f, 0x1b, 0x33, 0xff, 0x03, 0x03, 0x03, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf0, 0x60, 0x6e, 0x73, 0x63, 0x63, 0x66, 0x66, 0x63, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd6, 0x54, 0x54, 0x7c, 0x54, 0x54, 0xd6, 0x38, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0xdb, 0xdb, 0xdb, 0xdb, 0x7e, 0x3c, 0x18, 0x3c, 0x18, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0xf8, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x42, 0xa5, 0xa5, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc3, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00}, |
{0x00, 0x00, 0xc3, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7e, 0xc3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xdb, 0xd8, 0x70, 0x00, 0x00, 0x0e, 0x1b, 0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x33, 0x33, 0x33, 0x33, 0x1b, 0x7b, 0xdb, 0xdb, 0x73, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x94, 0x7c, 0x55, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x06, 0x0b, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x24, 0xe7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x94, 0x7c, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x04, 0x03, 0x00, 0x00}, |
{0x00, 0x00, 0x1f, 0x07, 0x8f, 0xdb, 0x73, 0x70, 0xd8, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x90, 0x50, 0x70, 0x68, 0x48, 0x48, 0x4e, 0x49, 0x09, 0x0e, 0x10, 0x20, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x2a, 0x7e, 0xaa, 0x00, 0x00, 0x2a, 0x7e, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc3, 0x66, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0x66, 0xc3, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x82, 0x82, 0x82, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x81, 0x81, 0x66, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x24, 0x3c, 0xe7, 0xa5, 0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x38, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x3c, 0x3e, 0x32, 0x30, 0x30, 0x30, 0x70, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x7f, 0x6f, 0x63, 0x63, 0x63, 0x63, 0xe3, 0xe7, 0xc7, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x63, 0x63, 0xe7, 0xe7, 0xc6, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0xde, 0xe6, 0xc4, 0xd8, 0xe0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x40, 0x40, 0x44, 0x5c, 0x74, 0x44, 0x44, 0x5c, 0x74, 0x44, 0x04, 0x04, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x04, 0x46, 0x5c, 0x74, 0xc4, 0x46, 0x5c, 0x74, 0xc4, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x3b, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x6e, 0x66, 0x60, 0xfe, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x6e, 0x66, 0x66, 0xfe, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6e, 0xdb, 0xdb, 0xd8, 0xff, 0xdb, 0xdb, 0xdb, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6f, 0xdb, 0xdb, 0xdb, 0xff, 0xdb, 0xdb, 0xdb, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x6c, 0x6f, 0x6c, 0x6c, 0x6c, 0x6c, 0x6d, 0xf6, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x29, 0x5e, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x29, 0x5e, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x89, 0x86, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x0a, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x12, 0x0c, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0a, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0a, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x89, 0x86, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x0a, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x12, 0x0c, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x88, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x88, 0x80, 0x88, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x94, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x80, 0x94, 0x80, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x94, 0x80, 0x88, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x0a, 0x00, 0x04, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x94, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x94, 0x80, 0x94, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x28, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x28, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x28, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x28, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x38, 0x28, 0x70, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x38, 0x28, 0x70, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x14, 0x00, 0x00, 0x04, 0x07, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x00, 0x00, 0x04, 0x07, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x01, 0x02, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x01, 0x02, 0x04, 0x08, 0x48, 0x84, 0x82, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x18, 0x20, 0x10, 0x08, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x18, 0x20, 0x20, 0x10, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x48, 0x84, 0x82, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x46, 0x18, 0x20, 0x10, 0x08, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x46, 0x18, 0x20, 0x20, 0x10, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x48, 0x84, 0x82, 0x7d, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x46, 0x18, 0x20, 0x10, 0x08, 0x08, 0xf0, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x46, 0x18, 0x20, 0x20, 0x10, 0x08, 0xf7, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0xa4, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xa4, 0x09, 0x12, 0x04, 0x08, 0x48, 0x84, 0x82, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xa2, 0x0c, 0x13, 0x0c, 0x10, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xa2, 0x0c, 0x13, 0x0c, 0x10, 0x10, 0x08, 0x04, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x41, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x00, 0x00, 0x01, 0x41, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x40, 0x38, 0x40, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x70, 0x80, 0x70, 0x80, 0x10, 0x68, 0x88, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf0, 0x10, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf7, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0x3d, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0x3d, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x60, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x3f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x80, 0x70, 0x80, 0x08, 0x14, 0x60, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x20, 0x1c, 0x20, 0x00, 0x00, 0x07, 0x18, 0x20, 0x3f, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x29, 0x01, 0x19, 0x21, 0x19, 0xa1, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x2a, 0x02, 0x32, 0x42, 0x32, 0xc6, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0x00, 0xa3, 0x0c, 0x10, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0x00, 0xa3, 0x0c, 0x10, 0x10, 0x08, 0x04, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x18, 0x10, 0x20, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x18, 0x10, 0x20, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x08, 0x08, 0x08, 0x08, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x23, 0x54, 0x33, 0x24, 0x40, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x3c, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x3c, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x14, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x10, 0x00, 0x10}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x10, 0x00, 0x10}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x20, 0x20, 0x20, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x10, 0x10, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x10, 0x10, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x98, 0x60, 0xc2, 0x12, 0x92, 0x9c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x92, 0x9c, 0x60, 0x0e, 0x70, 0x0e, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x60, 0x04, 0x54, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x10, 0x60, 0x04, 0x54, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x54, 0x58, 0x20, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x04, 0x54, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x00, 0x00}, |
{0x0e, 0xf0, 0x02, 0x92, 0x9c, 0x60, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x18, 0x60, 0x02, 0x92, 0x9c, 0x60, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x12, 0x9c, 0x60, 0x0e, 0x70, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x50, 0x28, 0x08, 0x08, 0x08, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x14, 0x28, 0x14, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x08, 0x10, 0x54, 0x38, 0x54, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x10, 0x08, 0x2a, 0x1c, 0x2a, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x2a, 0x14, 0x00, 0x21, 0x69, 0xa9, 0x69, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x08, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x20, 0x10, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x08, 0x08, 0x04, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x7c, 0x28, 0x7c, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x10, 0x2a, 0x24, 0x1a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, 0x38, 0x38, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x20, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x54, 0x30, 0x18, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x08, 0x08, 0x10, 0x10, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x54, 0x58, 0x40, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x18, 0x60, 0x06, 0x18, 0x60, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x12, 0xca, 0x2c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0c, 0x30, 0x00, 0x00}, |
{0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x14, 0x0c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x14, 0x18, 0x60, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x06, 0x18, 0x60, 0x00, 0x00}, |
{0x0a, 0x2a, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x12, 0x92, 0x9c, 0x60, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x20, 0x1e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x3c, 0x40, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x3e, 0x40, 0x08, 0x08, 0x08, 0x08, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x20, 0x1c, 0x20, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x10, 0x0e, 0x10, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x0c, 0x10, 0x0e, 0x10, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x0c, 0x10, 0x0e, 0x10, 0x00, 0x00}, |
{0x00, 0x30, 0x40, 0x38, 0x40, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x40, 0x38, 0x40, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x28, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x50, 0x00, 0x10, 0x10, 0x68, 0x88, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x14, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x14, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x14, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x88, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x80, 0x88, 0x80, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x80, 0x80, 0x80, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x20, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x80, 0x80, 0x80, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x07, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x07, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x14, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x01, 0x15, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x00, 0x00, 0x2a, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x29, 0x31, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x29, 0x31, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x29, 0x31, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x29, 0x31, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0x22, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0x22, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0x22, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0x22, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x1c, 0x22, 0x41, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x1c, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x40, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x00, 0x1e, 0x22, 0x1c, 0x22, 0x41, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x00, 0x0e, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x1e, 0x22, 0x1c, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x49, 0x89, 0x86, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x0c, 0x12, 0x0a, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x0c, 0x12, 0x12, 0x0c, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x09, 0x47, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0a, 0x00, 0x00, 0x06, 0x09, 0x49, 0x87, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0a, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x0c, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x19, 0x21, 0x19, 0x21, 0x01, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x32, 0x42, 0x32, 0x42, 0x02, 0x86, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x18, 0x20, 0x10, 0x08, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x18, 0x20, 0x20, 0x10, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x3c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x3c, 0x4b, 0x4a, 0x44, 0x40, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x32, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x32, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x41, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x68, 0x88, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x40, 0x30, 0x4e, 0x49, 0x39, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x24, 0x28, 0xf3, 0x24, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x24, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x24, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x68, 0x90, 0x02, 0x22, 0x12, 0x0a, 0x04, 0x0c, 0x12, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x68, 0x90, 0x02, 0x32, 0x12, 0x0a, 0x0a, 0x0e, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x80, 0x72, 0xa2, 0x12, 0x0a, 0x04, 0x0c, 0x12, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x40, 0x3a, 0x52, 0x12, 0x0a, 0x0a, 0x0e, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x42, 0x22, 0x12, 0x0a, 0x04, 0x0c, 0x12, 0x3c, 0x00, 0x18, 0x20, 0x1c, 0x20, 0x00}, |
{0x00, 0x00, 0x22, 0x12, 0x12, 0x0a, 0x0a, 0x0e, 0x3d, 0x00, 0x00, 0x18, 0x20, 0x1c, 0x20, 0x00}, |
{0x00, 0x00, 0x42, 0x22, 0x12, 0x0a, 0x04, 0x0c, 0x12, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x22, 0x12, 0x12, 0x0a, 0x0a, 0x0e, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xf1, 0x35, 0x55, 0x8a, 0xe0, 0x06, 0x95, 0xd6, 0xb5, 0x97, 0x00, 0xee, 0x8a, 0xee, 0x28, 0xe8}, |
{0x00, 0x38, 0x7c, 0x7c, 0xc6, 0x92, 0xf2, 0xe6, 0xfe, 0xe6, 0x7c, 0x7c, 0x38, 0x00, 0x00, 0x00}, |
/* Special glyph for unknown character */ |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00} |
/* 0 0x00 '^@' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 1 0x01 '^A' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x81, /* 10000001 */ |
0xa5, /* 10100101 */ |
0x81, /* 10000001 */ |
0x81, /* 10000001 */ |
0xbd, /* 10111101 */ |
0x99, /* 10011001 */ |
0x81, /* 10000001 */ |
0x81, /* 10000001 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 2 0x02 '^B' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xff, /* 11111111 */ |
0xdb, /* 11011011 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xc3, /* 11000011 */ |
0xe7, /* 11100111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 3 0x03 '^C' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 4 0x04 '^D' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 5 0x05 '^E' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0xe7, /* 11100111 */ |
0xe7, /* 11100111 */ |
0xe7, /* 11100111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 6 0x06 '^F' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 7 0x07 '^G' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 8 0x08 '^H' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xe7, /* 11100111 */ |
0xc3, /* 11000011 */ |
0xc3, /* 11000011 */ |
0xe7, /* 11100111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 9 0x09 '^I' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x42, /* 01000010 */ |
0x42, /* 01000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 10 0x0a '^J' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xc3, /* 11000011 */ |
0x99, /* 10011001 */ |
0xbd, /* 10111101 */ |
0xbd, /* 10111101 */ |
0x99, /* 10011001 */ |
0xc3, /* 11000011 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 11 0x0b '^K' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x0e, /* 00001110 */ |
0x1a, /* 00011010 */ |
0x32, /* 00110010 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 12 0x0c '^L' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 13 0x0d '^M' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x33, /* 00110011 */ |
0x3f, /* 00111111 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x70, /* 01110000 */ |
0xf0, /* 11110000 */ |
0xe0, /* 11100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 14 0x0e '^N' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7f, /* 01111111 */ |
0x63, /* 01100011 */ |
0x7f, /* 01111111 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x67, /* 01100111 */ |
0xe7, /* 11100111 */ |
0xe6, /* 11100110 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 15 0x0f '^O' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xdb, /* 11011011 */ |
0x3c, /* 00111100 */ |
0xe7, /* 11100111 */ |
0x3c, /* 00111100 */ |
0xdb, /* 11011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 16 0x10 '^P' */ |
0x00, /* 00000000 */ |
0x80, /* 10000000 */ |
0xc0, /* 11000000 */ |
0xe0, /* 11100000 */ |
0xf0, /* 11110000 */ |
0xf8, /* 11111000 */ |
0xfe, /* 11111110 */ |
0xf8, /* 11111000 */ |
0xf0, /* 11110000 */ |
0xe0, /* 11100000 */ |
0xc0, /* 11000000 */ |
0x80, /* 10000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 17 0x11 '^Q' */ |
0x00, /* 00000000 */ |
0x02, /* 00000010 */ |
0x06, /* 00000110 */ |
0x0e, /* 00001110 */ |
0x1e, /* 00011110 */ |
0x3e, /* 00111110 */ |
0xfe, /* 11111110 */ |
0x3e, /* 00111110 */ |
0x1e, /* 00011110 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x02, /* 00000010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 18 0x12 '^R' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 19 0x13 '^S' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 20 0x14 '^T' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7f, /* 01111111 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0x7b, /* 01111011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 21 0x15 '^U' */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 22 0x16 '^V' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 23 0x17 '^W' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 24 0x18 '^X' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 25 0x19 '^Y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 26 0x1a '^Z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0xfe, /* 11111110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 27 0x1b '^[' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xfe, /* 11111110 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 28 0x1c '^\' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 29 0x1d '^]' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x28, /* 00101000 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x28, /* 00101000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 30 0x1e '^^' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0x7c, /* 01111100 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 31 0x1f '^_' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 32 0x20 ' ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 33 0x21 '!' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 34 0x22 '"' */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x24, /* 00100100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 35 0x23 '#' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 36 0x24 '$' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0x7c, /* 01111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x86, /* 10000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 37 0x25 '%' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc2, /* 11000010 */ |
0xc6, /* 11000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0x86, /* 10000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 38 0x26 '&' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 39 0x27 ''' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 40 0x28 '(' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 41 0x29 ')' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 42 0x2a '*' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0xff, /* 11111111 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 43 0x2b '+' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 44 0x2c ',' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 45 0x2d '-' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 46 0x2e '.' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 47 0x2f '/' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x02, /* 00000010 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x80, /* 10000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 48 0x30 '0' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 49 0x31 '1' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x38, /* 00111000 */ |
0x78, /* 01111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 50 0x32 '2' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 51 0x33 '3' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x3c, /* 00111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 52 0x34 '4' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x1c, /* 00011100 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xfe, /* 11111110 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x1e, /* 00011110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 53 0x35 '5' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfc, /* 11111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 54 0x36 '6' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfc, /* 11111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 55 0x37 '7' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 56 0x38 '8' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 57 0x39 '9' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 58 0x3a ':' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 59 0x3b ';' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 60 0x3c '<' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 61 0x3d '=' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 62 0x3e '>' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 63 0x3f '?' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 64 0x40 '@' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xde, /* 11011110 */ |
0xde, /* 11011110 */ |
0xde, /* 11011110 */ |
0xdc, /* 11011100 */ |
0xc0, /* 11000000 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 65 0x41 'A' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 66 0x42 'B' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xfc, /* 11111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 67 0x43 'C' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc2, /* 11000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 68 0x44 'D' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 69 0x45 'E' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x60, /* 01100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 70 0x46 'F' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 71 0x47 'G' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xde, /* 11011110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x66, /* 01100110 */ |
0x3a, /* 00111010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 72 0x48 'H' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 73 0x49 'I' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 74 0x4a 'J' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 75 0x4b 'K' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe6, /* 11100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x78, /* 01111000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 76 0x4c 'L' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf0, /* 11110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 77 0x4d 'M' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xee, /* 11101110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 78 0x4e 'N' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xe6, /* 11100110 */ |
0xf6, /* 11110110 */ |
0xfe, /* 11111110 */ |
0xde, /* 11011110 */ |
0xce, /* 11001110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 79 0x4f 'O' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 80 0x50 'P' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 81 0x51 'Q' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xde, /* 11011110 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0x0e, /* 00001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 82 0x52 'R' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 83 0x53 'S' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 84 0x54 'T' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x5a, /* 01011010 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 85 0x55 'U' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 86 0x56 'V' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 87 0x57 'W' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xfe, /* 11111110 */ |
0xee, /* 11101110 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 88 0x58 'X' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 89 0x59 'Y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 90 0x5a 'Z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x86, /* 10000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc2, /* 11000010 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 91 0x5b '[' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 92 0x5c '\' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x80, /* 10000000 */ |
0xc0, /* 11000000 */ |
0xe0, /* 11100000 */ |
0x70, /* 01110000 */ |
0x38, /* 00111000 */ |
0x1c, /* 00011100 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x02, /* 00000010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 93 0x5d ']' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 94 0x5e '^' */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 95 0x5f '_' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 96 0x60 '`' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 97 0x61 'a' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 98 0x62 'b' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 99 0x63 'c' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 100 0x64 'd' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 101 0x65 'e' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 102 0x66 'f' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x36, /* 00110110 */ |
0x32, /* 00110010 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 103 0x67 'g' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
/* 104 0x68 'h' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x6c, /* 01101100 */ |
0x76, /* 01110110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 105 0x69 'i' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 106 0x6a 'j' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
/* 107 0x6b 'k' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x78, /* 01111000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 108 0x6c 'l' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 109 0x6d 'm' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xec, /* 11101100 */ |
0xfe, /* 11111110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 110 0x6e 'n' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 111 0x6f 'o' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 112 0x70 'p' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
/* 113 0x71 'q' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x1e, /* 00011110 */ |
0x00, /* 00000000 */ |
/* 114 0x72 'r' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x76, /* 01110110 */ |
0x66, /* 01100110 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 115 0x73 's' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 116 0x74 't' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0xfc, /* 11111100 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x36, /* 00110110 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 117 0x75 'u' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 118 0x76 'v' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 119 0x77 'w' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 120 0x78 'x' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 121 0x79 'y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
/* 122 0x7a 'z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xcc, /* 11001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 123 0x7b '{' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x0e, /* 00001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 124 0x7c '|' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 125 0x7d '}' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x70, /* 01110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x0e, /* 00001110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 126 0x7e '~' */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 127 0x7f '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 128 0x80 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc2, /* 11000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 129 0x81 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 130 0x82 '' */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 131 0x83 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 132 0x84 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 133 0x85 ' ' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 134 0x86 '' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 135 0x87 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 136 0x88 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 137 0x89 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 138 0x8a '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 139 0x8b '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 140 0x8c '' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 141 0x8d '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 142 0x8e '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 143 0x8f '' */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 144 0x90 '' */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 145 0x91 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xec, /* 11101100 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x7e, /* 01111110 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x6e, /* 01101110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 146 0x92 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3e, /* 00111110 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xfe, /* 11111110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xce, /* 11001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 147 0x93 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 148 0x94 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 149 0x95 '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 150 0x96 '' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 151 0x97 '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 152 0x98 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
/* 153 0x99 '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 154 0x9a '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 155 0x9b '' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 156 0x9c '' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x64, /* 01100100 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xe6, /* 11100110 */ |
0xfc, /* 11111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 157 0x9d '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 158 0x9e '' */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xf8, /* 11111000 */ |
0xc4, /* 11000100 */ |
0xcc, /* 11001100 */ |
0xde, /* 11011110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 159 0x9f '' */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x1b, /* 00011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 160 0xa0 ' ' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 161 0xa1 '¡' */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 162 0xa2 '¢' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 163 0xa3 '£' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 164 0xa4 '¤' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 165 0xa5 '¥' */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xe6, /* 11100110 */ |
0xf6, /* 11110110 */ |
0xfe, /* 11111110 */ |
0xde, /* 11011110 */ |
0xce, /* 11001110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 166 0xa6 '¦' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x3e, /* 00111110 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 167 0xa7 '§' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 168 0xa8 '¨' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 169 0xa9 '©' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 170 0xaa 'ª' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 171 0xab '«' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0xe0, /* 11100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xdc, /* 11011100 */ |
0x86, /* 10000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x3e, /* 00111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 172 0xac '¬' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0xe0, /* 11100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x66, /* 01100110 */ |
0xce, /* 11001110 */ |
0x9a, /* 10011010 */ |
0x3f, /* 00111111 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 173 0xad '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 174 0xae '®' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x36, /* 00110110 */ |
0x6c, /* 01101100 */ |
0xd8, /* 11011000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 175 0xaf '¯' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xd8, /* 11011000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x6c, /* 01101100 */ |
0xd8, /* 11011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 176 0xb0 '°' */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
/* 177 0xb1 '±' */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
/* 178 0xb2 '²' */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
/* 179 0xb3 '³' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 180 0xb4 '´' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 181 0xb5 'µ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 182 0xb6 '¶' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 183 0xb7 '·' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 184 0xb8 '¸' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 185 0xb9 '¹' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x06, /* 00000110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 186 0xba 'º' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 187 0xbb '»' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x06, /* 00000110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 188 0xbc '¼' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x06, /* 00000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 189 0xbd '½' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 190 0xbe '¾' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 191 0xbf '¿' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 192 0xc0 'À' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 193 0xc1 'Á' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 194 0xc2 'Â' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 195 0xc3 'Ã' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 196 0xc4 'Ä' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 197 0xc5 'Å' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 198 0xc6 'Æ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 199 0xc7 'Ç' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 200 0xc8 'È' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x30, /* 00110000 */ |
0x3f, /* 00111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 201 0xc9 'É' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x30, /* 00110000 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 202 0xca 'Ê' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf7, /* 11110111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 203 0xcb 'Ë' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xf7, /* 11110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 204 0xcc 'Ì' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x30, /* 00110000 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 205 0xcd 'Í' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 206 0xce 'Î' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf7, /* 11110111 */ |
0x00, /* 00000000 */ |
0xf7, /* 11110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 207 0xcf 'Ï' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 208 0xd0 'Ð' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 209 0xd1 'Ñ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 210 0xd2 'Ò' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 211 0xd3 'Ó' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x3f, /* 00111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 212 0xd4 'Ô' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 213 0xd5 'Õ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 214 0xd6 'Ö' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 215 0xd7 '×' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xff, /* 11111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 216 0xd8 'Ø' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 217 0xd9 'Ù' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 218 0xda 'Ú' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 219 0xdb 'Û' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 220 0xdc 'Ü' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 221 0xdd 'Ý' */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
/* 222 0xde 'Þ' */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
/* 223 0xdf 'ß' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 224 0xe0 'à' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xdc, /* 11011100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 225 0xe1 'á' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xd8, /* 11011000 */ |
0xcc, /* 11001100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 226 0xe2 'â' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 227 0xe3 'ã' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 228 0xe4 'ä' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 229 0xe5 'å' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 230 0xe6 'æ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
/* 231 0xe7 'ç' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 232 0xe8 'è' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 233 0xe9 'é' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 234 0xea 'ê' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xee, /* 11101110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 235 0xeb 'ë' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x3e, /* 00111110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 236 0xec 'ì' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 237 0xed 'í' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x03, /* 00000011 */ |
0x06, /* 00000110 */ |
0x7e, /* 01111110 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xf3, /* 11110011 */ |
0x7e, /* 01111110 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 238 0xee 'î' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 239 0xef 'ï' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 240 0xf0 'ð' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 241 0xf1 'ñ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 242 0xf2 'ò' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 243 0xf3 'ó' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 244 0xf4 'ô' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 245 0xf5 'õ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 246 0xf6 'ö' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 247 0xf7 '÷' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 248 0xf8 'ø' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 249 0xf9 'ù' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 250 0xfa 'ú' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 251 0xfb 'û' */ |
0x00, /* 00000000 */ |
0x0f, /* 00001111 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0xec, /* 11101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x3c, /* 00111100 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 252 0xfc 'ü' */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 253 0xfd 'ý' */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x32, /* 00110010 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 254 0xfe 'þ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 255 0xff 'ÿ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
}; |
/** @} |
/branches/arm/kernel/genarch/src/fb/helenos.xbm |
---|
0,0 → 1,163 |
#define helenos_width 127 |
#define helenos_height 120 |
static unsigned char helenos_bits[] = { |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x80, 0x0f, 0x78, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x80, 0x81, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, |
0x0f, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x06, |
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, |
0x00, 0x00, 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0c, |
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, |
0x00, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, |
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, |
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, |
0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, |
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0xc1, 0x00, 0x00, 0x00, |
0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x80, |
0xc1, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0xfe, 0x01, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, |
0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, |
0x03, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0xff, 0x07, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, |
0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, |
0x0c, 0x02, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0xff, 0x0f, 0x00, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00, |
0x08, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, |
0x18, 0x0c, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, |
0xfc, 0x1f, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x08, 0x03, 0x00, 0x00, |
0x80, 0x1f, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, |
0x18, 0x02, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, |
0x30, 0x18, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, |
0xf8, 0x3f, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, |
0xe0, 0x7f, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, |
0x38, 0x0c, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, |
0xe0, 0x20, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, |
0xf0, 0x7f, 0x00, 0x00, 0xc0, 0x78, 0x00, 0x00, 0x70, 0x08, 0x00, 0x00, |
0xe0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xc0, 0x7c, 0x00, 0x00, |
0x70, 0x18, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0xf0, 0xff, 0x00, 0x00, |
0x80, 0xfd, 0x00, 0x00, 0x60, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, |
0xfc, 0xff, 0x01, 0x00, 0x80, 0xf9, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, |
0xc0, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x00, 0x80, 0xfb, 0x00, 0x00, |
0xc0, 0x7f, 0x00, 0x00, 0xc0, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x03, 0x00, |
0x00, 0xf3, 0x01, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x03, 0xfc, |
0xff, 0xff, 0x03, 0x00, 0x00, 0xf3, 0x01, 0x00, 0xc0, 0x7f, 0x00, 0x00, |
0x80, 0xff, 0x07, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xf6, 0x03, 0x00, |
0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0xe7, 0xff, 0xff, 0xff, 0x07, 0x00, |
0x00, 0xe6, 0x03, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, |
0xff, 0xff, 0x07, 0x00, 0x00, 0xec, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00, |
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xcc, 0x07, 0x00, |
0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0xfe, 0x0f, 0x00, |
0x00, 0xdc, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0xff, 0xff, |
0x1f, 0xfe, 0x0f, 0x00, 0x00, 0xd8, 0x0f, 0x00, 0x00, 0xfe, 0x03, 0x00, |
0x00, 0xfc, 0xff, 0xff, 0x03, 0xfe, 0x1f, 0x00, 0x00, 0x98, 0x0f, 0x00, |
0x00, 0xfe, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfc, 0x1f, 0x00, |
0x00, 0xb0, 0x1f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x1f, |
0x00, 0xfc, 0x3f, 0x00, 0x00, 0x30, 0x1f, 0x00, 0x00, 0xfc, 0x07, 0x00, |
0x00, 0xf8, 0xff, 0x07, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x70, 0x1f, 0x00, |
0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xf8, 0x7f, 0x00, |
0x00, 0x60, 0x3e, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x7f, 0x00, |
0x00, 0xf8, 0x7f, 0x00, 0x00, 0xe0, 0x3e, 0x00, 0x00, 0xf8, 0x0f, 0x00, |
0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x7e, 0x00, |
0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x00, |
0x00, 0xfc, 0x7c, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xe0, 0xff, 0x00, |
0x00, 0xf0, 0xff, 0x00, 0x00, 0xfe, 0xfd, 0x00, 0x00, 0xf0, 0x1f, 0x00, |
0x00, 0xe0, 0xff, 0x01, 0x00, 0xe0, 0xff, 0x00, 0x80, 0xff, 0xf9, 0x00, |
0x00, 0xe0, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, 0xe0, 0xff, 0x00, |
0xc0, 0xff, 0xfb, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x03, |
0x00, 0xc0, 0x7f, 0x00, 0xe0, 0xff, 0xfb, 0x01, 0x00, 0xc0, 0x7f, 0x00, |
0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0x7f, 0x00, 0xf8, 0xff, 0xf7, 0x01, |
0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0x80, 0x3f, 0x00, |
0xfc, 0xff, 0xf7, 0x03, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x07, |
0x00, 0x00, 0x00, 0x00, 0xfe, 0xef, 0xe7, 0x03, 0x00, 0x80, 0xff, 0x00, |
0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x80, 0xff, 0xdf, 0xef, 0x07, |
0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xc0, |
0xff, 0xdf, 0xef, 0x07, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0x0f, |
0x00, 0x00, 0x00, 0xe0, 0xff, 0xcf, 0xcf, 0x07, 0x00, 0x00, 0xff, 0x01, |
0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0xc3, 0xcf, 0x0f, |
0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0xfc, |
0xff, 0xe0, 0xcf, 0x0f, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xfc, 0x1f, |
0x00, 0x00, 0x00, 0xfe, 0xff, 0xf9, 0xc7, 0x0f, 0x00, 0x00, 0xfe, 0x03, |
0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xe7, 0x0f, |
0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xc0, 0xff, |
0xff, 0xff, 0xe7, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x07, |
0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xe3, 0x0f, 0x00, 0x00, 0xfc, 0x0f, |
0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xf1, 0x0f, |
0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, |
0xff, 0xff, 0xf8, 0x0f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0x0f, 0x00, 0x00, 0xf0, 0x1f, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x07, 0xfe, 0x0f, |
0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, |
0xff, 0x81, 0xff, 0x07, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, |
0x00, 0xe0, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0x07, 0x00, 0x00, 0xe0, 0x3f, |
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x07, 0xfc, 0xff, 0x07, |
0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, |
0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, |
0x00, 0xfe, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x7f, |
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x00, |
0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xc0, |
0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, |
0xe0, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x80, 0xdf, |
0x00, 0x3c, 0x00, 0x00, 0xf0, 0xff, 0x03, 0xfe, 0xff, 0xff, 0x0f, 0x00, |
0x00, 0x00, 0x00, 0xcf, 0x00, 0x7e, 0x00, 0x00, 0xfc, 0x7f, 0xc0, 0xff, |
0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x01, 0x7e, 0x00, 0x00, |
0xfe, 0x0f, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, |
0x01, 0x3e, 0x00, 0x00, 0xff, 0x03, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x9e, 0x03, 0x00, 0x00, 0xc0, 0x7f, 0xc0, 0xff, 0xff, |
0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x03, 0x00, 0x00, 0xe0, |
0x0f, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, |
0x03, 0x00, 0x00, 0xf8, 0x01, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x7c, 0x06, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0xff, 0xff, |
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x0e, 0x00, 0xe0, 0x0f, |
0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, |
0x3c, 0x00, 0xfc, 0x01, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0xf8, 0x78, 0x80, 0x3f, 0xe0, 0xff, 0xff, 0xff, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe1, 0xff, 0x07, 0xfc, |
0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, |
0x81, 0xff, 0x80, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0xfe, 0xff, |
0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, |
0x0f, 0x00, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0xc0, 0x3f, 0xc0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, |
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, |
0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x1f, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0xf0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
/branches/arm/kernel/genarch/src/mm/asid.c |
---|
32,7 → 32,7 |
/** |
* @file |
* @brief ASID management. |
* @brief ASID management. |
* |
* Modern processor architectures optimize TLB utilization |
* by using ASIDs (a.k.a. memory contexts on sparc64 and |
65,7 → 65,7 |
#include <adt/list.h> |
#include <debug.h> |
static size_t asids_allocated = 0; |
static count_t asids_allocated = 0; |
/** Allocate free address space identifier. |
* |
120,7 → 120,7 |
* of TLB entries (e.g. TSB on sparc64), the |
* cache must be invalidated as well. |
*/ |
as_invalidate_translation_cache(as, 0, (size_t) -1); |
as_invalidate_translation_cache(as, 0, (count_t) -1); |
/* |
* Get the system rid of the stolen ASID. |
/branches/arm/kernel/genarch/src/mm/page_ht.c |
---|
51,8 → 51,8 |
#include <adt/hash_table.h> |
#include <align.h> |
static size_t hash(unative_t key[]); |
static bool compare(unative_t key[], size_t keys, link_t *item); |
static index_t hash(unative_t key[]); |
static bool compare(unative_t key[], count_t keys, link_t *item); |
static void remove_callback(link_t *item); |
static void ht_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame, |
93,11 → 93,11 |
* |
* @return Index into page hash table. |
*/ |
size_t hash(unative_t key[]) |
index_t hash(unative_t key[]) |
{ |
as_t *as = (as_t *) key[KEY_AS]; |
uintptr_t page = (uintptr_t) key[KEY_PAGE]; |
size_t index; |
index_t index; |
/* |
* Virtual page addresses have roughly the same probability |
124,7 → 124,7 |
* |
* @return true on match, false otherwise. |
*/ |
bool compare(unative_t key[], size_t keys, link_t *item) |
bool compare(unative_t key[], count_t keys, link_t *item) |
{ |
pte_t *t; |
192,8 → 192,6 |
t->k = !(flags & PAGE_USER); |
t->c = (flags & PAGE_CACHEABLE) != 0; |
t->p = !(flags & PAGE_NOT_PRESENT); |
t->a = false; |
t->d = false; |
t->as = as; |
t->page = ALIGN_DOWN(page, PAGE_SIZE); |
/branches/arm/kernel/genarch/src/acpi/madt.c |
---|
62,11 → 62,11 |
struct madt_l_apic *madt_l_apic_entries = NULL; |
struct madt_io_apic *madt_io_apic_entries = NULL; |
size_t madt_l_apic_entry_index = 0; |
size_t madt_io_apic_entry_index = 0; |
size_t madt_l_apic_entry_cnt = 0; |
size_t madt_io_apic_entry_cnt = 0; |
size_t cpu_count = 0; |
index_t madt_l_apic_entry_index = 0; |
index_t madt_io_apic_entry_index = 0; |
count_t madt_l_apic_entry_cnt = 0; |
count_t madt_io_apic_entry_cnt = 0; |
count_t cpu_count = 0; |
struct madt_apic_header * * madt_entries_index = NULL; |
unsigned int madt_entries_index_cnt = 0; |
86,10 → 86,10 |
/* |
* ACPI MADT Implementation of SMP configuration interface. |
*/ |
static size_t madt_cpu_count(void); |
static bool madt_cpu_enabled(size_t i); |
static bool madt_cpu_bootstrap(size_t i); |
static uint8_t madt_cpu_apic_id(size_t i); |
static count_t madt_cpu_count(void); |
static bool madt_cpu_enabled(index_t i); |
static bool madt_cpu_bootstrap(index_t i); |
static uint8_t madt_cpu_apic_id(index_t i); |
static int madt_irq_to_pin(unsigned int irq); |
struct smp_config_operations madt_config_operations = { |
100,12 → 100,12 |
.irq_to_pin = madt_irq_to_pin |
}; |
size_t madt_cpu_count(void) |
count_t madt_cpu_count(void) |
{ |
return madt_l_apic_entry_cnt; |
} |
bool madt_cpu_enabled(size_t i) |
bool madt_cpu_enabled(index_t i) |
{ |
ASSERT(i < madt_l_apic_entry_cnt); |
return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->flags & 0x1; |
112,13 → 112,13 |
} |
bool madt_cpu_bootstrap(size_t i) |
bool madt_cpu_bootstrap(index_t i) |
{ |
ASSERT(i < madt_l_apic_entry_cnt); |
return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->apic_id == l_apic_id(); |
} |
uint8_t madt_cpu_apic_id(size_t i) |
uint8_t madt_cpu_apic_id(index_t i) |
{ |
ASSERT(i < madt_l_apic_entry_cnt); |
return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->apic_id; |
/branches/arm/kernel/genarch/src/acpi/acpi.c |
---|
49,12 → 49,8 |
struct acpi_rsdt *acpi_rsdt = NULL; |
struct acpi_xsdt *acpi_xsdt = NULL; |
struct acpi_signature_map signature_map[] = { |
{ |
(uint8_t *) "APIC", |
(void *) &acpi_madt, |
"Multiple APIC Description Table" |
} |
struct acpi_signature_map signature_map[] = { |
{ (uint8_t *)"APIC", (void *) &acpi_madt, "Multiple APIC Description Table" } |
}; |
static int rsdp_check(uint8_t *rsdp) { |
109,7 → 105,7 |
if (!acpi_sdt_check((uint8_t *) h)) |
goto next; |
*signature_map[j].sdt_ptr = h; |
LOG("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); |
printf("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); |
} |
} |
next: |
130,7 → 126,7 |
if (!acpi_sdt_check((uint8_t *) h)) |
goto next; |
*signature_map[j].sdt_ptr = h; |
LOG("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); |
printf("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); |
} |
} |
next: |
164,16 → 160,13 |
return; |
rsdp_found: |
LOG("%p: ACPI Root System Description Pointer\n", acpi_rsdp); |
printf("%p: ACPI Root System Description Pointer\n", acpi_rsdp); |
acpi_rsdt = (struct acpi_rsdt *) (unative_t) acpi_rsdp->rsdt_address; |
if (acpi_rsdp->revision) |
acpi_xsdt = (struct acpi_xsdt *) ((uintptr_t) acpi_rsdp->xsdt_address); |
if (acpi_rsdp->revision) acpi_xsdt = (struct acpi_xsdt *) ((uintptr_t) acpi_rsdp->xsdt_address); |
if (acpi_rsdt) |
map_sdt((struct acpi_sdt_header *) acpi_rsdt); |
if (acpi_xsdt) |
map_sdt((struct acpi_sdt_header *) acpi_xsdt); |
if (acpi_rsdt) map_sdt((struct acpi_sdt_header *) acpi_rsdt); |
if (acpi_xsdt) map_sdt((struct acpi_sdt_header *) acpi_xsdt); |
if (acpi_rsdt && !acpi_sdt_check((uint8_t *) acpi_rsdt)) { |
printf("RSDT: bad checksum\n"); |
184,10 → 177,8 |
return; |
} |
if (acpi_xsdt) |
configure_via_xsdt(); |
else if (acpi_rsdt) |
configure_via_rsdt(); |
if (acpi_xsdt) configure_via_xsdt(); |
else if (acpi_rsdt) configure_via_rsdt(); |
} |
/branches/arm/kernel/genarch/src/ofw/ebus.c |
---|
38,18 → 38,17 |
#include <genarch/ofw/ofw_tree.h> |
#include <arch/memstr.h> |
#include <arch/trap/interrupt.h> |
#include <string.h> |
#include <func.h> |
#include <panic.h> |
#include <debug.h> |
#include <macros.h> |
/** Apply EBUS ranges to EBUS register. */ |
bool |
ofw_ebus_apply_ranges(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uintptr_t *pa) |
bool ofw_ebus_apply_ranges(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uintptr_t *pa) |
{ |
ofw_tree_property_t *prop; |
ofw_ebus_range_t *range; |
size_t ranges; |
count_t ranges; |
prop = ofw_tree_getprop(node, "ranges"); |
if (!prop) |
63,13 → 62,11 |
for (i = 0; i < ranges; i++) { |
if (reg->space != range[i].child_space) |
continue; |
if (overlaps(reg->addr, reg->size, range[i].child_base, |
range[i].size)) { |
if (overlaps(reg->addr, reg->size, range[i].child_base, range[i].size)) { |
ofw_pci_reg_t pci_reg; |
pci_reg.space = range[i].parent_space; |
pci_reg.addr = range[i].parent_base + |
(reg->addr - range[i].child_base); |
pci_reg.addr = range[i].parent_base + (reg->addr - range[i].child_base); |
pci_reg.size = reg->size; |
return ofw_pci_apply_ranges(node->parent, &pci_reg, pa); |
79,9 → 76,7 |
return false; |
} |
bool |
ofw_ebus_map_interrupt(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, |
uint32_t interrupt, int *inr, cir_t *cir, void **cir_arg) |
bool ofw_ebus_map_interrupt(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *inr) |
{ |
ofw_tree_property_t *prop; |
ofw_tree_node_t *controller; |
91,7 → 86,7 |
return false; |
ofw_ebus_intr_map_t *intr_map = prop->value; |
size_t count = prop->size / sizeof(ofw_ebus_intr_map_t); |
count_t count = prop->size / sizeof(ofw_ebus_intr_map_t); |
ASSERT(count); |
109,8 → 104,8 |
unsigned int i; |
for (i = 0; i < count; i++) { |
if ((intr_map[i].space == space) && |
(intr_map[i].addr == addr) && (intr_map[i].intr == intr)) |
if ((intr_map[i].space == space) && (intr_map[i].addr == addr) |
&& (intr_map[i].intr == intr)) |
goto found; |
} |
return false; |
118,16 → 113,14 |
found: |
/* |
* We found the device that functions as an interrupt controller |
* for the interrupt. We also found partial mapping from interrupt to |
* INO. |
* for the interrupt. We also found partial mapping from interrupt to INO. |
*/ |
controller = ofw_tree_find_node_by_handle(ofw_tree_lookup("/"), |
intr_map[i].controller_handle); |
controller = ofw_tree_find_node_by_handle(ofw_tree_lookup("/"), intr_map[i].controller_handle); |
if (!controller) |
return false; |
if (str_cmp(ofw_tree_node_name(controller), "pci") != 0) { |
if (strcmp(ofw_tree_node_name(controller), "pci") != 0) { |
/* |
* This is not a PCI node. |
*/ |
137,8 → 130,7 |
/* |
* Let the PCI do the next step in mapping the interrupt. |
*/ |
if (!ofw_pci_map_interrupt(controller, NULL, intr_map[i].controller_ino, |
inr, cir, cir_arg)) |
if (!ofw_pci_map_interrupt(controller, NULL, intr_map[i].controller_ino, inr)) |
return false; |
return true; |
/branches/arm/kernel/genarch/src/ofw/fhc.c |
---|
38,7 → 38,7 |
#include <genarch/ofw/ofw_tree.h> |
#include <arch/drivers/fhc.h> |
#include <arch/memstr.h> |
#include <string.h> |
#include <func.h> |
#include <panic.h> |
#include <macros.h> |
46,7 → 46,7 |
{ |
ofw_tree_property_t *prop; |
ofw_fhc_range_t *range; |
size_t ranges; |
count_t ranges; |
prop = ofw_tree_getprop(node, "ranges"); |
if (!prop) |
66,8 → 66,8 |
*pa = addr; |
return true; |
} |
if (str_cmp(ofw_tree_node_name(node->parent), "central") != 0) |
panic("Unexpected parent node: %s.", ofw_tree_node_name(node->parent)); |
if (strcmp(ofw_tree_node_name(node->parent), "central") != 0) |
panic("Unexpected parent node: %s.\n", ofw_tree_node_name(node->parent)); |
ofw_central_reg_t central_reg; |
84,11 → 84,11 |
bool ofw_central_apply_ranges(ofw_tree_node_t *node, ofw_central_reg_t *reg, uintptr_t *pa) |
{ |
if (node->parent->parent) |
panic("Unexpected parent node: %s.", ofw_tree_node_name(node->parent)); |
panic("Unexpected parent node: %s.\n", ofw_tree_node_name(node->parent)); |
ofw_tree_property_t *prop; |
ofw_central_range_t *range; |
size_t ranges; |
count_t ranges; |
prop = ofw_tree_getprop(node, "ranges"); |
if (!prop) |
109,9 → 109,7 |
return false; |
} |
bool |
ofw_fhc_map_interrupt(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, |
uint32_t interrupt, int *inr, cir_t *cir, void **cir_arg) |
bool ofw_fhc_map_interrupt(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uint32_t interrupt, int *inr) |
{ |
fhc_t *fhc = NULL; |
if (!node->device) { |
128,8 → 126,6 |
fhc_enable_interrupt(fhc, interrupt); |
*inr = interrupt; |
*cir = fhc_clear_interrupt; |
*cir_arg = fhc; |
return true; |
} |
/branches/arm/kernel/genarch/src/ofw/ofw_tree.c |
---|
38,7 → 38,7 |
#include <genarch/ofw/ofw_tree.h> |
#include <arch/memstr.h> |
#include <mm/slab.h> |
#include <string.h> |
#include <func.h> |
#include <print.h> |
#include <panic.h> |
54,19 → 54,17 |
/** Get OpenFirmware node property. |
* |
* @param node Node in which to lookup the property. |
* @param name Name of the property. |
* @param node Node in which to lookup the property. |
* @param name Name of the property. |
* |
* @return Pointer to the property structure or NULL if no such |
* property. |
* @return Pointer to the property structure or NULL if no such property. |
*/ |
ofw_tree_property_t * |
ofw_tree_getprop(const ofw_tree_node_t *node, const char *name) |
ofw_tree_property_t *ofw_tree_getprop(const ofw_tree_node_t *node, const char *name) |
{ |
unsigned int i; |
for (i = 0; i < node->properties; i++) { |
if (str_cmp(node->property[i].name, name) == 0) |
if (strcmp(node->property[i].name, name) == 0) |
return &node->property[i]; |
} |
75,9 → 73,9 |
/** Return value of the 'name' property. |
* |
* @param node Node of interest. |
* @param node Node of interest. |
* |
* @return Value of the 'name' property belonging to the node. |
* @return Value of the 'name' property belonging to the node. |
*/ |
const char *ofw_tree_node_name(const ofw_tree_node_t *node) |
{ |
85,10 → 83,10 |
prop = ofw_tree_getprop(node, "name"); |
if (!prop) |
panic("Node without name property."); |
panic("Node without name property.\n"); |
if (prop->size < 2) |
panic("Invalid name property."); |
panic("Invalid name property.\n"); |
return prop->value; |
} |
95,11 → 93,10 |
/** Lookup child of given name. |
* |
* @param node Node whose child is being looked up. |
* @param name Name of the child being looked up. |
* @param node Node whose child is being looked up. |
* @param name Name of the child being looked up. |
* |
* @return NULL if there is no such child or pointer to the |
* matching child node. |
* @return NULL if there is no such child or pointer to the matching child node. |
*/ |
ofw_tree_node_t *ofw_tree_find_child(ofw_tree_node_t *node, const char *name) |
{ |
109,7 → 106,7 |
* Try to find the disambigued name. |
*/ |
for (cur = node->child; cur; cur = cur->peer) { |
if (str_cmp(cur->da_name, name) == 0) |
if (strcmp(cur->da_name, name) == 0) |
return cur; |
} |
121,7 → 118,7 |
* are not always fully-qualified. |
*/ |
for (cur = node->child; cur; cur = cur->peer) { |
if (str_cmp(ofw_tree_node_name(cur), name) == 0) |
if (strcmp(ofw_tree_node_name(cur), name) == 0) |
return cur; |
} |
130,14 → 127,12 |
/** Lookup first child of given device type. |
* |
* @param node Node whose child is being looked up. |
* @param name Device type of the child being looked up. |
* @param node Node whose child is being looked up. |
* @param name Device type of the child being looked up. |
* |
* @return NULL if there is no such child or pointer to the |
* matching child node. |
* @return NULL if there is no such child or pointer to the matching child node. |
*/ |
ofw_tree_node_t * |
ofw_tree_find_child_by_device_type(ofw_tree_node_t *node, const char *name) |
ofw_tree_node_t *ofw_tree_find_child_by_device_type(ofw_tree_node_t *node, const char *name) |
{ |
ofw_tree_node_t *cur; |
ofw_tree_property_t *prop; |
146,7 → 141,7 |
prop = ofw_tree_getprop(cur, "device_type"); |
if (!prop || !prop->value) |
continue; |
if (str_cmp(prop->value, name) == 0) |
if (strcmp(prop->value, name) == 0) |
return cur; |
} |
158,14 → 153,12 |
* Child nodes are looked up recursively contrary to peer nodes that |
* are looked up iteratively to avoid stack overflow. |
* |
* @param root Root of the searched subtree. |
* @param handle OpenFirmware handle. |
* @param root Root of the searched subtree. |
* @param handle OpenFirmware handle. |
* |
* @return NULL if there is no such node or pointer to the matching |
* node. |
* @return NULL if there is no such node or pointer to the matching node. |
*/ |
ofw_tree_node_t * |
ofw_tree_find_node_by_handle(ofw_tree_node_t *root, uint32_t handle) |
ofw_tree_node_t *ofw_tree_find_node_by_handle(ofw_tree_node_t *root, uint32_t handle) |
{ |
ofw_tree_node_t *cur; |
187,14 → 180,12 |
/** Lookup first peer of given device type. |
* |
* @param node Node whose peer is being looked up. |
* @param name Device type of the child being looked up. |
* @param node Node whose peer is being looked up. |
* @param name Device type of the child being looked up. |
* |
* @return NULL if there is no such child or pointer to the |
* matching child node. |
* @return NULL if there is no such child or pointer to the matching child node. |
*/ |
ofw_tree_node_t * |
ofw_tree_find_peer_by_device_type(ofw_tree_node_t *node, const char *name) |
ofw_tree_node_t *ofw_tree_find_peer_by_device_type(ofw_tree_node_t *node, const char *name) |
{ |
ofw_tree_node_t *cur; |
ofw_tree_property_t *prop; |
203,7 → 194,7 |
prop = ofw_tree_getprop(cur, "device_type"); |
if (!prop || !prop->value) |
continue; |
if (str_cmp(prop->value, name) == 0) |
if (strcmp(prop->value, name) == 0) |
return cur; |
} |
211,57 → 202,29 |
} |
/** Lookup first peer of given name. |
* |
* @param node Node whose peer is being looked up. |
* @param name Name of the child being looked up. |
* |
* @return NULL if there is no such peer or pointer to the matching |
* peer node. |
*/ |
ofw_tree_node_t * |
ofw_tree_find_peer_by_name(ofw_tree_node_t *node, const char *name) |
{ |
ofw_tree_node_t *cur; |
ofw_tree_property_t *prop; |
for (cur = node->peer; cur; cur = cur->peer) { |
prop = ofw_tree_getprop(cur, "name"); |
if (!prop || !prop->value) |
continue; |
if (str_cmp(prop->value, name) == 0) |
return cur; |
} |
return NULL; |
} |
/** Lookup OpenFirmware node by its path. |
* |
* @param path Path to the node. |
* @param path Path to the node. |
* |
* @return NULL if there is no such node or pointer to the leaf |
* node. |
* @return NULL if there is no such node or pointer to the leaf node. |
*/ |
ofw_tree_node_t *ofw_tree_lookup(const char *path) |
{ |
char buf[NAME_BUF_LEN + 1]; |
char buf[NAME_BUF_LEN+1]; |
ofw_tree_node_t *node = ofw_root; |
size_t i; |
size_t j; |
index_t i, j; |
if (path[0] != '/') |
return NULL; |
for (i = 1; (i < str_size(path)) && (node); i = j + 1) { |
for (j = i; (j < str_size(path)) && (path[j] != '/'); j++); |
/* Skip extra slashes */ |
if (i == j) |
for (i = 1; i < strlen(path) && node; i = j + 1) { |
for (j = i; j < strlen(path) && path[j] != '/'; j++) |
; |
if (i == j) /* skip extra slashes */ |
continue; |
memcpy(buf, &path[i], j - i); |
buf[j - i] = 0; |
buf[j - i] = '\0'; |
node = ofw_tree_find_child(node, buf); |
} |
273,8 → 236,8 |
* Child nodes are processed recursively and peer nodes are processed |
* iteratively in order to avoid stack overflow. |
* |
* @param node Root of the subtree. |
* @param path Current path, NULL for the very root of the entire tree. |
* @param node Root of the subtree. |
* @param path Current path, NULL for the very root of the entire tree. |
*/ |
static void ofw_tree_node_print(const ofw_tree_node_t *node, const char *path) |
{ |
/branches/arm/kernel/genarch/src/ofw/pci.c |
---|
39,7 → 39,7 |
#include <arch/drivers/pci.h> |
#include <arch/trap/interrupt.h> |
#include <arch/memstr.h> |
#include <string.h> |
#include <func.h> |
#include <panic.h> |
#include <macros.h> |
49,16 → 49,15 |
#define PCI_IGN 0x1f |
bool |
ofw_pci_apply_ranges(ofw_tree_node_t *node, ofw_pci_reg_t *reg, uintptr_t *pa) |
bool ofw_pci_apply_ranges(ofw_tree_node_t *node, ofw_pci_reg_t *reg, uintptr_t *pa) |
{ |
ofw_tree_property_t *prop; |
ofw_pci_range_t *range; |
size_t ranges; |
count_t ranges; |
prop = ofw_tree_getprop(node, "ranges"); |
if (!prop) { |
if (str_cmp(ofw_tree_node_name(node->parent), "pci") == 0) |
if (strcmp(ofw_tree_node_name(node->parent), "pci") == 0) |
return ofw_pci_apply_ranges(node->parent, reg, pa); |
return false; |
} |
69,13 → 68,10 |
unsigned int i; |
for (i = 0; i < ranges; i++) { |
if ((reg->space & PCI_SPACE_MASK) != |
(range[i].space & PCI_SPACE_MASK)) |
if ((reg->space & PCI_SPACE_MASK) != (range[i].space & PCI_SPACE_MASK)) |
continue; |
if (overlaps(reg->addr, reg->size, range[i].child_base, |
range[i].size)) { |
*pa = range[i].parent_base + |
(reg->addr - range[i].child_base); |
if (overlaps(reg->addr, reg->size, range[i].child_base, range[i].size)) { |
*pa = range[i].parent_base + (reg->addr - range[i].child_base); |
return true; |
} |
} |
83,9 → 79,7 |
return false; |
} |
bool |
ofw_pci_reg_absolutize(ofw_tree_node_t *node, ofw_pci_reg_t *reg, |
ofw_pci_reg_t *out) |
bool ofw_pci_reg_absolutize(ofw_tree_node_t *node, ofw_pci_reg_t *reg, ofw_pci_reg_t *out) |
{ |
if (reg->space & PCI_ABS_MASK) { |
/* already absolute */ |
97,11 → 91,11 |
ofw_tree_property_t *prop; |
ofw_pci_reg_t *assigned_address; |
size_t assigned_addresses; |
count_t assigned_addresses; |
prop = ofw_tree_getprop(node, "assigned-addresses"); |
if (!prop) |
panic("Cannot find 'assigned-addresses' property."); |
panic("Can't find \"assigned-addresses\" property.\n"); |
assigned_addresses = prop->size / sizeof(ofw_pci_reg_t); |
assigned_address = prop->value; |
109,8 → 103,7 |
unsigned int i; |
for (i = 0; i < assigned_addresses; i++) { |
if ((assigned_address[i].space & PCI_REG_MASK) == |
(reg->space & PCI_REG_MASK)) { |
if ((assigned_address[i].space & PCI_REG_MASK) == (reg->space & PCI_REG_MASK)) { |
out->space = assigned_address[i].space; |
out->addr = reg->addr + assigned_address[i].addr; |
out->size = reg->size; |
126,9 → 119,7 |
* So far, we only know how to map interrupts of non-PCI devices connected |
* to a PCI bridge. |
*/ |
bool |
ofw_pci_map_interrupt(ofw_tree_node_t *node, ofw_pci_reg_t *reg, int ino, |
int *inr, cir_t *cir, void **cir_arg) |
bool ofw_pci_map_interrupt(ofw_tree_node_t *node, ofw_pci_reg_t *reg, int ino, int *inr) |
{ |
pci_t *pci = node->device; |
if (!pci) { |
141,8 → 132,6 |
pci_enable_interrupt(pci, ino); |
*inr = (PCI_IGN << IGN_SHIFT) | ino; |
*cir = pci_clear_interrupt; |
*cir_arg = pci; |
return true; |
} |
/branches/arm/kernel/genarch/src/ofw/sbus.c |
---|
43,7 → 43,7 |
{ |
ofw_tree_property_t *prop; |
ofw_sbus_range_t *range; |
size_t ranges; |
count_t ranges; |
/* |
* The SBUS support is very rudimentary in that we simply assume |
/branches/arm/kernel/genarch/src/kbd/key.c |
---|
0,0 → 1,252 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Key processing. |
*/ |
#include <genarch/kbd/key.h> |
#include <genarch/kbd/scanc.h> |
#ifdef CONFIG_I8042 |
#include <genarch/kbd/scanc_pc.h> |
#endif |
#if (defined(CONFIG_Z8530) || defined(CONFIG_NS16550)) |
#include <genarch/kbd/scanc_sun.h> |
#endif |
#include <synch/spinlock.h> |
#include <console/chardev.h> |
#include <macros.h> |
#define PRESSED_SHIFT (1<<0) |
#define PRESSED_CAPSLOCK (1<<1) |
#define LOCKED_CAPSLOCK (1<<0) |
#define ACTIVE_READ_BUFF_SIZE 16 /* Must be power of 2 */ |
chardev_t kbrd; |
static uint8_t active_read_buff[ACTIVE_READ_BUFF_SIZE]; |
SPINLOCK_INITIALIZE(keylock); /**< keylock protects keyflags and lockflags. */ |
static volatile int keyflags; /**< Tracking of multiple keypresses. */ |
static volatile int lockflags; /**< Tracking of multiple keys lockings. */ |
/** Process release of key. |
* |
* @param sc Scancode of the key being released. |
*/ |
void key_released(uint8_t sc) |
{ |
spinlock_lock(&keylock); |
switch (sc) { |
case SC_LSHIFT: |
case SC_RSHIFT: |
keyflags &= ~PRESSED_SHIFT; |
break; |
case SC_CAPSLOCK: |
keyflags &= ~PRESSED_CAPSLOCK; |
if (lockflags & LOCKED_CAPSLOCK) |
lockflags &= ~LOCKED_CAPSLOCK; |
else |
lockflags |= LOCKED_CAPSLOCK; |
break; |
default: |
break; |
} |
spinlock_unlock(&keylock); |
} |
/** Process keypress. |
* |
* @param sc Scancode of the key being pressed. |
*/ |
void key_pressed(uint8_t sc) |
{ |
char *map = sc_primary_map; |
char ascii = sc_primary_map[sc]; |
bool shift, capslock; |
bool letter = false; |
spinlock_lock(&keylock); |
switch (sc) { |
case SC_LSHIFT: |
case SC_RSHIFT: |
keyflags |= PRESSED_SHIFT; |
break; |
case SC_CAPSLOCK: |
keyflags |= PRESSED_CAPSLOCK; |
break; |
case SC_SPEC_ESCAPE: |
break; |
case SC_LEFTARR: |
chardev_push_character(&kbrd, 0x1b); |
chardev_push_character(&kbrd, 0x5b); |
chardev_push_character(&kbrd, 0x44); |
break; |
case SC_RIGHTARR: |
chardev_push_character(&kbrd, 0x1b); |
chardev_push_character(&kbrd, 0x5b); |
chardev_push_character(&kbrd, 0x43); |
break; |
case SC_UPARR: |
chardev_push_character(&kbrd, 0x1b); |
chardev_push_character(&kbrd, 0x5b); |
chardev_push_character(&kbrd, 0x41); |
break; |
case SC_DOWNARR: |
chardev_push_character(&kbrd, 0x1b); |
chardev_push_character(&kbrd, 0x5b); |
chardev_push_character(&kbrd, 0x42); |
break; |
case SC_HOME: |
chardev_push_character(&kbrd, 0x1b); |
chardev_push_character(&kbrd, 0x4f); |
chardev_push_character(&kbrd, 0x48); |
break; |
case SC_END: |
chardev_push_character(&kbrd, 0x1b); |
chardev_push_character(&kbrd, 0x4f); |
chardev_push_character(&kbrd, 0x46); |
break; |
case SC_DELETE: |
chardev_push_character(&kbrd, 0x1b); |
chardev_push_character(&kbrd, 0x5b); |
chardev_push_character(&kbrd, 0x33); |
chardev_push_character(&kbrd, 0x7e); |
break; |
default: |
letter = islower(ascii); |
capslock = (keyflags & PRESSED_CAPSLOCK) || |
(lockflags & LOCKED_CAPSLOCK); |
shift = keyflags & PRESSED_SHIFT; |
if (letter && capslock) |
shift = !shift; |
if (shift) |
map = sc_secondary_map; |
chardev_push_character(&kbrd, map[sc]); |
break; |
} |
spinlock_unlock(&keylock); |
} |
uint8_t active_read_buff_read(void) |
{ |
static int i=0; |
i &= (ACTIVE_READ_BUFF_SIZE-1); |
if(!active_read_buff[i]) { |
return 0; |
} |
return active_read_buff[i++]; |
} |
void active_read_buff_write(uint8_t ch) |
{ |
static int i=0; |
active_read_buff[i] = ch; |
i++; |
i &= (ACTIVE_READ_BUFF_SIZE-1); |
active_read_buff[i]=0; |
} |
void active_read_key_pressed(uint8_t sc) |
{ |
char *map = sc_primary_map; |
char ascii = sc_primary_map[sc]; |
bool shift, capslock; |
bool letter = false; |
/*spinlock_lock(&keylock);*/ |
switch (sc) { |
case SC_LSHIFT: |
case SC_RSHIFT: |
keyflags |= PRESSED_SHIFT; |
break; |
case SC_CAPSLOCK: |
keyflags |= PRESSED_CAPSLOCK; |
break; |
case SC_SPEC_ESCAPE: |
break; |
case SC_LEFTARR: |
active_read_buff_write(0x1b); |
active_read_buff_write(0x5b); |
active_read_buff_write(0x44); |
break; |
case SC_RIGHTARR: |
active_read_buff_write(0x1b); |
active_read_buff_write(0x5b); |
active_read_buff_write(0x43); |
break; |
case SC_UPARR: |
active_read_buff_write(0x1b); |
active_read_buff_write(0x5b); |
active_read_buff_write(0x41); |
break; |
case SC_DOWNARR: |
active_read_buff_write(0x1b); |
active_read_buff_write(0x5b); |
active_read_buff_write(0x42); |
break; |
case SC_HOME: |
active_read_buff_write(0x1b); |
active_read_buff_write(0x4f); |
active_read_buff_write(0x48); |
break; |
case SC_END: |
active_read_buff_write(0x1b); |
active_read_buff_write(0x4f); |
active_read_buff_write(0x46); |
break; |
case SC_DELETE: |
active_read_buff_write(0x1b); |
active_read_buff_write(0x5b); |
active_read_buff_write(0x33); |
active_read_buff_write(0x7e); |
break; |
default: |
letter = islower(ascii); |
capslock = (keyflags & PRESSED_CAPSLOCK) || |
(lockflags & LOCKED_CAPSLOCK); |
shift = keyflags & PRESSED_SHIFT; |
if (letter && capslock) |
shift = !shift; |
if (shift) |
map = sc_secondary_map; |
active_read_buff_write(map[sc]); |
break; |
} |
/*spinlock_unlock(&keylock);*/ |
} |
/** @} |
*/ |
/branches/arm/kernel/genarch/src/kbd/i8042.c |
---|
0,0 → 1,240 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief i8042 processor driver. |
* |
* It takes care of low-level keyboard functions. |
*/ |
#include <genarch/kbd/i8042.h> |
#include <genarch/kbd/key.h> |
#include <genarch/kbd/scanc.h> |
#include <genarch/kbd/scanc_pc.h> |
#include <arch/drivers/i8042.h> |
#include <cpu.h> |
#include <arch/asm.h> |
#include <arch.h> |
#include <console/chardev.h> |
#include <console/console.h> |
#include <interrupt.h> |
#include <sysinfo/sysinfo.h> |
#include <ipc/irq.h> |
/* Keyboard commands. */ |
#define KBD_ENABLE 0xf4 |
#define KBD_DISABLE 0xf5 |
#define KBD_ACK 0xfa |
/* |
* 60 Write 8042 Command Byte: next data byte written to port 60h is |
* placed in 8042 command register. Format: |
* |
* |7|6|5|4|3|2|1|0|8042 Command Byte |
* | | | | | | | `---- 1=enable output register full interrupt |
* | | | | | | `----- should be 0 |
* | | | | | `------ 1=set status register system, 0=clear |
* | | | | `------- 1=override keyboard inhibit, 0=allow inhibit |
* | | | `-------- disable keyboard I/O by driving clock line low |
* | | `--------- disable auxiliary device, drives clock line low |
* | `---------- IBM scancode translation 0=AT, 1=PC/XT |
* `----------- reserved, should be 0 |
*/ |
#define i8042_SET_COMMAND 0x60 |
#define i8042_COMMAND 0x69 |
#define i8042_BUFFER_FULL_MASK 0x01 |
#define i8042_WAIT_MASK 0x02 |
#define i8042_MOUSE_DATA 0x20 |
static void i8042_suspend(chardev_t *); |
static void i8042_resume(chardev_t *); |
static chardev_operations_t ops = { |
.suspend = i8042_suspend, |
.resume = i8042_resume, |
.read = i8042_key_read |
}; |
/** Structure for i8042's IRQ. */ |
static irq_t i8042_kbd_irq; |
static irq_t i8042_mouse_irq; |
void i8042_grab(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&i8042_kbd_irq.lock); |
i8042_kbd_irq.notif_cfg.notify = false; |
spinlock_unlock(&i8042_kbd_irq.lock); |
spinlock_lock(&i8042_mouse_irq.lock); |
i8042_mouse_irq.notif_cfg.notify = false; |
spinlock_unlock(&i8042_mouse_irq.lock); |
interrupts_restore(ipl); |
} |
void i8042_release(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&i8042_kbd_irq.lock); |
if (i8042_kbd_irq.notif_cfg.answerbox) |
i8042_kbd_irq.notif_cfg.notify = true; |
spinlock_unlock(&i8042_kbd_irq.lock); |
spinlock_lock(&i8042_mouse_irq.lock); |
if (i8042_mouse_irq.notif_cfg.answerbox) |
i8042_mouse_irq.notif_cfg.notify = true; |
spinlock_unlock(&i8042_mouse_irq.lock); |
interrupts_restore(ipl); |
} |
static irq_ownership_t i8042_claim(void) |
{ |
return IRQ_ACCEPT; |
} |
static void i8042_irq_handler(irq_t *irq, void *arg, ...) |
{ |
if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) |
ipc_irq_send_notif(irq); |
else { |
uint8_t data; |
uint8_t status; |
while (((status = i8042_status_read()) & i8042_BUFFER_FULL_MASK)) { |
data = i8042_data_read(); |
if ((status & i8042_MOUSE_DATA)) |
continue; |
if (data & KEY_RELEASE) |
key_released(data ^ KEY_RELEASE); |
else |
key_pressed(data); |
} |
} |
} |
/** Initialize i8042. */ |
void i8042_init(devno_t kbd_devno, inr_t kbd_inr, devno_t mouse_devno, inr_t mouse_inr) |
{ |
chardev_initialize("i8042_kbd", &kbrd, &ops); |
stdin = &kbrd; |
irq_initialize(&i8042_kbd_irq); |
i8042_kbd_irq.devno = kbd_devno; |
i8042_kbd_irq.inr = kbd_inr; |
i8042_kbd_irq.claim = i8042_claim; |
i8042_kbd_irq.handler = i8042_irq_handler; |
irq_register(&i8042_kbd_irq); |
irq_initialize(&i8042_mouse_irq); |
i8042_mouse_irq.devno = mouse_devno; |
i8042_mouse_irq.inr = mouse_inr; |
i8042_mouse_irq.claim = i8042_claim; |
i8042_mouse_irq.handler = i8042_irq_handler; |
irq_register(&i8042_mouse_irq); |
#ifndef ia64 |
trap_virtual_enable_irqs(1 << kbd_inr); |
trap_virtual_enable_irqs(1 << mouse_inr); |
#endif |
/* |
* Clear input buffer. |
* Number of iterations is limited to prevent infinite looping. |
*/ |
int i; |
for (i = 0; (i8042_status_read() & i8042_BUFFER_FULL_MASK) && i < 100; i++) { |
i8042_data_read(); |
} |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.devno", NULL, kbd_devno); |
sysinfo_set_item_val("kbd.inr", NULL, kbd_inr); |
sysinfo_set_item_val("mouse", NULL, true); |
sysinfo_set_item_val("mouse.devno", NULL, mouse_devno); |
sysinfo_set_item_val("mouse.inr", NULL, mouse_inr); |
i8042_grab(); |
} |
/* Called from getc(). */ |
void i8042_resume(chardev_t *d) |
{ |
} |
/* Called from getc(). */ |
void i8042_suspend(chardev_t *d) |
{ |
} |
char i8042_key_read(chardev_t *d) |
{ |
char ch; |
while(!(ch = active_read_buff_read())) { |
uint8_t x; |
while (!(i8042_status_read() & i8042_BUFFER_FULL_MASK)) |
; |
x = i8042_data_read(); |
if (x & KEY_RELEASE) |
key_released(x ^ KEY_RELEASE); |
else |
active_read_key_pressed(x); |
} |
return ch; |
} |
/** Poll for key press and release events. |
* |
* This function can be used to implement keyboard polling. |
*/ |
void i8042_poll(void) |
{ |
uint8_t x; |
while (((x = i8042_status_read() & i8042_BUFFER_FULL_MASK))) { |
x = i8042_data_read(); |
if (x & KEY_RELEASE) |
key_released(x ^ KEY_RELEASE); |
else |
key_pressed(x); |
} |
} |
/** @} |
*/ |
/branches/arm/kernel/genarch/src/kbd/ns16550.c |
---|
0,0 → 1,224 |
/* |
* Copyright (c) 2001-2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief NS 16550 serial port / keyboard driver. |
*/ |
#include <genarch/kbd/ns16550.h> |
#include <genarch/kbd/key.h> |
#include <genarch/kbd/scanc.h> |
#include <genarch/kbd/scanc_sun.h> |
#include <arch/drivers/kbd.h> |
#include <arch/drivers/ns16550.h> |
#include <ddi/irq.h> |
#include <ipc/irq.h> |
#include <cpu.h> |
#include <arch/asm.h> |
#include <arch.h> |
#include <console/chardev.h> |
#include <console/console.h> |
#include <interrupt.h> |
#include <arch/interrupt.h> |
#include <sysinfo/sysinfo.h> |
#include <synch/spinlock.h> |
#define LSR_DATA_READY 0x01 |
/** Structure representing the ns16550. */ |
static ns16550_t ns16550; |
/** Structure for ns16550's IRQ. */ |
static irq_t ns16550_irq; |
/* |
* These codes read from ns16550 data register are silently ignored. |
*/ |
#define IGNORE_CODE 0x7f /* all keys up */ |
static void ns16550_suspend(chardev_t *); |
static void ns16550_resume(chardev_t *); |
static chardev_operations_t ops = { |
.suspend = ns16550_suspend, |
.resume = ns16550_resume, |
.read = ns16550_key_read |
}; |
void ns16550_interrupt(void); |
/** Initialize keyboard and service interrupts using kernel routine */ |
void ns16550_grab(void) |
{ |
ipl_t ipl = interrupts_disable(); |
ns16550_ier_write(&ns16550, IER_ERBFI); /* enable receiver interrupt */ |
while (ns16550_lsr_read(&ns16550) & LSR_DATA_READY) |
(void) ns16550_rbr_read(&ns16550); |
spinlock_lock(&ns16550_irq.lock); |
ns16550_irq.notif_cfg.notify = false; |
spinlock_unlock(&ns16550_irq.lock); |
interrupts_restore(ipl); |
} |
/** Resume the former interrupt vector */ |
void ns16550_release(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&ns16550_irq.lock); |
if (ns16550_irq.notif_cfg.answerbox) |
ns16550_irq.notif_cfg.notify = true; |
spinlock_unlock(&ns16550_irq.lock); |
interrupts_restore(ipl); |
} |
/** Initialize ns16550. |
* |
* @param devno Device number. |
* @param inr Interrupt number. |
* @param vaddr Virtual address of device's registers. |
*/ |
void ns16550_init(devno_t devno, inr_t inr, uintptr_t vaddr) |
{ |
chardev_initialize("ns16550_kbd", &kbrd, &ops); |
stdin = &kbrd; |
ns16550.devno = devno; |
ns16550.reg = (uint8_t *) vaddr; |
irq_initialize(&ns16550_irq); |
ns16550_irq.devno = devno; |
ns16550_irq.inr = inr; |
ns16550_irq.claim = ns16550_claim; |
ns16550_irq.handler = ns16550_irq_handler; |
irq_register(&ns16550_irq); |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550); |
sysinfo_set_item_val("kbd.devno", NULL, devno); |
sysinfo_set_item_val("kbd.inr", NULL, inr); |
sysinfo_set_item_val("kbd.address.virtual", NULL, vaddr); |
ns16550_grab(); |
} |
/** Process ns16550 interrupt. */ |
void ns16550_interrupt(void) |
{ |
/* TODO |
* |
* ns16550 works in the polled mode so far. |
*/ |
} |
/* Called from getc(). */ |
void ns16550_resume(chardev_t *d) |
{ |
} |
/* Called from getc(). */ |
void ns16550_suspend(chardev_t *d) |
{ |
} |
char ns16550_key_read(chardev_t *d) |
{ |
char ch; |
while(!(ch = active_read_buff_read())) { |
uint8_t x; |
while (!(ns16550_lsr_read(&ns16550) & LSR_DATA_READY)) |
; |
x = ns16550_rbr_read(&ns16550); |
if (x != IGNORE_CODE) { |
if (x & KEY_RELEASE) |
key_released(x ^ KEY_RELEASE); |
else |
active_read_key_pressed(x); |
} |
} |
return ch; |
} |
/** Poll for key press and release events. |
* |
* This function can be used to implement keyboard polling. |
*/ |
void ns16550_poll(void) |
{ |
ipl_t ipl; |
ipl = interrupts_disable(); |
spinlock_lock(&ns16550_irq.lock); |
if (ns16550_lsr_read(&ns16550) & LSR_DATA_READY) { |
if (ns16550_irq.notif_cfg.notify && ns16550_irq.notif_cfg.answerbox) { |
/* |
* Send IPC notification. |
*/ |
ipc_irq_send_notif(&ns16550_irq); |
spinlock_unlock(&ns16550_irq.lock); |
interrupts_restore(ipl); |
return; |
} |
} |
spinlock_unlock(&ns16550_irq.lock); |
interrupts_restore(ipl); |
while (ns16550_lsr_read(&ns16550) & LSR_DATA_READY) { |
uint8_t x; |
x = ns16550_rbr_read(&ns16550); |
if (x != IGNORE_CODE) { |
if (x & KEY_RELEASE) |
key_released(x ^ KEY_RELEASE); |
else |
key_pressed(x); |
} |
} |
} |
irq_ownership_t ns16550_claim(void) |
{ |
return (ns16550_lsr_read(&ns16550) & LSR_DATA_READY); |
} |
void ns16550_irq_handler(irq_t *irq, void *arg, ...) |
{ |
panic("Not yet implemented, ns16550 works in polled mode.\n"); |
} |
/** @} |
*/ |
/branches/arm/kernel/genarch/src/kbd/z8530.c |
---|
0,0 → 1,215 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Zilog 8530 serial port / keyboard driver. |
*/ |
#include <genarch/kbd/z8530.h> |
#include <genarch/kbd/key.h> |
#include <genarch/kbd/scanc.h> |
#include <genarch/kbd/scanc_sun.h> |
#include <arch/drivers/z8530.h> |
#include <ddi/irq.h> |
#include <ipc/irq.h> |
#include <arch/interrupt.h> |
#include <arch/drivers/kbd.h> |
#include <arch/drivers/fhc.h> |
#include <cpu.h> |
#include <arch/asm.h> |
#include <arch.h> |
#include <console/chardev.h> |
#include <console/console.h> |
#include <interrupt.h> |
#include <sysinfo/sysinfo.h> |
#include <print.h> |
/* |
* These codes read from z8530 data register are silently ignored. |
*/ |
#define IGNORE_CODE 0x7f /* all keys up */ |
static z8530_t z8530; /**< z8530 device structure. */ |
static irq_t z8530_irq; /**< z8530's IRQ. */ |
static void z8530_suspend(chardev_t *); |
static void z8530_resume(chardev_t *); |
static chardev_operations_t ops = { |
.suspend = z8530_suspend, |
.resume = z8530_resume, |
.read = z8530_key_read |
}; |
/** Initialize keyboard and service interrupts using kernel routine. */ |
void z8530_grab(void) |
{ |
ipl_t ipl = interrupts_disable(); |
(void) z8530_read_a(&z8530, RR8); |
/* |
* Clear any pending TX interrupts or we never manage |
* to set FHC UART interrupt state to idle. |
*/ |
z8530_write_a(&z8530, WR0, WR0_TX_IP_RST); |
z8530_write_a(&z8530, WR1, WR1_IARCSC); /* interrupt on all characters */ |
/* 8 bits per character and enable receiver */ |
z8530_write_a(&z8530, WR3, WR3_RX8BITSCH | WR3_RX_ENABLE); |
z8530_write_a(&z8530, WR9, WR9_MIE); /* Master Interrupt Enable. */ |
spinlock_lock(&z8530_irq.lock); |
z8530_irq.notif_cfg.notify = false; |
spinlock_unlock(&z8530_irq.lock); |
interrupts_restore(ipl); |
} |
/** Resume the former IPC notification behavior. */ |
void z8530_release(void) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&z8530_irq.lock); |
if (z8530_irq.notif_cfg.answerbox) |
z8530_irq.notif_cfg.notify = true; |
spinlock_unlock(&z8530_irq.lock); |
interrupts_restore(ipl); |
} |
/** Initialize z8530. */ |
void z8530_init(devno_t devno, inr_t inr, uintptr_t vaddr) |
{ |
chardev_initialize("z8530_kbd", &kbrd, &ops); |
stdin = &kbrd; |
z8530.devno = devno; |
z8530.reg = (uint8_t *) vaddr; |
irq_initialize(&z8530_irq); |
z8530_irq.devno = devno; |
z8530_irq.inr = inr; |
z8530_irq.claim = z8530_claim; |
z8530_irq.handler = z8530_irq_handler; |
irq_register(&z8530_irq); |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.type", NULL, KBD_Z8530); |
sysinfo_set_item_val("kbd.devno", NULL, devno); |
sysinfo_set_item_val("kbd.inr", NULL, inr); |
sysinfo_set_item_val("kbd.address.virtual", NULL, vaddr); |
z8530_grab(); |
} |
/** Process z8530 interrupt. |
* |
* @param n Interrupt vector. |
* @param istate Interrupted state. |
*/ |
void z8530_interrupt(void) |
{ |
z8530_poll(); |
} |
/* Called from getc(). */ |
void z8530_resume(chardev_t *d) |
{ |
} |
/* Called from getc(). */ |
void z8530_suspend(chardev_t *d) |
{ |
} |
char z8530_key_read(chardev_t *d) |
{ |
char ch; |
while(!(ch = active_read_buff_read())) { |
uint8_t x; |
while (!(z8530_read_a(&z8530, RR0) & RR0_RCA)) |
; |
x = z8530_read_a(&z8530, RR8); |
if (x != IGNORE_CODE) { |
if (x & KEY_RELEASE) |
key_released(x ^ KEY_RELEASE); |
else |
active_read_key_pressed(x); |
} |
} |
return ch; |
} |
/** Poll for key press and release events. |
* |
* This function can be used to implement keyboard polling. |
*/ |
void z8530_poll(void) |
{ |
uint8_t x; |
while (z8530_read_a(&z8530, RR0) & RR0_RCA) { |
x = z8530_read_a(&z8530, RR8); |
if (x != IGNORE_CODE) { |
if (x & KEY_RELEASE) |
key_released(x ^ KEY_RELEASE); |
else |
key_pressed(x); |
} |
} |
} |
irq_ownership_t z8530_claim(void) |
{ |
return (z8530_read_a(&z8530, RR0) & RR0_RCA); |
} |
void z8530_irq_handler(irq_t *irq, void *arg, ...) |
{ |
/* |
* So far, we know we got this interrupt through the FHC. |
* Since we don't have enough documentation about the FHC |
* and because the interrupt looks like level sensitive, |
* we cannot handle it by scheduling one of the level |
* interrupt traps. Process the interrupt directly. |
*/ |
if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) |
ipc_irq_send_notif(irq); |
else |
z8530_interrupt(); |
fhc_clear_interrupt(central_fhc, irq->inr); |
} |
/** @} |
*/ |
/branches/arm/kernel/genarch/src/kbd/scanc_pc.c |
---|
0,0 → 1,200 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Scan codes for pc keyboards. |
*/ |
#include <genarch/kbd/scanc.h> |
/** Primary meaning of scancodes. */ |
char sc_primary_map[] = { |
SPECIAL, /* 0x00 */ |
SPECIAL, /* 0x01 - Esc */ |
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', |
'\b', /* 0x0e - Backspace */ |
'\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', |
SPECIAL, /* 0x1d - LCtrl */ |
'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', |
'`', |
SPECIAL, /* 0x2a - LShift */ |
'\\', |
'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', |
SPECIAL, /* 0x36 - RShift */ |
'*', |
SPECIAL, /* 0x38 - LAlt */ |
' ', |
SPECIAL, /* 0x3a - CapsLock */ |
SPECIAL, /* 0x3b - F1 */ |
SPECIAL, /* 0x3c - F2 */ |
SPECIAL, /* 0x3d - F3 */ |
SPECIAL, /* 0x3e - F4 */ |
SPECIAL, /* 0x3f - F5 */ |
SPECIAL, /* 0x40 - F6 */ |
SPECIAL, /* 0x41 - F7 */ |
SPECIAL, /* 0x42 - F8 */ |
SPECIAL, /* 0x43 - F9 */ |
SPECIAL, /* 0x44 - F10 */ |
SPECIAL, /* 0x45 - NumLock */ |
SPECIAL, /* 0x46 - ScrollLock */ |
'7', '8', '9', '-', |
'4', '5', '6', '+', |
'1', '2', '3', |
'0', '.', |
SPECIAL, /* 0x54 - Alt-SysRq */ |
SPECIAL, /* 0x55 - F11/F12/PF1/FN */ |
SPECIAL, /* 0x56 - unlabelled key next to LAlt */ |
SPECIAL, /* 0x57 - F11 */ |
SPECIAL, /* 0x58 - F12 */ |
SPECIAL, /* 0x59 */ |
SPECIAL, /* 0x5a */ |
SPECIAL, /* 0x5b */ |
SPECIAL, /* 0x5c */ |
SPECIAL, /* 0x5d */ |
SPECIAL, /* 0x5e */ |
SPECIAL, /* 0x5f */ |
SPECIAL, /* 0x60 */ |
SPECIAL, /* 0x61 */ |
SPECIAL, /* 0x62 */ |
SPECIAL, /* 0x63 */ |
SPECIAL, /* 0x64 */ |
SPECIAL, /* 0x65 */ |
SPECIAL, /* 0x66 */ |
SPECIAL, /* 0x67 */ |
SPECIAL, /* 0x68 */ |
SPECIAL, /* 0x69 */ |
SPECIAL, /* 0x6a */ |
SPECIAL, /* 0x6b */ |
SPECIAL, /* 0x6c */ |
SPECIAL, /* 0x6d */ |
SPECIAL, /* 0x6e */ |
SPECIAL, /* 0x6f */ |
SPECIAL, /* 0x70 */ |
SPECIAL, /* 0x71 */ |
SPECIAL, /* 0x72 */ |
SPECIAL, /* 0x73 */ |
SPECIAL, /* 0x74 */ |
SPECIAL, /* 0x75 */ |
SPECIAL, /* 0x76 */ |
SPECIAL, /* 0x77 */ |
SPECIAL, /* 0x78 */ |
SPECIAL, /* 0x79 */ |
SPECIAL, /* 0x7a */ |
SPECIAL, /* 0x7b */ |
SPECIAL, /* 0x7c */ |
SPECIAL, /* 0x7d */ |
SPECIAL, /* 0x7e */ |
SPECIAL, /* 0x7f */ |
}; |
/** Secondary meaning of scancodes. */ |
char sc_secondary_map[] = { |
SPECIAL, /* 0x00 */ |
SPECIAL, /* 0x01 - Esc */ |
'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', |
SPECIAL, /* 0x0e - Backspace */ |
'\t', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', '\n', |
SPECIAL, /* 0x1d - LCtrl */ |
'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', |
'~', |
SPECIAL, /* 0x2a - LShift */ |
'|', |
'Z', 'X', 'C', 'V', 'B', 'N', 'M', '<', '>', '?', |
SPECIAL, /* 0x36 - RShift */ |
'*', |
SPECIAL, /* 0x38 - LAlt */ |
' ', |
SPECIAL, /* 0x3a - CapsLock */ |
SPECIAL, /* 0x3b - F1 */ |
SPECIAL, /* 0x3c - F2 */ |
SPECIAL, /* 0x3d - F3 */ |
SPECIAL, /* 0x3e - F4 */ |
SPECIAL, /* 0x3f - F5 */ |
SPECIAL, /* 0x40 - F6 */ |
SPECIAL, /* 0x41 - F7 */ |
SPECIAL, /* 0x42 - F8 */ |
SPECIAL, /* 0x43 - F9 */ |
SPECIAL, /* 0x44 - F10 */ |
SPECIAL, /* 0x45 - NumLock */ |
SPECIAL, /* 0x46 - ScrollLock */ |
'7', '8', '9', '-', |
'4', '5', '6', '+', |
'1', '2', '3', |
'0', '.', |
SPECIAL, /* 0x54 - Alt-SysRq */ |
SPECIAL, /* 0x55 - F11/F12/PF1/FN */ |
SPECIAL, /* 0x56 - unlabelled key next to LAlt */ |
SPECIAL, /* 0x57 - F11 */ |
SPECIAL, /* 0x58 - F12 */ |
SPECIAL, /* 0x59 */ |
SPECIAL, /* 0x5a */ |
SPECIAL, /* 0x5b */ |
SPECIAL, /* 0x5c */ |
SPECIAL, /* 0x5d */ |
SPECIAL, /* 0x5e */ |
SPECIAL, /* 0x5f */ |
SPECIAL, /* 0x60 */ |
SPECIAL, /* 0x61 */ |
SPECIAL, /* 0x62 */ |
SPECIAL, /* 0x63 */ |
SPECIAL, /* 0x64 */ |
SPECIAL, /* 0x65 */ |
SPECIAL, /* 0x66 */ |
SPECIAL, /* 0x67 */ |
SPECIAL, /* 0x68 */ |
SPECIAL, /* 0x69 */ |
SPECIAL, /* 0x6a */ |
SPECIAL, /* 0x6b */ |
SPECIAL, /* 0x6c */ |
SPECIAL, /* 0x6d */ |
SPECIAL, /* 0x6e */ |
SPECIAL, /* 0x6f */ |
SPECIAL, /* 0x70 */ |
SPECIAL, /* 0x71 */ |
SPECIAL, /* 0x72 */ |
SPECIAL, /* 0x73 */ |
SPECIAL, /* 0x74 */ |
SPECIAL, /* 0x75 */ |
SPECIAL, /* 0x76 */ |
SPECIAL, /* 0x77 */ |
SPECIAL, /* 0x78 */ |
SPECIAL, /* 0x79 */ |
SPECIAL, /* 0x7a */ |
SPECIAL, /* 0x7b */ |
SPECIAL, /* 0x7c */ |
SPECIAL, /* 0x7d */ |
SPECIAL, /* 0x7e */ |
SPECIAL, /* 0x7f */ |
}; |
/** @} |
*/ |
/branches/arm/kernel/genarch/src/kbd/scanc_sun.c |
---|
0,0 → 1,304 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Scan codes for Sun keyboards. |
*/ |
#include <genarch/kbd/scanc.h> |
/** Primary meaning of scancodes. */ |
char sc_primary_map[] = { |
[0x00] = SPECIAL, |
[0x01] = SPECIAL, |
[0x02] = SPECIAL, |
[0x03] = SPECIAL, |
[0x04] = SPECIAL, |
[0x05] = SPECIAL, /* F1 */ |
[0x06] = SPECIAL, /* F2 */ |
[0x07] = SPECIAL, /* F10 */ |
[0x08] = SPECIAL, /* F3 */ |
[0x09] = SPECIAL, /* F11 */ |
[0x0a] = SPECIAL, /* F4 */ |
[0x0b] = SPECIAL, /* F12 */ |
[0x0c] = SPECIAL, /* F5 */ |
[0x0d] = SPECIAL, /* RAlt */ |
[0x0e] = SPECIAL, /* F6 */ |
[0x0f] = SPECIAL, |
[0x10] = SPECIAL, /* F7 */ |
[0x11] = SPECIAL, /* F8 */ |
[0x12] = SPECIAL, /* F9 */ |
[0x13] = SPECIAL, /* LAlt */ |
[0x14] = SPECIAL, /* Up Arrow */ |
[0x15] = SPECIAL, /* Pause */ |
[0x16] = SPECIAL, |
[0x17] = SPECIAL, /* Scroll Lock */ |
[0x18] = SPECIAL, /* Left Arrow */ |
[0x19] = SPECIAL, |
[0x1a] = SPECIAL, |
[0x1b] = SPECIAL, /* Down Arrow */ |
[0x1c] = SPECIAL, /* Right Arrow */ |
[0x1d] = SPECIAL, /* Esc */ |
[0x1e] = '1', |
[0x1f] = '2', |
[0x20] = '3', |
[0x21] = '4', |
[0x22] = '5', |
[0x23] = '6', |
[0x24] = '7', |
[0x25] = '8', |
[0x26] = '9', |
[0x27] = '0', |
[0x28] = '-', |
[0x29] = '=', |
[0x2a] = '`', |
[0x2b] = '\b', /* Backspace */ |
[0x2c] = SPECIAL, /* Insert */ |
[0x2d] = SPECIAL, |
[0x2e] = '/', /* numeric keypad */ |
[0x2f] = '*', /* numeric keypad */ |
[0x30] = SPECIAL, |
[0x31] = SPECIAL, |
[0x32] = '.', /* numeric keypad */ |
[0x33] = SPECIAL, |
[0x34] = SPECIAL, /* Home */ |
[0x35] = '\t', /* Tab */ |
[0x36] = 'q', |
[0x37] = 'w', |
[0x38] = 'e', |
[0x39] = 'r', |
[0x3a] = 't', |
[0x3b] = 'y', |
[0x3c] = 'u', |
[0x3d] = 'i', |
[0x3e] = 'o', |
[0x3f] = 'p', |
[0x40] = '[', |
[0x41] = ']', |
[0x42] = SPECIAL, /* Del */ |
[0x43] = SPECIAL, |
[0x44] = '7', /* numeric keypad */ |
[0x45] = '8', /* numeric keypad */ |
[0x46] = '9', /* numeric keypad */ |
[0x47] = '-', /* numeric keypad */ |
[0x48] = SPECIAL, |
[0x49] = SPECIAL, |
[0x4a] = SPECIAL, /* End */ |
[0x4b] = SPECIAL, |
[0x4c] = SPECIAL, /* Control */ |
[0x4d] = 'a', |
[0x4e] = 's', |
[0x4f] = 'd', |
[0x50] = 'f', |
[0x51] = 'g', |
[0x52] = 'h', |
[0x53] = 'j', |
[0x54] = 'k', |
[0x55] = 'l', |
[0x56] = ';', |
[0x57] = '\'', |
[0x58] = '\\', |
[0x59] = '\n', /* Enter */ |
[0x5a] = '\n', /* Enter on numeric keypad */ |
[0x5b] = '4', /* numeric keypad */ |
[0x5c] = '5', /* numeric keypad */ |
[0x5d] = '6', /* numeric keypad */ |
[0x5e] = '0', /* numeric keypad */ |
[0x5f] = SPECIAL, |
[0x60] = SPECIAL, /* Page Up */ |
[0x61] = SPECIAL, |
[0x62] = SPECIAL, /* Num Lock */ |
[0x63] = SPECIAL, /* LShift */ |
[0x64] = 'z', |
[0x65] = 'x', |
[0x66] = 'c', |
[0x67] = 'v', |
[0x68] = 'b', |
[0x69] = 'n', |
[0x6a] = 'm', |
[0x6b] = ',', |
[0x6c] = '.', |
[0x6d] = '/', |
[0x6e] = SPECIAL, /* RShift */ |
[0x6f] = SPECIAL, |
[0x70] = '1', /* numeric keypad */ |
[0x71] = '2', /* numeric keypad */ |
[0x72] = '3', /* numeric keypad */ |
[0x73] = SPECIAL, |
[0x74] = SPECIAL, |
[0x75] = SPECIAL, |
[0x76] = SPECIAL, |
[0x77] = SPECIAL, /* Caps Lock */ |
[0x78] = SPECIAL, |
[0x79] = ' ', |
[0x7a] = SPECIAL, |
[0x7b] = SPECIAL, /* Page Down */ |
[0x7c] = SPECIAL, |
[0x7d] = '+', /* numeric key pad */ |
[0x7e] = SPECIAL, |
[0x7f] = SPECIAL |
}; |
/** Secondary meaning of scancodes. */ |
char sc_secondary_map[] = { |
[0x00] = SPECIAL, |
[0x01] = SPECIAL, |
[0x02] = SPECIAL, |
[0x03] = SPECIAL, |
[0x04] = SPECIAL, |
[0x05] = SPECIAL, /* F1 */ |
[0x06] = SPECIAL, /* F2 */ |
[0x07] = SPECIAL, /* F10 */ |
[0x08] = SPECIAL, /* F3 */ |
[0x09] = SPECIAL, /* F11 */ |
[0x0a] = SPECIAL, /* F4 */ |
[0x0b] = SPECIAL, /* F12 */ |
[0x0c] = SPECIAL, /* F5 */ |
[0x0d] = SPECIAL, /* RAlt */ |
[0x0e] = SPECIAL, /* F6 */ |
[0x0f] = SPECIAL, |
[0x10] = SPECIAL, /* F7 */ |
[0x11] = SPECIAL, /* F8 */ |
[0x12] = SPECIAL, /* F9 */ |
[0x13] = SPECIAL, /* LAlt */ |
[0x14] = SPECIAL, /* Up Arrow */ |
[0x15] = SPECIAL, /* Pause */ |
[0x16] = SPECIAL, |
[0x17] = SPECIAL, /* Scroll Lock */ |
[0x18] = SPECIAL, /* Left Arrow */ |
[0x19] = SPECIAL, |
[0x1a] = SPECIAL, |
[0x1b] = SPECIAL, /* Down Arrow */ |
[0x1c] = SPECIAL, /* Right Arrow */ |
[0x1d] = SPECIAL, /* Esc */ |
[0x1e] = '!', |
[0x1f] = '@', |
[0x20] = '#', |
[0x21] = '$', |
[0x22] = '%', |
[0x23] = '^', |
[0x24] = '&', |
[0x25] = '*', |
[0x26] = '(', |
[0x27] = ')', |
[0x28] = '_', |
[0x29] = '+', |
[0x2a] = '~', |
[0x2b] = SPECIAL, /* Backspace */ |
[0x2c] = SPECIAL, /* Insert */ |
[0x2d] = SPECIAL, |
[0x2e] = '/', /* numeric keypad */ |
[0x2f] = '*', /* numeric keypad */ |
[0x30] = SPECIAL, |
[0x31] = SPECIAL, |
[0x32] = '.', /* numeric keypad */ |
[0x33] = SPECIAL, |
[0x34] = SPECIAL, /* Home */ |
[0x35] = SPECIAL, /* Tab */ |
[0x36] = 'Q', |
[0x37] = 'W', |
[0x38] = 'E', |
[0x39] = 'R', |
[0x3a] = 'T', |
[0x3b] = 'Y', |
[0x3c] = 'U', |
[0x3d] = 'I', |
[0x3e] = 'O', |
[0x3f] = 'P', |
[0x40] = '{', |
[0x41] = '}', |
[0x42] = SPECIAL, /* Del */ |
[0x43] = SPECIAL, |
[0x44] = '7', /* numeric keypad */ |
[0x45] = '8', /* numeric keypad */ |
[0x46] = '9', /* numeric keypad */ |
[0x47] = '-', /* numeric keypad */ |
[0x48] = SPECIAL, |
[0x49] = SPECIAL, |
[0x4a] = SPECIAL, /* End */ |
[0x4b] = SPECIAL, |
[0x4c] = SPECIAL, /* Control */ |
[0x4d] = 'A', |
[0x4e] = 'S', |
[0x4f] = 'D', |
[0x50] = 'F', |
[0x51] = 'G', |
[0x52] = 'H', |
[0x53] = 'J', |
[0x54] = 'K', |
[0x55] = 'L', |
[0x56] = ':', |
[0x57] = '"', |
[0x58] = '|', |
[0x59] = SPECIAL, /* Enter */ |
[0x5a] = SPECIAL, /* Enter on numeric keypad */ |
[0x5b] = '4', /* numeric keypad */ |
[0x5c] = '5', /* numeric keypad */ |
[0x5d] = '6', /* numeric keypad */ |
[0x5e] = '0', /* numeric keypad */ |
[0x5f] = SPECIAL, |
[0x60] = SPECIAL, /* Page Up */ |
[0x61] = SPECIAL, |
[0x62] = SPECIAL, /* Num Lock */ |
[0x63] = SPECIAL, /* LShift */ |
[0x64] = 'Z', |
[0x65] = 'X', |
[0x66] = 'C', |
[0x67] = 'V', |
[0x68] = 'B', |
[0x69] = 'N', |
[0x6a] = 'M', |
[0x6b] = '<', |
[0x6c] = '>', |
[0x6d] = '?', |
[0x6e] = SPECIAL, /* RShift */ |
[0x6f] = SPECIAL, |
[0x70] = '1', /* numeric keypad */ |
[0x71] = '2', /* numeric keypad */ |
[0x72] = '3', /* numeric keypad */ |
[0x73] = SPECIAL, |
[0x74] = SPECIAL, |
[0x75] = SPECIAL, |
[0x76] = SPECIAL, |
[0x77] = SPECIAL, /* Caps Lock */ |
[0x78] = SPECIAL, |
[0x79] = ' ', |
[0x7a] = SPECIAL, |
[0x7b] = SPECIAL, /* Page Down */ |
[0x7c] = SPECIAL, |
[0x7d] = '+', /* numeric key pad */ |
[0x7e] = SPECIAL, |
[0x7f] = SPECIAL |
}; |
/** @} |
*/ |
/branches/arm/kernel/genarch/Makefile.inc |
---|
33,102 → 33,68 |
genarch/src/acpi/acpi.c \ |
genarch/src/acpi/madt.c |
endif |
ifeq ($(CONFIG_PAGE_PT),y) |
GENARCH_SOURCES += \ |
genarch/src/mm/page_pt.c \ |
genarch/src/mm/as_pt.c |
endif |
ifeq ($(CONFIG_PAGE_HT),y) |
GENARCH_SOURCES += \ |
genarch/src/mm/page_ht.c \ |
genarch/src/mm/as_ht.c |
endif |
ifeq ($(CONFIG_ASID),y) |
GENARCH_SOURCES += \ |
genarch/src/mm/asid.c |
endif |
ifeq ($(CONFIG_ASID_FIFO),y) |
GENARCH_SOURCES += \ |
genarch/src/mm/asid_fifo.c |
endif |
ifeq ($(CONFIG_SOFTINT),y) |
GENARCH_SOURCES += \ |
genarch/src/softint/division.c |
endif |
## Framebuffer |
ifeq ($(CONFIG_FB),y) |
GENARCH_SOURCES += \ |
genarch/src/fb/font-8x16.c \ |
genarch/src/fb/logo-196x66.c \ |
genarch/src/fb/fb.c |
DEFS += -DCONFIG_FB |
endif |
ifeq ($(CONFIG_DSRLNIN),y) |
GENARCH_SOURCES += \ |
genarch/src/drivers/dsrln/dsrlnin.c |
endif |
ifeq ($(CONFIG_DSRLNOUT),y) |
GENARCH_SOURCES += \ |
genarch/src/drivers/dsrln/dsrlnout.c |
endif |
## i8042 controller |
ifeq ($(CONFIG_I8042),y) |
GENARCH_SOURCES += \ |
genarch/src/drivers/i8042/i8042.c |
genarch/src/kbd/i8042.c \ |
genarch/src/kbd/key.c \ |
genarch/src/kbd/scanc_pc.c |
endif |
ifeq ($(CONFIG_NS16550),y) |
## Sun keyboard |
ifeq ($(CONFIG_SUN_KBD),y) |
GENARCH_SOURCES += \ |
genarch/src/drivers/ns16550/ns16550.c |
genarch/src/kbd/key.c \ |
genarch/src/kbd/scanc_sun.c |
endif |
## z8530 controller |
ifeq ($(CONFIG_Z8530),y) |
GENARCH_SOURCES += \ |
genarch/src/drivers/z8530/z8530.c |
genarch/src/kbd/z8530.c |
endif |
ifeq ($(CONFIG_VIA_CUDA),y) |
## ns16550 controller |
ifeq ($(CONFIG_NS16550),y) |
GENARCH_SOURCES += \ |
genarch/src/drivers/via-cuda/cuda.c |
genarch/src/kbd/ns16550.c |
endif |
ifeq ($(CONFIG_PC_KBD),y) |
GENARCH_SOURCES += \ |
genarch/src/kbrd/kbrd.c \ |
genarch/src/kbrd/scanc_pc.c |
endif |
ifeq ($(CONFIG_SUN_KBD),y) |
## OpenFirmware Device Tree |
ifeq ($(CONFIG_OFW_TREE), y) |
GENARCH_SOURCES += \ |
genarch/src/kbrd/kbrd.c \ |
genarch/src/kbrd/scanc_sun.c |
endif |
ifeq ($(CONFIG_PL050),y) |
GENARCH_SOURCES += \ |
genarch/src/kbrd/kbrd_pl050.c \ |
genarch/src/kbrd/scanc_pl050.c |
endif |
ifeq ($(CONFIG_MAC_KBD),y) |
GENARCH_SOURCES += \ |
genarch/src/kbrd/kbrd.c \ |
genarch/src/kbrd/scanc_mac.c |
endif |
ifeq ($(CONFIG_SRLN),y) |
GENARCH_SOURCES += \ |
genarch/src/srln/srln.c |
endif |
ifeq ($(CONFIG_OFW_TREE),y) |
GENARCH_SOURCES += \ |
genarch/src/ofw/ofw_tree.c \ |
genarch/src/ofw/ebus.c \ |
genarch/src/ofw/fhc.c \ |
136,13 → 102,3 |
genarch/src/ofw/sbus.c \ |
genarch/src/ofw/upa.c |
endif |
ifeq ($(CONFIG_MULTIBOOT), y) |
GENARCH_SOURCES += \ |
genarch/src/multiboot/multiboot.c |
endif |
ifeq ($(CONFIG_EGA), y) |
GENARCH_SOURCES += \ |
genarch/src/drivers/ega/ega.c |
endif |
/branches/arm/kernel/generic/src/ipc/event.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/generic/src/ipc/sysipc.c |
---|
93,8 → 93,6 |
static inline int method_is_forwardable(unative_t method) |
{ |
switch (method) { |
case IPC_M_CONNECTION_CLONE: |
case IPC_M_CONNECT_ME: |
case IPC_M_PHONE_HUNGUP: |
/* This message is meant only for the original recipient. */ |
return 0; |
142,8 → 140,6 |
static inline int answer_need_old(call_t *call) |
{ |
switch (IPC_GET_METHOD(call->data)) { |
case IPC_M_CONNECTION_CLONE: |
case IPC_M_CONNECT_ME: |
case IPC_M_CONNECT_TO_ME: |
case IPC_M_CONNECT_ME_TO: |
case IPC_M_SHARE_OUT: |
186,48 → 182,9 |
if (!olddata) |
return 0; |
if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECTION_CLONE) { |
phoneid = IPC_GET_ARG1(*olddata); |
phone_t *phone = &TASK->phones[phoneid]; |
if (IPC_GET_RETVAL(answer->data) != EOK) { |
/* |
* The recipient of the cloned phone rejected the offer. |
* In this case, the connection was established at the |
* request time and therefore we need to slam the phone. |
* We don't merely hangup as that would result in |
* sending IPC_M_HUNGUP to the third party on the |
* other side of the cloned phone. |
*/ |
mutex_lock(&phone->lock); |
if (phone->state == IPC_PHONE_CONNECTED) { |
spinlock_lock(&phone->callee->lock); |
list_remove(&phone->link); |
phone->state = IPC_PHONE_SLAMMED; |
spinlock_unlock(&phone->callee->lock); |
} |
mutex_unlock(&phone->lock); |
} |
} else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_ME) { |
phone_t *phone = (phone_t *)IPC_GET_ARG5(*olddata); |
if (IPC_GET_RETVAL(answer->data) != EOK) { |
/* |
* The other party on the cloned phoned rejected our |
* request for connection on the protocol level. |
* We need to break the connection without sending |
* IPC_M_HUNGUP back. |
*/ |
mutex_lock(&phone->lock); |
if (phone->state == IPC_PHONE_CONNECTED) { |
spinlock_lock(&phone->callee->lock); |
list_remove(&phone->link); |
phone->state = IPC_PHONE_SLAMMED; |
spinlock_unlock(&phone->callee->lock); |
} |
mutex_unlock(&phone->lock); |
} |
} else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_TO_ME) { |
if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_TO_ME) { |
phoneid = IPC_GET_ARG5(*olddata); |
if (IPC_GET_RETVAL(answer->data) != EOK) { |
if (IPC_GET_RETVAL(answer->data)) { |
/* The connection was not accepted */ |
phone_dealloc(phoneid); |
} else { |
239,7 → 196,7 |
} |
} else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_ME_TO) { |
/* If the users accepted call, connect */ |
if (IPC_GET_RETVAL(answer->data) == EOK) { |
if (!IPC_GET_RETVAL(answer->data)) { |
ipc_phone_connect((phone_t *) IPC_GET_ARG5(*olddata), |
&TASK->answerbox); |
} |
336,26 → 293,6 |
return 0; |
} |
static void phones_lock(phone_t *p1, phone_t *p2) |
{ |
if (p1 < p2) { |
mutex_lock(&p1->lock); |
mutex_lock(&p2->lock); |
} else if (p1 > p2) { |
mutex_lock(&p2->lock); |
mutex_lock(&p1->lock); |
} else { |
mutex_lock(&p1->lock); |
} |
} |
static void phones_unlock(phone_t *p1, phone_t *p2) |
{ |
mutex_unlock(&p1->lock); |
if (p1 != p2) |
mutex_unlock(&p2->lock); |
} |
/** Called before the request is sent. |
* |
* @param call Call structure with the request. |
371,39 → 308,8 |
int rc; |
switch (IPC_GET_METHOD(call->data)) { |
case IPC_M_CONNECTION_CLONE: { |
phone_t *cloned_phone; |
GET_CHECK_PHONE(cloned_phone, IPC_GET_ARG1(call->data), |
return ENOENT); |
phones_lock(cloned_phone, phone); |
if ((cloned_phone->state != IPC_PHONE_CONNECTED) || |
phone->state != IPC_PHONE_CONNECTED) { |
phones_unlock(cloned_phone, phone); |
return EINVAL; |
} |
/* |
* We can be pretty sure now that both tasks exist and we are |
* connected to them. As we continue to hold the phone locks, |
* we are effectively preventing them from finishing their |
* potential cleanup. |
*/ |
newphid = phone_alloc(phone->callee->task); |
if (newphid < 0) { |
phones_unlock(cloned_phone, phone); |
return ELIMIT; |
} |
ipc_phone_connect(&phone->callee->task->phones[newphid], |
cloned_phone->callee); |
phones_unlock(cloned_phone, phone); |
/* Set the new phone for the callee. */ |
IPC_SET_ARG1(call->data, newphid); |
break; |
} |
case IPC_M_CONNECT_ME: |
IPC_SET_ARG5(call->data, (unative_t) phone); |
break; |
case IPC_M_CONNECT_ME_TO: |
newphid = phone_alloc(TASK); |
newphid = phone_alloc(); |
if (newphid < 0) |
return ELIMIT; |
/* Set arg5 for server */ |
426,7 → 332,7 |
src = IPC_GET_ARG1(call->data); |
size = IPC_GET_ARG2(call->data); |
if (size > DATA_XFER_LIMIT) |
if ((size <= 0) || (size > DATA_XFER_LIMIT)) |
return ELIMIT; |
call->buffer = (uint8_t *) malloc(size, 0); |
493,7 → 399,7 |
int phoneid; |
if (IPC_GET_METHOD(call->data) == IPC_M_CONNECT_TO_ME) { |
phoneid = phone_alloc(TASK); |
phoneid = phone_alloc(); |
if (phoneid < 0) { /* Failed to allocate phone */ |
IPC_SET_RETVAL(call->data, ELIMIT); |
ipc_answer(box, call); |
549,17 → 455,10 |
IPC_SET_ARG5(call.data, 0); |
if (!(res = request_preprocess(&call, phone))) { |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_begin(); |
#endif |
rc = ipc_call_sync(phone, &call); |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_end(); |
#endif |
if (rc != EOK) |
return rc; |
process_answer(&call); |
} else { |
IPC_SET_RETVAL(call.data, res); |
} |
596,13 → 495,7 |
GET_CHECK_PHONE(phone, phoneid, return ENOENT); |
if (!(res = request_preprocess(&call, phone))) { |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_begin(); |
#endif |
rc = ipc_call_sync(phone, &call); |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_end(); |
#endif |
if (rc != EOK) |
return rc; |
process_answer(&call); |
712,8 → 605,7 |
return (unative_t) call; |
} |
/** Forward a received call to another destination - common code for both the |
* fast and the slow version. |
/** Forward a received call to another destination. |
* |
* @param callid Hash of the call to forward. |
* @param phoneid Phone handle to use for forwarding. |
720,21 → 612,23 |
* @param method New method to use for the forwarded call. |
* @param arg1 New value of the first argument for the forwarded call. |
* @param arg2 New value of the second argument for the forwarded call. |
* @param arg3 New value of the third argument for the forwarded call. |
* @param arg4 New value of the fourth argument for the forwarded call. |
* @param arg5 New value of the fifth argument for the forwarded call. |
* @param mode Flags that specify mode of the forward operation. |
* @param slow If true, arg3, arg4 and arg5 are considered. Otherwise |
* the function considers only the fast version arguments: |
* i.e. arg1 and arg2. |
* |
* @return Return 0 on succes, otherwise return an error code. |
* |
* Warning: Make sure that ARG5 is not rewritten for certain system IPC |
* In case the original method is a system method, ARG1, ARG2 and ARG3 are |
* overwritten in the forwarded message with the new method and the new arg1 and |
* arg2, respectively. Otherwise the METHOD, ARG1 and ARG2 are rewritten with |
* the new method, arg1 and arg2, respectively. Also note there is a set of |
* immutable methods, for which the new method and argument is not set and |
* these values are ignored. |
* |
* Warning: When implementing support for changing additional payload |
* arguments, make sure that ARG5 is not rewritten for certain |
* system IPC |
*/ |
static unative_t sys_ipc_forward_common(unative_t callid, unative_t phoneid, |
unative_t method, unative_t arg1, unative_t arg2, unative_t arg3, |
unative_t arg4, unative_t arg5, int mode, bool slow) |
unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid, |
unative_t method, unative_t arg1, unative_t arg2, int mode) |
{ |
call_t *call; |
phone_t *phone; |
742,7 → 636,7 |
call = get_call(callid); |
if (!call) |
return ENOENT; |
call->flags |= IPC_CALL_FORWARDED; |
GET_CHECK_PHONE(phone, phoneid, { |
759,8 → 653,8 |
/* |
* Userspace is not allowed to change method of system methods on |
* forward, allow changing ARG1, ARG2, ARG3 and ARG4 by means of method, |
* arg1, arg2 and arg3. |
* forward, allow changing ARG1, ARG2 and ARG3 by means of method, |
* arg1 and arg2. |
* If the method is immutable, don't change anything. |
*/ |
if (!method_is_immutable(IPC_GET_METHOD(call->data))) { |
771,22 → 665,10 |
IPC_SET_ARG1(call->data, method); |
IPC_SET_ARG2(call->data, arg1); |
IPC_SET_ARG3(call->data, arg2); |
if (slow) { |
IPC_SET_ARG4(call->data, arg3); |
/* |
* For system methods we deliberately don't |
* overwrite ARG5. |
*/ |
} |
} else { |
IPC_SET_METHOD(call->data, method); |
IPC_SET_ARG1(call->data, arg1); |
IPC_SET_ARG2(call->data, arg2); |
if (slow) { |
IPC_SET_ARG3(call->data, arg3); |
IPC_SET_ARG4(call->data, arg4); |
IPC_SET_ARG5(call->data, arg5); |
} |
} |
} |
793,64 → 675,6 |
return ipc_forward(call, phone, &TASK->answerbox, mode); |
} |
/** Forward a received call to another destination - fast version. |
* |
* @param callid Hash of the call to forward. |
* @param phoneid Phone handle to use for forwarding. |
* @param method New method to use for the forwarded call. |
* @param arg1 New value of the first argument for the forwarded call. |
* @param arg2 New value of the second argument for the forwarded call. |
* @param mode Flags that specify mode of the forward operation. |
* |
* @return Return 0 on succes, otherwise return an error code. |
* |
* In case the original method is a system method, ARG1, ARG2 and ARG3 are |
* overwritten in the forwarded message with the new method and the new |
* arg1 and arg2, respectively. Otherwise the METHOD, ARG1 and ARG2 are |
* rewritten with the new method, arg1 and arg2, respectively. Also note there |
* is a set of immutable methods, for which the new method and arguments are not |
* set and these values are ignored. |
*/ |
unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid, |
unative_t method, unative_t arg1, unative_t arg2, int mode) |
{ |
return sys_ipc_forward_common(callid, phoneid, method, arg1, arg2, 0, 0, |
0, mode, false); |
} |
/** Forward a received call to another destination - slow version. |
* |
* @param callid Hash of the call to forward. |
* @param phoneid Phone handle to use for forwarding. |
* @param data Userspace address of the new IPC data. |
* @param mode Flags that specify mode of the forward operation. |
* |
* @return Return 0 on succes, otherwise return an error code. |
* |
* This function is the slow verision of the sys_ipc_forward_fast interface. |
* It can copy all five new arguments and the new method from the userspace. |
* It naturally extends the functionality of the fast version. For system |
* methods, it additionally stores the new value of arg3 to ARG4. For non-system |
* methods, it additionally stores the new value of arg3, arg4 and arg5, |
* respectively, to ARG3, ARG4 and ARG5, respectively. |
*/ |
unative_t sys_ipc_forward_slow(unative_t callid, unative_t phoneid, |
ipc_data_t *data, int mode) |
{ |
ipc_data_t newdata; |
int rc; |
rc = copy_from_uspace(&newdata.args, &data->args, |
sizeof(newdata.args)); |
if (rc != 0) |
return (unative_t) rc; |
return sys_ipc_forward_common(callid, phoneid, |
IPC_GET_METHOD(newdata), IPC_GET_ARG1(newdata), |
IPC_GET_ARG2(newdata), IPC_GET_ARG3(newdata), |
IPC_GET_ARG4(newdata), IPC_GET_ARG5(newdata), mode, true); |
} |
/** Answer an IPC call - fast version. |
* |
* This function can handle only two return arguments of payload, but is faster |
974,17 → 798,9 |
{ |
call_t *call; |
restart: |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_begin(); |
#endif |
restart: |
call = ipc_wait_for_call(&TASK->answerbox, usec, |
flags | SYNCH_FLAGS_INTERRUPTIBLE); |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_end(); |
#endif |
if (!call) |
return 0; |
1030,21 → 846,6 |
/* Include phone address('id') of the caller in the request, |
* copy whole call->data, not only call->data.args */ |
if (STRUCT_TO_USPACE(calldata, &call->data)) { |
/* |
* The callee will not receive this call and no one else has |
* a chance to answer it. Reply with the EPARTY error code. |
*/ |
ipc_data_t saved_data; |
int saveddata = 0; |
if (answer_need_old(call)) { |
memcpy(&saved_data, &call->data, sizeof(call->data)); |
saveddata = 1; |
} |
IPC_SET_RETVAL(call->data, EPARTY); |
(void) answer_preprocess(call, saveddata ? &saved_data : NULL); |
ipc_answer(&TASK->answerbox, call); |
return 0; |
} |
return (unative_t)call; |
/branches/arm/kernel/generic/src/ipc/ipc.c |
---|
44,7 → 44,6 |
#include <synch/synch.h> |
#include <ipc/ipc.h> |
#include <ipc/kbox.h> |
#include <ipc/event.h> |
#include <errno.h> |
#include <mm/slab.h> |
#include <arch.h> |
51,6 → 50,7 |
#include <proc/task.h> |
#include <memstr.h> |
#include <debug.h> |
#include <print.h> |
#include <console/console.h> |
#include <proc/thread.h> |
328,10 → 328,12 |
list_remove(&phone->link); |
spinlock_unlock(&box->lock); |
call = ipc_call_alloc(0); |
IPC_SET_METHOD(call->data, IPC_M_PHONE_HUNGUP); |
call->flags |= IPC_CALL_DISCARD_ANSWER; |
_ipc_call(phone, box, call); |
if (phone->state != IPC_PHONE_SLAMMED) { |
call = ipc_call_alloc(0); |
IPC_SET_METHOD(call->data, IPC_M_PHONE_HUNGUP); |
call->flags |= IPC_CALL_DISCARD_ANSWER; |
_ipc_call(phone, box, call); |
} |
} |
phone->state = IPC_PHONE_HUNGUP; |
524,9 → 526,6 |
for (i = 0; i < IPC_MAX_PHONES; i++) |
ipc_phone_hangup(&TASK->phones[i]); |
/* Unsubscribe from any event notifications. */ |
event_cleanup_answerbox(&TASK->answerbox); |
/* Disconnect all connected irqs */ |
ipc_irq_cleanup(&TASK->answerbox); |
/branches/arm/kernel/generic/src/ipc/kbox.c |
---|
42,27 → 42,19 |
#include <debug.h> |
#include <udebug/udebug_ipc.h> |
#include <ipc/kbox.h> |
#include <print.h> |
void ipc_kbox_cleanup(void) |
{ |
ipl_t ipl; |
bool have_kb_thread; |
/* |
* Only hold kb.cleanup_lock while setting kb.finished - |
* this is enough. |
*/ |
mutex_lock(&TASK->kb.cleanup_lock); |
TASK->kb.finished = true; |
mutex_unlock(&TASK->kb.cleanup_lock); |
/* Only hold kb_cleanup_lock while setting kb_finished - this is enough */ |
mutex_lock(&TASK->kb_cleanup_lock); |
TASK->kb_finished = true; |
mutex_unlock(&TASK->kb_cleanup_lock); |
have_kb_thread = (TASK->kb.thread != NULL); |
have_kb_thread = (TASK->kb_thread != NULL); |
/* |
* From now on nobody will try to connect phones or attach |
* kbox threads |
*/ |
/* From now on nobody will try to connect phones or attach kbox threads */ |
/* |
* Disconnect all phones connected to our kbox. Passing true for |
70,136 → 62,83 |
* disconnected phone. This ensures the kbox thread is going to |
* wake up and terminate. |
*/ |
ipc_answerbox_slam_phones(&TASK->kb.box, have_kb_thread); |
/* |
* If the task was being debugged, clean up debugging session. |
* This is necessarry as slamming the phones won't force |
* kbox thread to clean it up since sender != debugger. |
*/ |
ipl = interrupts_disable(); |
spinlock_lock(&TASK->lock); |
udebug_task_cleanup(TASK); |
spinlock_unlock(&TASK->lock); |
interrupts_restore(ipl); |
ipc_answerbox_slam_phones(&TASK->kernel_box, have_kb_thread); |
if (have_kb_thread) { |
LOG("Join kb.thread."); |
thread_join(TASK->kb.thread); |
thread_detach(TASK->kb.thread); |
LOG("...join done."); |
TASK->kb.thread = NULL; |
LOG("join kb_thread..\n"); |
thread_join(TASK->kb_thread); |
thread_detach(TASK->kb_thread); |
LOG("join done\n"); |
TASK->kb_thread = NULL; |
} |
/* Answer all messages in 'calls' and 'dispatched_calls' queues. */ |
spinlock_lock(&TASK->kb.box.lock); |
ipc_cleanup_call_list(&TASK->kb.box.dispatched_calls); |
ipc_cleanup_call_list(&TASK->kb.box.calls); |
spinlock_unlock(&TASK->kb.box.lock); |
/* Answer all messages in 'calls' and 'dispatched_calls' queues */ |
spinlock_lock(&TASK->kernel_box.lock); |
ipc_cleanup_call_list(&TASK->kernel_box.dispatched_calls); |
ipc_cleanup_call_list(&TASK->kernel_box.calls); |
spinlock_unlock(&TASK->kernel_box.lock); |
} |
/** Handle hangup message in kbox. |
* |
* @param call The IPC_M_PHONE_HUNGUP call structure. |
* @param last Output, the function stores @c true here if |
* this was the last phone, @c false otherwise. |
**/ |
static void kbox_proc_phone_hungup(call_t *call, bool *last) |
{ |
ipl_t ipl; |
/* Was it our debugger, who hung up? */ |
if (call->sender == TASK->udebug.debugger) { |
/* Terminate debugging session (if any). */ |
LOG("Terminate debugging session."); |
ipl = interrupts_disable(); |
spinlock_lock(&TASK->lock); |
udebug_task_cleanup(TASK); |
spinlock_unlock(&TASK->lock); |
interrupts_restore(ipl); |
} else { |
LOG("Was not debugger."); |
} |
LOG("Continue with hangup message."); |
IPC_SET_RETVAL(call->data, 0); |
ipc_answer(&TASK->kb.box, call); |
ipl = interrupts_disable(); |
spinlock_lock(&TASK->lock); |
spinlock_lock(&TASK->kb.box.lock); |
if (list_empty(&TASK->kb.box.connected_phones)) { |
/* |
* Last phone has been disconnected. Detach this thread so it |
* gets freed and signal to the caller. |
*/ |
/* Only detach kbox thread unless already terminating. */ |
mutex_lock(&TASK->kb.cleanup_lock); |
if (&TASK->kb.finished == false) { |
/* Detach kbox thread so it gets freed from memory. */ |
thread_detach(TASK->kb.thread); |
TASK->kb.thread = NULL; |
} |
mutex_unlock(&TASK->kb.cleanup_lock); |
LOG("Phone list is empty."); |
*last = true; |
} else { |
*last = false; |
} |
spinlock_unlock(&TASK->kb.box.lock); |
spinlock_unlock(&TASK->lock); |
interrupts_restore(ipl); |
} |
/** Implementing function for the kbox thread. |
* |
* This function listens for debug requests. It terminates |
* when all phones are disconnected from the kbox. |
* |
* @param arg Ignored. |
*/ |
static void kbox_thread_proc(void *arg) |
{ |
call_t *call; |
int method; |
bool done; |
ipl_t ipl; |
(void)arg; |
LOG("Starting."); |
LOG("kbox_thread_proc()\n"); |
done = false; |
while (!done) { |
call = ipc_wait_for_call(&TASK->kb.box, SYNCH_NO_TIMEOUT, |
call = ipc_wait_for_call(&TASK->kernel_box, SYNCH_NO_TIMEOUT, |
SYNCH_FLAGS_NONE); |
if (call == NULL) |
continue; /* Try again. */ |
if (call != NULL) { |
method = IPC_GET_METHOD(call->data); |
switch (IPC_GET_METHOD(call->data)) { |
if (method == IPC_M_DEBUG_ALL) { |
udebug_call_receive(call); |
} |
case IPC_M_DEBUG_ALL: |
/* Handle debug call. */ |
udebug_call_receive(call); |
break; |
if (method == IPC_M_PHONE_HUNGUP) { |
LOG("kbox: handle hangup message\n"); |
case IPC_M_PHONE_HUNGUP: |
/* |
* Process the hangup call. If this was the last |
* phone, done will be set to true and the |
* while loop will terminate. |
*/ |
kbox_proc_phone_hungup(call, &done); |
break; |
/* Was it our debugger, who hung up? */ |
if (call->sender == TASK->udebug.debugger) { |
/* Terminate debugging session (if any) */ |
LOG("kbox: terminate debug session\n"); |
ipl = interrupts_disable(); |
spinlock_lock(&TASK->lock); |
udebug_task_cleanup(TASK); |
spinlock_unlock(&TASK->lock); |
interrupts_restore(ipl); |
} else { |
LOG("kbox: was not debugger\n"); |
} |
default: |
/* Ignore */ |
break; |
LOG("kbox: continue with hangup message\n"); |
IPC_SET_RETVAL(call->data, 0); |
ipc_answer(&TASK->kernel_box, call); |
ipl = interrupts_disable(); |
spinlock_lock(&TASK->lock); |
spinlock_lock(&TASK->answerbox.lock); |
if (list_empty(&TASK->answerbox.connected_phones)) { |
/* Last phone has been disconnected */ |
TASK->kb_thread = NULL; |
done = true; |
LOG("phone list is empty\n"); |
} |
spinlock_unlock(&TASK->answerbox.lock); |
spinlock_unlock(&TASK->lock); |
interrupts_restore(ipl); |
} |
} |
} |
LOG("Exiting."); |
LOG("kbox: finished\n"); |
} |
206,10 → 145,10 |
/** |
* Connect phone to a task kernel-box specified by id. |
* |
* Note that this is not completely atomic. For optimisation reasons, the task |
* might start cleaning up kbox after the phone has been connected and before |
* a kbox thread has been created. This must be taken into account in the |
* cleanup code. |
* Note that this is not completely atomic. For optimisation reasons, |
* The task might start cleaning up kbox after the phone has been connected |
* and before a kbox thread has been created. This must be taken into account |
* in the cleanup code. |
* |
* @return Phone id on success, or negative error code. |
*/ |
235,45 → 174,44 |
spinlock_unlock(&tasks_lock); |
interrupts_restore(ipl); |
mutex_lock(&ta->kb.cleanup_lock); |
mutex_lock(&ta->kb_cleanup_lock); |
if (atomic_predec(&ta->refcount) == 0) { |
mutex_unlock(&ta->kb.cleanup_lock); |
mutex_unlock(&ta->kb_cleanup_lock); |
task_destroy(ta); |
return ENOENT; |
} |
if (ta->kb.finished != false) { |
mutex_unlock(&ta->kb.cleanup_lock); |
if (ta->kb_finished != false) { |
mutex_unlock(&ta->kb_cleanup_lock); |
return EINVAL; |
} |
newphid = phone_alloc(TASK); |
newphid = phone_alloc(); |
if (newphid < 0) { |
mutex_unlock(&ta->kb.cleanup_lock); |
mutex_unlock(&ta->kb_cleanup_lock); |
return ELIMIT; |
} |
/* Connect the newly allocated phone to the kbox */ |
ipc_phone_connect(&TASK->phones[newphid], &ta->kb.box); |
ipc_phone_connect(&TASK->phones[newphid], &ta->kernel_box); |
if (ta->kb.thread != NULL) { |
mutex_unlock(&ta->kb.cleanup_lock); |
if (ta->kb_thread != NULL) { |
mutex_unlock(&ta->kb_cleanup_lock); |
return newphid; |
} |
/* Create a kbox thread */ |
kb_thread = thread_create(kbox_thread_proc, NULL, ta, 0, |
"kbox", false); |
kb_thread = thread_create(kbox_thread_proc, NULL, ta, 0, "kbox", false); |
if (!kb_thread) { |
mutex_unlock(&ta->kb.cleanup_lock); |
mutex_unlock(&ta->kb_cleanup_lock); |
return ENOMEM; |
} |
ta->kb.thread = kb_thread; |
ta->kb_thread = kb_thread; |
thread_ready(kb_thread); |
mutex_unlock(&ta->kb.cleanup_lock); |
mutex_unlock(&ta->kb_cleanup_lock); |
return newphid; |
} |
/branches/arm/kernel/generic/src/ipc/ipcrsc.c |
---|
160,29 → 160,27 |
return result; |
} |
/** Allocate new phone slot in the specified task. |
/** Allocate new phone slot in the current TASK structure. |
* |
* @param t Task for which to allocate a new phone. |
* |
* @return New phone handle or -1 if the phone handle limit is |
* exceeded. |
*/ |
int phone_alloc(task_t *t) |
int phone_alloc(void) |
{ |
int i; |
spinlock_lock(&t->lock); |
spinlock_lock(&TASK->lock); |
for (i = 0; i < IPC_MAX_PHONES; i++) { |
if (t->phones[i].state == IPC_PHONE_HUNGUP && |
atomic_get(&t->phones[i].active_calls) == 0) |
t->phones[i].state = IPC_PHONE_FREE; |
if (TASK->phones[i].state == IPC_PHONE_HUNGUP && |
atomic_get(&TASK->phones[i].active_calls) == 0) |
TASK->phones[i].state = IPC_PHONE_FREE; |
if (t->phones[i].state == IPC_PHONE_FREE) { |
t->phones[i].state = IPC_PHONE_CONNECTING; |
if (TASK->phones[i].state == IPC_PHONE_FREE) { |
TASK->phones[i].state = IPC_PHONE_CONNECTING; |
break; |
} |
} |
spinlock_unlock(&t->lock); |
spinlock_unlock(&TASK->lock); |
if (i == IPC_MAX_PHONES) |
return -1; |
/branches/arm/kernel/generic/src/ipc/irq.c |
---|
44,28 → 44,8 |
* - ARG1: payload modified by a 'top-half' handler |
* - ARG2: payload modified by a 'top-half' handler |
* - ARG3: payload modified by a 'top-half' handler |
* - ARG4: payload modified by a 'top-half' handler |
* - ARG5: payload modified by a 'top-half' handler |
* - in_phone_hash: interrupt counter (may be needed to assure correct order |
* in multithreaded drivers) |
* |
* Note on synchronization for ipc_irq_register(), ipc_irq_unregister(), |
* ipc_irq_cleanup() and IRQ handlers: |
* |
* By always taking all of the uspace IRQ hash table lock, IRQ structure lock |
* and answerbox lock, we can rule out race conditions between the |
* registration functions and also the cleanup function. Thus the observer can |
* either see the IRQ structure present in both the hash table and the |
* answerbox list or absent in both. Views in which the IRQ structure would be |
* linked in the hash table but not in the answerbox list, or vice versa, are |
* not possible. |
* |
* By always taking the hash table lock and the IRQ structure lock, we can |
* rule out a scenario in which we would free up an IRQ structure, which is |
* still referenced by, for example, an IRQ handler. The locking scheme forces |
* us to lock the IRQ structure only after any progressing IRQs on that |
* structure are finished. Because we hold the hash table lock, we prevent new |
* IRQs from taking new references to the IRQ structure. |
*/ |
#include <arch.h> |
78,8 → 58,78 |
#include <console/console.h> |
#include <print.h> |
/** Free the top-half pseudocode. |
/** Execute code associated with IRQ notification. |
* |
* @param call Notification call. |
* @param code Top-half pseudocode. |
*/ |
static void code_execute(call_t *call, irq_code_t *code) |
{ |
unsigned int i; |
unative_t dstval = 0; |
if (!code) |
return; |
for (i = 0; i < code->cmdcount; i++) { |
switch (code->cmds[i].cmd) { |
case CMD_MEM_READ_1: |
dstval = *((uint8_t *) code->cmds[i].addr); |
break; |
case CMD_MEM_READ_2: |
dstval = *((uint16_t *) code->cmds[i].addr); |
break; |
case CMD_MEM_READ_4: |
dstval = *((uint32_t *) code->cmds[i].addr); |
break; |
case CMD_MEM_READ_8: |
dstval = *((uint64_t *) code->cmds[i].addr); |
break; |
case CMD_MEM_WRITE_1: |
*((uint8_t *) code->cmds[i].addr) = code->cmds[i].value; |
break; |
case CMD_MEM_WRITE_2: |
*((uint16_t *) code->cmds[i].addr) = |
code->cmds[i].value; |
break; |
case CMD_MEM_WRITE_4: |
*((uint32_t *) code->cmds[i].addr) = |
code->cmds[i].value; |
break; |
case CMD_MEM_WRITE_8: |
*((uint64_t *) code->cmds[i].addr) = |
code->cmds[i].value; |
break; |
#if defined(ia32) || defined(amd64) |
case CMD_PORT_READ_1: |
dstval = inb((long) code->cmds[i].addr); |
break; |
case CMD_PORT_WRITE_1: |
outb((long) code->cmds[i].addr, code->cmds[i].value); |
break; |
#endif |
#if defined(ia64) && defined(SKI) |
case CMD_IA64_GETCHAR: |
dstval = _getc(&ski_uconsole); |
break; |
#endif |
#if defined(ppc32) |
case CMD_PPC32_GETCHAR: |
dstval = cuda_get_scancode(); |
break; |
#endif |
default: |
break; |
} |
if (code->cmds[i].dstarg && code->cmds[i].dstarg < |
IPC_CALL_LEN) { |
call->data.args[code->cmds[i].dstarg] = dstval; |
} |
} |
} |
/** Free top-half pseudocode. |
* |
* @param code Pointer to the top-half pseudocode. |
*/ |
static void code_free(irq_code_t *code) |
90,7 → 140,7 |
} |
} |
/** Copy the top-half pseudocode from userspace into the kernel. |
/** Copy top-half pseudocode from userspace into the kernel. |
* |
* @param ucode Userspace address of the top-half pseudocode. |
* |
126,16 → 176,47 |
return code; |
} |
/** Unregister task from IRQ notification. |
* |
* @param box Answerbox associated with the notification. |
* @param inr IRQ number. |
* @param devno Device number. |
*/ |
void ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno) |
{ |
ipl_t ipl; |
irq_t *irq; |
ipl = interrupts_disable(); |
irq = irq_find_and_lock(inr, devno); |
if (irq) { |
if (irq->notif_cfg.answerbox == box) { |
code_free(irq->notif_cfg.code); |
irq->notif_cfg.notify = false; |
irq->notif_cfg.answerbox = NULL; |
irq->notif_cfg.code = NULL; |
irq->notif_cfg.method = 0; |
irq->notif_cfg.counter = 0; |
spinlock_lock(&box->irq_lock); |
list_remove(&irq->notif_cfg.link); |
spinlock_unlock(&box->irq_lock); |
spinlock_unlock(&irq->lock); |
} |
} |
interrupts_restore(ipl); |
} |
/** Register an answerbox as a receiving end for IRQ notifications. |
* |
* @param box Receiving answerbox. |
* @param inr IRQ number. |
* @param devno Device number. |
* @param method Method to be associated with the notification. |
* @param ucode Uspace pointer to top-half pseudocode. |
* @param box Receiving answerbox. |
* @param inr IRQ number. |
* @param devno Device number. |
* @param method Method to be associated with the notification. |
* @param ucode Uspace pointer to top-half pseudocode. |
* |
* @return EBADMEM, ENOENT or EEXISTS on failure or 0 on success. |
* |
* @return EBADMEM, ENOENT or EEXISTS on failure or 0 on success. |
*/ |
int ipc_irq_register(answerbox_t *box, inr_t inr, devno_t devno, |
unative_t method, irq_code_t *ucode) |
143,12 → 224,7 |
ipl_t ipl; |
irq_code_t *code; |
irq_t *irq; |
link_t *hlp; |
unative_t key[] = { |
(unative_t) inr, |
(unative_t) devno |
}; |
if (ucode) { |
code = code_from_uspace(ucode); |
if (!code) |
156,177 → 232,36 |
} else { |
code = NULL; |
} |
ipl = interrupts_disable(); |
irq = irq_find_and_lock(inr, devno); |
if (!irq) { |
interrupts_restore(ipl); |
code_free(code); |
return ENOENT; |
} |
/* |
* Allocate and populate the IRQ structure. |
*/ |
irq = malloc(sizeof(irq_t), 0); |
irq_initialize(irq); |
irq->devno = devno; |
irq->inr = inr; |
irq->claim = ipc_irq_top_half_claim; |
irq->handler = ipc_irq_top_half_handler; |
if (irq->notif_cfg.answerbox) { |
spinlock_unlock(&irq->lock); |
interrupts_restore(ipl); |
code_free(code); |
return EEXISTS; |
} |
irq->notif_cfg.notify = true; |
irq->notif_cfg.answerbox = box; |
irq->notif_cfg.method = method; |
irq->notif_cfg.code = code; |
irq->notif_cfg.counter = 0; |
/* |
* Enlist the IRQ structure in the uspace IRQ hash table and the |
* answerbox's list. |
*/ |
ipl = interrupts_disable(); |
spinlock_lock(&irq_uspace_hash_table_lock); |
hlp = hash_table_find(&irq_uspace_hash_table, key); |
if (hlp) { |
irq_t *hirq __attribute__((unused)) |
= hash_table_get_instance(hlp, irq_t, link); |
/* hirq is locked */ |
spinlock_unlock(&hirq->lock); |
code_free(code); |
spinlock_unlock(&irq_uspace_hash_table_lock); |
free(irq); |
interrupts_restore(ipl); |
return EEXISTS; |
} |
spinlock_lock(&irq->lock); /* Not really necessary, but paranoid */ |
spinlock_lock(&box->irq_lock); |
hash_table_insert(&irq_uspace_hash_table, key, &irq->link); |
list_append(&irq->notif_cfg.link, &box->irq_head); |
spinlock_unlock(&box->irq_lock); |
spinlock_unlock(&irq->lock); |
spinlock_unlock(&irq_uspace_hash_table_lock); |
interrupts_restore(ipl); |
return EOK; |
} |
/** Unregister task from IRQ notification. |
* |
* @param box Answerbox associated with the notification. |
* @param inr IRQ number. |
* @param devno Device number. |
*/ |
int ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno) |
{ |
ipl_t ipl; |
unative_t key[] = { |
(unative_t) inr, |
(unative_t) devno |
}; |
link_t *lnk; |
irq_t *irq; |
ipl = interrupts_disable(); |
spinlock_lock(&irq_uspace_hash_table_lock); |
lnk = hash_table_find(&irq_uspace_hash_table, key); |
if (!lnk) { |
spinlock_unlock(&irq_uspace_hash_table_lock); |
interrupts_restore(ipl); |
return ENOENT; |
} |
irq = hash_table_get_instance(lnk, irq_t, link); |
/* irq is locked */ |
spinlock_lock(&box->irq_lock); |
ASSERT(irq->notif_cfg.answerbox == box); |
/* Free up the pseudo code and associated structures. */ |
code_free(irq->notif_cfg.code); |
/* Remove the IRQ from the answerbox's list. */ |
list_remove(&irq->notif_cfg.link); |
/* |
* We need to drop the IRQ lock now because hash_table_remove() will try |
* to reacquire it. That basically violates the natural locking order, |
* but a deadlock in hash_table_remove() is prevented by the fact that |
* we already held the IRQ lock and didn't drop the hash table lock in |
* the meantime. |
*/ |
spinlock_unlock(&irq->lock); |
/* Remove the IRQ from the uspace IRQ hash table. */ |
hash_table_remove(&irq_uspace_hash_table, key, 2); |
spinlock_unlock(&irq_uspace_hash_table_lock); |
spinlock_unlock(&box->irq_lock); |
/* Free up the IRQ structure. */ |
free(irq); |
interrupts_restore(ipl); |
return EOK; |
} |
/** Disconnect all IRQ notifications from an answerbox. |
* |
* This function is effective because the answerbox contains |
* list of all irq_t structures that are registered to |
* send notifications to it. |
* |
* @param box Answerbox for which we want to carry out the cleanup. |
*/ |
void ipc_irq_cleanup(answerbox_t *box) |
{ |
ipl_t ipl; |
loop: |
ipl = interrupts_disable(); |
spinlock_lock(&irq_uspace_hash_table_lock); |
spinlock_lock(&box->irq_lock); |
while (box->irq_head.next != &box->irq_head) { |
link_t *cur = box->irq_head.next; |
irq_t *irq; |
DEADLOCK_PROBE_INIT(p_irqlock); |
unative_t key[2]; |
irq = list_get_instance(cur, irq_t, notif_cfg.link); |
if (!spinlock_trylock(&irq->lock)) { |
/* |
* Avoid deadlock by trying again. |
*/ |
spinlock_unlock(&box->irq_lock); |
spinlock_unlock(&irq_uspace_hash_table_lock); |
interrupts_restore(ipl); |
DEADLOCK_PROBE(p_irqlock, DEADLOCK_THRESHOLD); |
goto loop; |
} |
key[0] = irq->inr; |
key[1] = irq->devno; |
ASSERT(irq->notif_cfg.answerbox == box); |
/* Unlist from the answerbox. */ |
list_remove(&irq->notif_cfg.link); |
/* Free up the pseudo code and associated structures. */ |
code_free(irq->notif_cfg.code); |
/* |
* We need to drop the IRQ lock now because hash_table_remove() |
* will try to reacquire it. That basically violates the natural |
* locking order, but a deadlock in hash_table_remove() is |
* prevented by the fact that we already held the IRQ lock and |
* didn't drop the hash table lock in the meantime. |
*/ |
spinlock_unlock(&irq->lock); |
/* Remove from the hash table. */ |
hash_table_remove(&irq_uspace_hash_table, key, 2); |
free(irq); |
} |
spinlock_unlock(&box->irq_lock); |
spinlock_unlock(&irq_uspace_hash_table_lock); |
interrupts_restore(ipl); |
return 0; |
} |
/** Add a call to the proper answerbox queue. |
345,158 → 280,125 |
waitq_wakeup(&irq->notif_cfg.answerbox->wq, WAKEUP_FIRST); |
} |
/** Apply the top-half pseudo code to find out whether to accept the IRQ or not. |
/** Send notification message. |
* |
* @param irq IRQ structure. |
* |
* @return IRQ_ACCEPT if the interrupt is accepted by the |
* pseudocode. IRQ_DECLINE otherwise. |
* @param a1 Driver-specific payload argument. |
* @param a2 Driver-specific payload argument. |
* @param a3 Driver-specific payload argument. |
* @param a4 Driver-specific payload argument. |
* @param a5 Driver-specific payload argument. |
*/ |
irq_ownership_t ipc_irq_top_half_claim(irq_t *irq) |
void ipc_irq_send_msg(irq_t *irq, unative_t a1, unative_t a2, unative_t a3, |
unative_t a4, unative_t a5) |
{ |
unsigned int i; |
unative_t dstval; |
irq_code_t *code = irq->notif_cfg.code; |
unative_t *scratch = irq->notif_cfg.scratch; |
call_t *call; |
if (!irq->notif_cfg.notify) |
return IRQ_DECLINE; |
if (!code) |
return IRQ_DECLINE; |
for (i = 0; i < code->cmdcount; i++) { |
unsigned int srcarg = code->cmds[i].srcarg; |
unsigned int dstarg = code->cmds[i].dstarg; |
spinlock_lock(&irq->lock); |
if (irq->notif_cfg.answerbox) { |
call = ipc_call_alloc(FRAME_ATOMIC); |
if (!call) { |
spinlock_unlock(&irq->lock); |
return; |
} |
call->flags |= IPC_CALL_NOTIF; |
IPC_SET_METHOD(call->data, irq->notif_cfg.method); |
IPC_SET_ARG1(call->data, a1); |
IPC_SET_ARG2(call->data, a2); |
IPC_SET_ARG3(call->data, a3); |
IPC_SET_ARG4(call->data, a4); |
IPC_SET_ARG5(call->data, a5); |
/* Put a counter to the message */ |
call->priv = ++irq->notif_cfg.counter; |
if (srcarg >= IPC_CALL_LEN) |
break; |
if (dstarg >= IPC_CALL_LEN) |
break; |
switch (code->cmds[i].cmd) { |
case CMD_PIO_READ_8: |
dstval = pio_read_8((ioport8_t *) code->cmds[i].addr); |
if (dstarg) |
scratch[dstarg] = dstval; |
break; |
case CMD_PIO_READ_16: |
dstval = pio_read_16((ioport16_t *) code->cmds[i].addr); |
if (dstarg) |
scratch[dstarg] = dstval; |
break; |
case CMD_PIO_READ_32: |
dstval = pio_read_32((ioport32_t *) code->cmds[i].addr); |
if (dstarg) |
scratch[dstarg] = dstval; |
break; |
case CMD_PIO_WRITE_8: |
pio_write_8((ioport8_t *) code->cmds[i].addr, |
(uint8_t) code->cmds[i].value); |
break; |
case CMD_PIO_WRITE_16: |
pio_write_16((ioport16_t *) code->cmds[i].addr, |
(uint16_t) code->cmds[i].value); |
break; |
case CMD_PIO_WRITE_32: |
pio_write_32((ioport32_t *) code->cmds[i].addr, |
(uint32_t) code->cmds[i].value); |
break; |
case CMD_BTEST: |
if (srcarg && dstarg) { |
dstval = scratch[srcarg] & code->cmds[i].value; |
scratch[dstarg] = dstval; |
} |
break; |
case CMD_PREDICATE: |
if (srcarg && !scratch[srcarg]) { |
i += code->cmds[i].value; |
continue; |
} |
break; |
case CMD_ACCEPT: |
return IRQ_ACCEPT; |
break; |
case CMD_DECLINE: |
default: |
return IRQ_DECLINE; |
} |
send_call(irq, call); |
} |
return IRQ_DECLINE; |
spinlock_unlock(&irq->lock); |
} |
/* IRQ top-half handler. |
/** Notify a task that an IRQ had occurred. |
* |
* We expect interrupts to be disabled and the irq->lock already held. |
* |
* @param irq IRQ structure. |
*/ |
void ipc_irq_top_half_handler(irq_t *irq) |
void ipc_irq_send_notif(irq_t *irq) |
{ |
call_t *call; |
ASSERT(irq); |
if (irq->notif_cfg.answerbox) { |
call_t *call; |
call = ipc_call_alloc(FRAME_ATOMIC); |
if (!call) |
if (!call) { |
return; |
} |
call->flags |= IPC_CALL_NOTIF; |
/* Put a counter to the message */ |
call->priv = ++irq->notif_cfg.counter; |
/* Set up args */ |
IPC_SET_METHOD(call->data, irq->notif_cfg.method); |
IPC_SET_ARG1(call->data, irq->notif_cfg.scratch[1]); |
IPC_SET_ARG2(call->data, irq->notif_cfg.scratch[2]); |
IPC_SET_ARG3(call->data, irq->notif_cfg.scratch[3]); |
IPC_SET_ARG4(call->data, irq->notif_cfg.scratch[4]); |
IPC_SET_ARG5(call->data, irq->notif_cfg.scratch[5]); |
/* Execute code to handle irq */ |
code_execute(call, irq->notif_cfg.code); |
send_call(irq, call); |
} |
} |
/** Send notification message. |
/** Disconnect all IRQ notifications from an answerbox. |
* |
* @param irq IRQ structure. |
* @param a1 Driver-specific payload argument. |
* @param a2 Driver-specific payload argument. |
* @param a3 Driver-specific payload argument. |
* @param a4 Driver-specific payload argument. |
* @param a5 Driver-specific payload argument. |
* This function is effective because the answerbox contains |
* list of all irq_t structures that are registered to |
* send notifications to it. |
* |
* @param box Answerbox for which we want to carry out the cleanup. |
*/ |
void ipc_irq_send_msg(irq_t *irq, unative_t a1, unative_t a2, unative_t a3, |
unative_t a4, unative_t a5) |
void ipc_irq_cleanup(answerbox_t *box) |
{ |
call_t *call; |
spinlock_lock(&irq->lock); |
if (irq->notif_cfg.answerbox) { |
call = ipc_call_alloc(FRAME_ATOMIC); |
if (!call) { |
spinlock_unlock(&irq->lock); |
return; |
ipl_t ipl; |
loop: |
ipl = interrupts_disable(); |
spinlock_lock(&box->irq_lock); |
while (box->irq_head.next != &box->irq_head) { |
link_t *cur = box->irq_head.next; |
irq_t *irq; |
DEADLOCK_PROBE_INIT(p_irqlock); |
irq = list_get_instance(cur, irq_t, notif_cfg.link); |
if (!spinlock_trylock(&irq->lock)) { |
/* |
* Avoid deadlock by trying again. |
*/ |
spinlock_unlock(&box->irq_lock); |
interrupts_restore(ipl); |
DEADLOCK_PROBE(p_irqlock, DEADLOCK_THRESHOLD); |
goto loop; |
} |
call->flags |= IPC_CALL_NOTIF; |
/* Put a counter to the message */ |
call->priv = ++irq->notif_cfg.counter; |
ASSERT(irq->notif_cfg.answerbox == box); |
list_remove(&irq->notif_cfg.link); |
/* |
* Don't forget to free any top-half pseudocode. |
*/ |
code_free(irq->notif_cfg.code); |
irq->notif_cfg.notify = false; |
irq->notif_cfg.answerbox = NULL; |
irq->notif_cfg.code = NULL; |
irq->notif_cfg.method = 0; |
irq->notif_cfg.counter = 0; |
IPC_SET_METHOD(call->data, irq->notif_cfg.method); |
IPC_SET_ARG1(call->data, a1); |
IPC_SET_ARG2(call->data, a2); |
IPC_SET_ARG3(call->data, a3); |
IPC_SET_ARG4(call->data, a4); |
IPC_SET_ARG5(call->data, a5); |
send_call(irq, call); |
spinlock_unlock(&irq->lock); |
} |
spinlock_unlock(&irq->lock); |
spinlock_unlock(&box->irq_lock); |
interrupts_restore(ipl); |
} |
/** @} |
/branches/arm/kernel/generic/src/udebug/udebug_ipc.c |
---|
73,7 → 73,7 |
rc = udebug_begin(call); |
if (rc < 0) { |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
return; |
} |
83,7 → 83,7 |
*/ |
if (rc != 0) { |
IPC_SET_RETVAL(call->data, 0); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
} |
} |
99,7 → 99,7 |
rc = udebug_end(); |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
} |
/** Process a SET_EVMASK call. |
116,7 → 116,7 |
rc = udebug_set_evmask(mask); |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
} |
135,7 → 135,7 |
rc = udebug_go(t, call); |
if (rc < 0) { |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
return; |
} |
} |
154,7 → 154,7 |
rc = udebug_stop(t, call); |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
} |
/** Process a THREAD_READ call. |
182,7 → 182,7 |
rc = udebug_thread_read(&buffer, buf_size, &n); |
if (rc < 0) { |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
return; |
} |
209,7 → 209,7 |
IPC_SET_ARG3(call->data, total_bytes); |
call->buffer = buffer; |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
} |
/** Process an ARGS_READ call. |
229,7 → 229,7 |
rc = udebug_args_read(t, &buffer); |
if (rc != EOK) { |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
return; |
} |
247,7 → 247,7 |
IPC_SET_ARG2(call->data, 6 * sizeof(unative_t)); |
call->buffer = buffer; |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
} |
/** Process an MEM_READ call. |
270,7 → 270,7 |
rc = udebug_mem_read(uspace_src, size, &buffer); |
if (rc < 0) { |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
return; |
} |
282,7 → 282,7 |
IPC_SET_ARG2(call->data, size); |
call->buffer = buffer; |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
} |
/** Handle a debug call received on the kernel answerbox. |
306,7 → 306,7 |
*/ |
if (TASK->udebug.debugger != call->sender) { |
IPC_SET_RETVAL(call->data, EINVAL); |
ipc_answer(&TASK->kb.box, call); |
ipc_answer(&TASK->kernel_box, call); |
return; |
} |
} |
/branches/arm/kernel/generic/src/udebug/udebug.c |
---|
35,6 → 35,18 |
* @brief Udebug hooks and data structure management. |
* |
* Udebug is an interface that makes userspace debuggers possible. |
* |
* Functions in this file are executed directly in each thread, which |
* may or may not be the subject of debugging. The udebug_stoppable_begin/end() |
* functions are also executed in the clock interrupt handler. To avoid |
* deadlock, functions in this file are protected from the interrupt |
* by locking the recursive lock THREAD->udebug.int_lock (just an atomic |
* variable). This prevents udebug_stoppable_begin/end() from being |
* executed in the interrupt handler (they are skipped). |
* |
* Functions in udebug_ops.c and udebug_ipc.c execute in different threads, |
* so they needn't be protected from the (preemptible) interrupt-initiated |
* code. |
*/ |
#include <synch/waitq.h> |
41,10 → 53,18 |
#include <debug.h> |
#include <udebug/udebug.h> |
#include <errno.h> |
#include <print.h> |
#include <arch.h> |
static inline void udebug_int_lock(void) |
{ |
atomic_inc(&THREAD->udebug.int_lock); |
} |
static inline void udebug_int_unlock(void) |
{ |
atomic_dec(&THREAD->udebug.int_lock); |
} |
/** Initialize udebug part of task structure. |
* |
* Called as part of task structure initialization. |
69,11 → 89,15 |
mutex_initialize(&ut->lock, MUTEX_PASSIVE); |
waitq_initialize(&ut->go_wq); |
/* |
* At the beginning the thread is stoppable, so int_lock be set, too. |
*/ |
atomic_set(&ut->int_lock, 1); |
ut->go_call = NULL; |
ut->uspace_state = NULL; |
ut->go = false; |
ut->stop = true; |
ut->stoppable = true; |
ut->active = false; |
ut->debug_active = false; |
ut->cur_event = 0; /* none */ |
} |
98,6 → 122,27 |
waitq_sleep_finish(wq, rc, ipl); |
} |
/** Do a preliminary check that a debugging session is in progress. |
* |
* This only requires the THREAD->udebug.lock mutex (and not TASK->udebug.lock |
* mutex). For an undebugged task, this will never block (while there could be |
* collisions by different threads on the TASK mutex), thus improving SMP |
* perormance for undebugged tasks. |
* |
* @return True if the thread was in a debugging session when the function |
* checked, false otherwise. |
*/ |
static bool udebug_thread_precheck(void) |
{ |
bool res; |
mutex_lock(&THREAD->udebug.lock); |
res = THREAD->udebug.debug_active; |
mutex_unlock(&THREAD->udebug.lock); |
return res; |
} |
/** Start of stoppable section. |
* |
* A stoppable section is a section of code where if the thread can be stoped. In other words, |
116,6 → 161,14 |
ASSERT(THREAD); |
ASSERT(TASK); |
udebug_int_lock(); |
/* Early check for undebugged tasks */ |
if (!udebug_thread_precheck()) { |
udebug_int_unlock(); |
return; |
} |
mutex_lock(&TASK->udebug.lock); |
nsc = --TASK->udebug.not_stoppable_count; |
145,8 → 198,7 |
* Active debugging session |
*/ |
if (THREAD->udebug.active == true && |
THREAD->udebug.go == false) { |
if (THREAD->udebug.debug_active && THREAD->udebug.stop) { |
/* |
* Thread was requested to stop - answer go call |
*/ |
176,11 → 228,18 |
*/ |
void udebug_stoppable_end(void) |
{ |
/* Early check for undebugged tasks */ |
if (!udebug_thread_precheck()) { |
udebug_int_unlock(); |
return; |
} |
restart: |
mutex_lock(&TASK->udebug.lock); |
mutex_lock(&THREAD->udebug.lock); |
if (THREAD->udebug.active && THREAD->udebug.go == false) { |
if (THREAD->udebug.debug_active && |
THREAD->udebug.stop == true) { |
TASK->udebug.begin_call = NULL; |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
188,7 → 247,7 |
udebug_wait_for_go(&THREAD->udebug.go_wq); |
goto restart; |
/* Must try again - have to lose stoppability atomically. */ |
/* must try again - have to lose stoppability atomically */ |
} else { |
++TASK->udebug.not_stoppable_count; |
ASSERT(THREAD->udebug.stoppable == true); |
197,17 → 256,44 |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
} |
udebug_int_unlock(); |
} |
/** Upon being scheduled to run, check if the current thread should stop. |
* |
* This function is called from clock(). |
* This function is called from clock(). Preemption is enabled. |
* interrupts are disabled, but since this is called after |
* being scheduled-in, we can enable them, if we're careful enough |
* not to allow arbitrary recursion or deadlock with the thread context. |
*/ |
void udebug_before_thread_runs(void) |
{ |
ipl_t ipl; |
return; |
ASSERT(!PREEMPTION_DISABLED); |
/* |
* Prevent agains re-entering, such as when preempted inside this |
* function. |
*/ |
if (atomic_get(&THREAD->udebug.int_lock) != 0) |
return; |
udebug_int_lock(); |
ipl = interrupts_enable(); |
/* Now we're free to do whatever we need (lock mutexes, sleep, etc.) */ |
/* Check if we're supposed to stop */ |
udebug_stoppable_begin(); |
udebug_stoppable_end(); |
interrupts_restore(ipl); |
udebug_int_unlock(); |
} |
/** Syscall event hook. |
224,11 → 310,20 |
etype = end_variant ? UDEBUG_EVENT_SYSCALL_E : UDEBUG_EVENT_SYSCALL_B; |
udebug_int_lock(); |
/* Early check for undebugged tasks */ |
if (!udebug_thread_precheck()) { |
udebug_int_unlock(); |
return; |
} |
mutex_lock(&TASK->udebug.lock); |
mutex_lock(&THREAD->udebug.lock); |
/* Must only generate events when in debugging session and is go. */ |
if (THREAD->udebug.active != true || THREAD->udebug.go == false || |
/* Must only generate events when in debugging session and have go */ |
if (THREAD->udebug.debug_active != true || |
THREAD->udebug.stop == true || |
(TASK->udebug.evmask & UDEBUG_EVMASK(etype)) == 0) { |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
235,7 → 330,7 |
return; |
} |
/* Fill in the GO response. */ |
//printf("udebug_syscall_event\n"); |
call = THREAD->udebug.go_call; |
THREAD->udebug.go_call = NULL; |
243,6 → 338,7 |
IPC_SET_ARG1(call->data, etype); |
IPC_SET_ARG2(call->data, id); |
IPC_SET_ARG3(call->data, rc); |
//printf("udebug_syscall_event/ipc_answer\n"); |
THREAD->udebug.syscall_args[0] = a1; |
THREAD->udebug.syscall_args[1] = a2; |
252,11 → 348,11 |
THREAD->udebug.syscall_args[5] = a6; |
/* |
* Make sure udebug.go is false when going to sleep |
* Make sure udebug.stop is true when going to sleep |
* in case we get woken up by DEBUG_END. (At which |
* point it must be back to the initial true value). |
*/ |
THREAD->udebug.go = false; |
THREAD->udebug.stop = true; |
THREAD->udebug.cur_event = etype; |
ipc_answer(&TASK->answerbox, call); |
265,46 → 361,42 |
mutex_unlock(&TASK->udebug.lock); |
udebug_wait_for_go(&THREAD->udebug.go_wq); |
udebug_int_unlock(); |
} |
/** Thread-creation event hook combined with attaching the thread. |
/** Thread-creation event hook. |
* |
* Must be called when a new userspace thread is created in the debugged |
* task. Generates a THREAD_B event. Also attaches the thread @a t |
* to the task @a ta. |
* task. Generates a THREAD_B event. |
* |
* This is necessary to avoid a race condition where the BEGIN and THREAD_READ |
* requests would be handled inbetween attaching the thread and checking it |
* for being in a debugging session to send the THREAD_B event. We could then |
* either miss threads or get some threads both in the thread list |
* and get a THREAD_B event for them. |
* |
* @param t Structure of the thread being created. Not locked, as the |
* thread is not executing yet. |
* @param ta Task to which the thread should be attached. |
*/ |
void udebug_thread_b_event_attach(struct thread *t, struct task *ta) |
void udebug_thread_b_event(struct thread *t) |
{ |
call_t *call; |
udebug_int_lock(); |
mutex_lock(&TASK->udebug.lock); |
mutex_lock(&THREAD->udebug.lock); |
thread_attach(t, ta); |
LOG("udebug_thread_b_event\n"); |
LOG("- check state\n"); |
LOG("Check state"); |
/* Must only generate events when in debugging session */ |
if (THREAD->udebug.active != true) { |
LOG("udebug.active: %s, udebug.go: %s", |
THREAD->udebug.active ? "Yes(+)" : "No", |
THREAD->udebug.go ? "Yes(-)" : "No"); |
if (THREAD->udebug.debug_active != true) { |
LOG("- debug_active: %s, udebug.stop: %s\n", |
THREAD->udebug.debug_active ? "yes(+)" : "no(-)", |
THREAD->udebug.stop ? "yes(-)" : "no(+)"); |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
return; |
} |
LOG("Trigger event"); |
LOG("- trigger event\n"); |
call = THREAD->udebug.go_call; |
THREAD->udebug.go_call = NULL; |
IPC_SET_RETVAL(call->data, 0); |
312,11 → 404,11 |
IPC_SET_ARG2(call->data, (unative_t)t); |
/* |
* Make sure udebug.go is false when going to sleep |
* Make sure udebug.stop is true when going to sleep |
* in case we get woken up by DEBUG_END. (At which |
* point it must be back to the initial true value). |
*/ |
THREAD->udebug.go = false; |
THREAD->udebug.stop = true; |
THREAD->udebug.cur_event = UDEBUG_EVENT_THREAD_B; |
ipc_answer(&TASK->answerbox, call); |
324,8 → 416,10 |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
LOG("Wait for Go"); |
LOG("- sleep\n"); |
udebug_wait_for_go(&THREAD->udebug.go_wq); |
udebug_int_unlock(); |
} |
/** Thread-termination event hook. |
337,31 → 431,35 |
{ |
call_t *call; |
udebug_int_lock(); |
mutex_lock(&TASK->udebug.lock); |
mutex_lock(&THREAD->udebug.lock); |
LOG("Check state"); |
LOG("udebug_thread_e_event\n"); |
LOG("- check state\n"); |
/* Must only generate events when in debugging session. */ |
if (THREAD->udebug.active != true) { |
LOG("udebug.active: %s, udebug.go: %s", |
THREAD->udebug.active ? "Yes" : "No", |
THREAD->udebug.go ? "Yes" : "No"); |
/* Must only generate events when in debugging session */ |
if (THREAD->udebug.debug_active != true) { |
/* printf("- debug_active: %s, udebug.stop: %s\n", |
THREAD->udebug.debug_active ? "yes(+)" : "no(-)", |
THREAD->udebug.stop ? "yes(-)" : "no(+)");*/ |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
return; |
} |
LOG("Trigger event"); |
LOG("- trigger event\n"); |
call = THREAD->udebug.go_call; |
THREAD->udebug.go_call = NULL; |
IPC_SET_RETVAL(call->data, 0); |
IPC_SET_ARG1(call->data, UDEBUG_EVENT_THREAD_E); |
/* Prevent any further debug activity in thread. */ |
THREAD->udebug.active = false; |
/* Prevent any further debug activity in thread */ |
THREAD->udebug.debug_active = false; |
THREAD->udebug.cur_event = 0; /* none */ |
THREAD->udebug.go = false; /* set to initial value */ |
THREAD->udebug.stop = true; /* set to initial value */ |
ipc_answer(&TASK->answerbox, call); |
368,10 → 466,8 |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
/* |
* This event does not sleep - debugging has finished |
* in this thread. |
*/ |
/* Leave int_lock enabled */ |
/* This event does not sleep - debugging has finished in this thread */ |
} |
/** |
391,13 → 487,17 |
int flags; |
ipl_t ipl; |
LOG("udebug_task_cleanup()\n"); |
LOG("task %" PRIu64 "\n", ta->taskid); |
udebug_int_lock(); |
if (ta->udebug.dt_state != UDEBUG_TS_BEGINNING && |
ta->udebug.dt_state != UDEBUG_TS_ACTIVE) { |
LOG("udebug_task_cleanup(): task not being debugged\n"); |
return EINVAL; |
} |
LOG("Task %" PRIu64, ta->taskid); |
/* Finish debugging of all userspace threads */ |
for (cur = ta->th_head.next; cur != &ta->th_head; cur = cur->next) { |
t = list_get_instance(cur, thread_t, th_link); |
412,22 → 512,22 |
spinlock_unlock(&t->lock); |
interrupts_restore(ipl); |
/* Only process userspace threads. */ |
/* Only process userspace threads */ |
if ((flags & THREAD_FLAG_USPACE) != 0) { |
/* Prevent any further debug activity in thread. */ |
t->udebug.active = false; |
/* Prevent any further debug activity in thread */ |
t->udebug.debug_active = false; |
t->udebug.cur_event = 0; /* none */ |
/* Is the thread still go? */ |
if (t->udebug.go == true) { |
/* Still has go? */ |
if (t->udebug.stop == false) { |
/* |
* Yes, so clear go. As active == false, |
* Yes, so clear go. As debug_active == false, |
* this doesn't affect anything. |
*/ |
t->udebug.go = false; |
t->udebug.stop = true; |
/* Answer GO call */ |
LOG("Answer GO call with EVENT_FINISHED."); |
LOG("answer GO call with EVENT_FINISHED\n"); |
IPC_SET_RETVAL(t->udebug.go_call->data, 0); |
IPC_SET_ARG1(t->udebug.go_call->data, |
UDEBUG_EVENT_FINISHED); |
453,6 → 553,8 |
ta->udebug.dt_state = UDEBUG_TS_INACTIVE; |
ta->udebug.debugger = NULL; |
udebug_int_unlock(); |
return 0; |
} |
/branches/arm/kernel/generic/src/udebug/udebug_ops.c |
---|
44,7 → 44,6 |
#include <proc/thread.h> |
#include <arch.h> |
#include <errno.h> |
#include <print.h> |
#include <syscall/copy.h> |
#include <ipc/ipc.h> |
#include <udebug/udebug.h> |
58,8 → 57,8 |
* |
* Specifically, verifies that thread t exists, is a userspace thread, |
* and belongs to the current task (TASK). Verifies, that the thread |
* is (or is not) go according to being_go (typically false). |
* It also locks t->udebug.lock, making sure that t->udebug.active |
* has (or hasn't) go according to having_go (typically false). |
* It also locks t->udebug.lock, making sure that t->udebug.debug_active |
* is true - that the thread is in a valid debugging session. |
* |
* With this verified and the t->udebug.lock mutex held, it is ensured |
71,11 → 70,11 |
* the t->lock spinlock to the t->udebug.lock mutex. |
* |
* @param t Pointer, need not at all be valid. |
* @param being_go Required thread state. |
* @param having_go Required thread state. |
* |
* Returns EOK if all went well, or an error code otherwise. |
*/ |
static int _thread_op_begin(thread_t *t, bool being_go) |
static int _thread_op_begin(thread_t *t, bool having_go) |
{ |
task_id_t taskid; |
ipl_t ipl; |
99,7 → 98,7 |
spinlock_lock(&t->lock); |
spinlock_unlock(&threads_lock); |
/* Verify that 't' is a userspace thread. */ |
/* Verify that 't' is a userspace thread */ |
if ((t->flags & THREAD_FLAG_USPACE) == 0) { |
/* It's not, deny its existence */ |
spinlock_unlock(&t->lock); |
108,8 → 107,8 |
return ENOENT; |
} |
/* Verify debugging state. */ |
if (t->udebug.active != true) { |
/* Verify debugging state */ |
if (t->udebug.debug_active != true) { |
/* Not in debugging session or undesired GO state */ |
spinlock_unlock(&t->lock); |
interrupts_restore(ipl); |
118,16 → 117,16 |
} |
/* |
* Since the thread has active == true, TASK->udebug.lock |
* is enough to ensure its existence and that active remains |
* Since the thread has debug_active == true, TASK->udebug.lock |
* is enough to ensure its existence and that debug_active remains |
* true. |
*/ |
spinlock_unlock(&t->lock); |
interrupts_restore(ipl); |
/* Only mutex TASK->udebug.lock left. */ |
/* Only mutex TASK->udebug.lock left */ |
/* Now verify that the thread belongs to the current task. */ |
/* Now verify that the thread belongs to the current task */ |
if (t->task != TASK) { |
/* No such thread belonging this task*/ |
mutex_unlock(&TASK->udebug.lock); |
140,18 → 139,18 |
*/ |
mutex_lock(&t->udebug.lock); |
/* The big task mutex is no longer needed. */ |
/* The big task mutex is no longer needed */ |
mutex_unlock(&TASK->udebug.lock); |
if (t->udebug.go != being_go) { |
/* Not in debugging session or undesired GO state. */ |
if (!t->udebug.stop != having_go) { |
/* Not in debugging session or undesired GO state */ |
mutex_unlock(&t->udebug.lock); |
return EINVAL; |
} |
/* Only t->udebug.lock left. */ |
/* Only t->udebug.lock left */ |
return EOK; /* All went well. */ |
return EOK; /* All went well */ |
} |
/** End debugging operation on a thread. */ |
181,11 → 180,15 |
thread_t *t; |
link_t *cur; |
LOG("Debugging task %llu", TASK->taskid); |
LOG("udebug_begin()\n"); |
mutex_lock(&TASK->udebug.lock); |
LOG("debugging task %llu\n", TASK->taskid); |
if (TASK->udebug.dt_state != UDEBUG_TS_INACTIVE) { |
mutex_unlock(&TASK->udebug.lock); |
LOG("udebug_begin(): busy error\n"); |
return EBUSY; |
} |
201,7 → 204,7 |
reply = 0; /* no reply */ |
} |
/* Set udebug.active on all of the task's userspace threads. */ |
/* Set udebug.debug_active on all of the task's userspace threads */ |
for (cur = TASK->th_head.next; cur != &TASK->th_head; cur = cur->next) { |
t = list_get_instance(cur, thread_t, th_link); |
208,11 → 211,15 |
mutex_lock(&t->udebug.lock); |
if ((t->flags & THREAD_FLAG_USPACE) != 0) |
t->udebug.active = true; |
t->udebug.debug_active = true; |
mutex_unlock(&t->udebug.lock); |
} |
mutex_unlock(&TASK->udebug.lock); |
LOG("udebug_begin() done (%s)\n", |
reply ? "reply" : "stoppability wait"); |
return reply; |
} |
225,10 → 232,13 |
{ |
int rc; |
LOG("Task %" PRIu64, TASK->taskid); |
LOG("udebug_end()\n"); |
mutex_lock(&TASK->udebug.lock); |
LOG("task %" PRIu64 "\n", TASK->taskid); |
rc = udebug_task_cleanup(TASK); |
mutex_unlock(&TASK->udebug.lock); |
return rc; |
243,16 → 253,19 |
*/ |
int udebug_set_evmask(udebug_evmask_t mask) |
{ |
LOG("mask = 0x%x", mask); |
LOG("udebug_set_mask()\n"); |
mutex_lock(&TASK->udebug.lock); |
if (TASK->udebug.dt_state != UDEBUG_TS_ACTIVE) { |
mutex_unlock(&TASK->udebug.lock); |
LOG("udebug_set_mask(): not active debuging session\n"); |
return EINVAL; |
} |
TASK->udebug.evmask = mask; |
mutex_unlock(&TASK->udebug.lock); |
return 0; |
260,7 → 273,7 |
/** Give thread GO. |
* |
* Upon recieving a go message, the thread is given GO. Being GO |
* Upon recieving a go message, the thread is given GO. Having GO |
* means the thread is allowed to execute userspace code (until |
* a debugging event or STOP occurs, at which point the thread loses GO. |
* |
271,7 → 284,7 |
{ |
int rc; |
/* On success, this will lock t->udebug.lock. */ |
/* On success, this will lock t->udebug.lock */ |
rc = _thread_op_begin(t, false); |
if (rc != EOK) { |
return rc; |
278,11 → 291,11 |
} |
t->udebug.go_call = call; |
t->udebug.go = true; |
t->udebug.stop = false; |
t->udebug.cur_event = 0; /* none */ |
/* |
* Neither t's lock nor threads_lock may be held during wakeup. |
* Neither t's lock nor threads_lock may be held during wakeup |
*/ |
waitq_wakeup(&t->udebug.go_wq, WAKEUP_FIRST); |
303,7 → 316,8 |
{ |
int rc; |
LOG("udebug_stop()"); |
LOG("udebug_stop()\n"); |
mutex_lock(&TASK->udebug.lock); |
/* |
* On success, this will lock t->udebug.lock. Note that this makes sure |
314,34 → 328,36 |
return rc; |
} |
/* Take GO away from the thread. */ |
t->udebug.go = false; |
/* Take GO away from the thread */ |
t->udebug.stop = true; |
if (t->udebug.stoppable != true) { |
/* Answer will be sent when the thread becomes stoppable. */ |
if (!t->udebug.stoppable) { |
/* Answer will be sent when the thread becomes stoppable */ |
_thread_op_end(t); |
return 0; |
} |
/* |
* Answer GO call. |
* Answer GO call |
*/ |
LOG("udebug_stop - answering go call\n"); |
/* Make sure nobody takes this call away from us. */ |
/* Make sure nobody takes this call away from us */ |
call = t->udebug.go_call; |
t->udebug.go_call = NULL; |
IPC_SET_RETVAL(call->data, 0); |
IPC_SET_ARG1(call->data, UDEBUG_EVENT_STOP); |
LOG("udebug_stop/ipc_answer\n"); |
THREAD->udebug.cur_event = UDEBUG_EVENT_STOP; |
_thread_op_end(t); |
mutex_lock(&TASK->udebug.lock); |
ipc_answer(&TASK->answerbox, call); |
mutex_unlock(&TASK->udebug.lock); |
LOG("udebog_stop/done\n"); |
return 0; |
} |
375,7 → 391,7 |
int flags; |
size_t max_ids; |
LOG("udebug_thread_read()"); |
LOG("udebug_thread_read()\n"); |
/* Allocate a buffer to hold thread IDs */ |
id_buffer = malloc(buf_size, 0); |
406,7 → 422,7 |
flags = t->flags; |
spinlock_unlock(&t->lock); |
/* Not interested in kernel threads. */ |
/* Not interested in kernel threads */ |
if ((flags & THREAD_FLAG_USPACE) != 0) { |
/* Using thread struct pointer as identification hash */ |
tid = (unative_t) t; |
442,16 → 458,16 |
int rc; |
unative_t *arg_buffer; |
/* Prepare a buffer to hold the arguments. */ |
/* Prepare a buffer to hold the arguments */ |
arg_buffer = malloc(6 * sizeof(unative_t), 0); |
/* On success, this will lock t->udebug.lock. */ |
/* On success, this will lock t->udebug.lock */ |
rc = _thread_op_begin(t, false); |
if (rc != EOK) { |
return rc; |
} |
/* Additionally we need to verify that we are inside a syscall. */ |
/* Additionally we need to verify that we are inside a syscall */ |
if (t->udebug.cur_event != UDEBUG_EVENT_SYSCALL_B && |
t->udebug.cur_event != UDEBUG_EVENT_SYSCALL_E) { |
_thread_op_end(t); |
458,7 → 474,7 |
return EINVAL; |
} |
/* Copy to a local buffer before releasing the lock. */ |
/* Copy to a local buffer before releasing the lock */ |
memcpy(arg_buffer, t->udebug.syscall_args, 6 * sizeof(unative_t)); |
_thread_op_end(t); |
/branches/arm/kernel/generic/src/console/cmd.c |
---|
31,8 → 31,8 |
*/ |
/** |
* @file cmd.c |
* @brief Kernel console command wrappers. |
* @file cmd.c |
* @brief Kernel console command wrappers. |
* |
* This file is meant to contain all wrapper functions for |
* all kconsole commands. The point is in separating |
50,9 → 50,9 |
#include <arch.h> |
#include <config.h> |
#include <func.h> |
#include <string.h> |
#include <macros.h> |
#include <debug.h> |
#include <symtab.h> |
#include <cpu.h> |
#include <mm/tlb.h> |
#include <arch/mm/tlb.h> |
64,9 → 64,6 |
#include <proc/task.h> |
#include <ipc/ipc.h> |
#include <ipc/irq.h> |
#include <ipc/event.h> |
#include <symtab.h> |
#include <errno.h> |
#ifdef CONFIG_TEST |
#include <test.h> |
81,6 → 78,12 |
.argc = 0 |
}; |
static cmd_info_t exit_info = { |
.name = "exit", |
.description = "Exit kconsole.", |
.argc = 0 |
}; |
static int cmd_reboot(cmd_arg_t *argv); |
static cmd_info_t reboot_info = { |
.name = "reboot", |
453,6 → 456,7 |
&continue_info, |
&cpus_info, |
&desc_info, |
&exit_info, |
&reboot_info, |
&uptime_info, |
&halt_info, |
497,7 → 501,7 |
for (i = 0; basic_commands[i]; i++) { |
cmd_initialize(basic_commands[i]); |
if (!cmd_register(basic_commands[i])) |
printf("Cannot register command %s\n", basic_commands[i]->name); |
panic("could not register command %s\n", basic_commands[i]->name); |
} |
} |
510,31 → 514,23 |
*/ |
int cmd_help(cmd_arg_t *argv) |
{ |
link_t *cur; |
spinlock_lock(&cmd_lock); |
link_t *cur; |
size_t len = 0; |
for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) { |
cmd_info_t *hlp; |
hlp = list_get_instance(cur, cmd_info_t, link); |
spinlock_lock(&hlp->lock); |
if (str_length(hlp->name) > len) |
len = str_length(hlp->name); |
spinlock_unlock(&hlp->lock); |
} |
for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) { |
cmd_info_t *hlp; |
hlp = list_get_instance(cur, cmd_info_t, link); |
spinlock_lock(&hlp->lock); |
printf("%-*s %s\n", len, hlp->name, hlp->description); |
printf("%s - %s\n", hlp->name, hlp->description); |
spinlock_unlock(&hlp->lock); |
} |
spinlock_unlock(&cmd_lock); |
spinlock_unlock(&cmd_lock); |
return 1; |
} |
582,7 → 578,7 |
int cmd_desc(cmd_arg_t *argv) |
{ |
link_t *cur; |
spinlock_lock(&cmd_lock); |
for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) { |
590,8 → 586,8 |
hlp = list_get_instance(cur, cmd_info_t, link); |
spinlock_lock(&hlp->lock); |
if (str_lcmp(hlp->name, (const char *) argv->buffer, str_length(hlp->name)) == 0) { |
if (strncmp(hlp->name, (const char *) argv->buffer, strlen(hlp->name)) == 0) { |
printf("%s - %s\n", hlp->name, hlp->description); |
if (hlp->help) |
hlp->help(); |
598,12 → 594,12 |
spinlock_unlock(&hlp->lock); |
break; |
} |
spinlock_unlock(&hlp->lock); |
} |
spinlock_unlock(&cmd_lock); |
return 1; |
} |
620,26 → 616,33 |
{ |
uintptr_t symaddr; |
char *symbol; |
unative_t (*fnc)(void); |
fncptr_t fptr; |
int rc; |
unative_t (*f)(void); |
#ifdef ia64 |
struct { |
unative_t f; |
unative_t gp; |
} fptr; |
#endif |
symbol = (char *) argv->buffer; |
rc = symtab_addr_lookup(symbol, &symaddr); |
if (rc == ENOENT) |
printf("Symbol %s not found.\n", symbol); |
else if (rc == EOVERFLOW) { |
symtab_print_search(symbol); |
symaddr = get_symbol_addr((char *) argv->buffer); |
if (!symaddr) |
printf("Symbol %s not found.\n", argv->buffer); |
else if (symaddr == (uintptr_t) -1) { |
symtab_print_search((char *) argv->buffer); |
printf("Duplicate symbol, be more specific.\n"); |
} else if (rc == EOK) { |
fnc = (unative_t (*)(void)) arch_construct_function(&fptr, |
(void *) symaddr, (void *) cmd_call0); |
} else { |
symbol = get_symtab_entry(symaddr); |
printf("Calling %s() (%p)\n", symbol, symaddr); |
printf("Result: %#" PRIxn "\n", fnc()); |
} else { |
printf("No symbol information available.\n"); |
#ifdef ia64 |
fptr.f = symaddr; |
fptr.gp = ((unative_t *)cmd_call2)[1]; |
f = (unative_t (*)(void)) &fptr; |
#else |
f = (unative_t (*)(void)) symaddr; |
#endif |
printf("Result: %#" PRIxn "\n", f()); |
} |
return 1; |
} |
651,7 → 654,7 |
* call the function. |
*/ |
size_t i; |
count_t i; |
for (i = 0; i < config.cpu_count; i++) { |
if (!cpus[i].active) |
continue; |
677,27 → 680,35 |
{ |
uintptr_t symaddr; |
char *symbol; |
unative_t (*fnc)(unative_t, ...); |
unative_t (*f)(unative_t,...); |
unative_t arg1 = argv[1].intval; |
fncptr_t fptr; |
int rc; |
#ifdef ia64 |
struct { |
unative_t f; |
unative_t gp; |
} fptr; |
#endif |
symbol = (char *) argv->buffer; |
rc = symtab_addr_lookup(symbol, &symaddr); |
symaddr = get_symbol_addr((char *) argv->buffer); |
if (!symaddr) |
printf("Symbol %s not found.\n", argv->buffer); |
else if (symaddr == (uintptr_t) -1) { |
symtab_print_search((char *) argv->buffer); |
printf("Duplicate symbol, be more specific.\n"); |
} else { |
symbol = get_symtab_entry(symaddr); |
if (rc == ENOENT) { |
printf("Symbol %s not found.\n", symbol); |
} else if (rc == EOVERFLOW) { |
symtab_print_search(symbol); |
printf("Duplicate symbol, be more specific.\n"); |
} else if (rc == EOK) { |
fnc = (unative_t (*)(unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call1); |
printf("Calling f(%#" PRIxn "): %p: %s\n", arg1, symaddr, symbol); |
printf("Result: %#" PRIxn "\n", fnc(arg1)); |
} else { |
printf("No symbol information available.\n"); |
#ifdef ia64 |
fptr.f = symaddr; |
fptr.gp = ((unative_t *)cmd_call2)[1]; |
f = (unative_t (*)(unative_t,...)) &fptr; |
#else |
f = (unative_t (*)(unative_t,...)) symaddr; |
#endif |
printf("Result: %#" PRIxn "\n", f(arg1)); |
} |
return 1; |
} |
706,28 → 717,36 |
{ |
uintptr_t symaddr; |
char *symbol; |
unative_t (*fnc)(unative_t, unative_t, ...); |
unative_t (*f)(unative_t,unative_t,...); |
unative_t arg1 = argv[1].intval; |
unative_t arg2 = argv[2].intval; |
fncptr_t fptr; |
int rc; |
#ifdef ia64 |
struct { |
unative_t f; |
unative_t gp; |
}fptr; |
#endif |
symbol = (char *) argv->buffer; |
rc = symtab_addr_lookup(symbol, &symaddr); |
if (rc == ENOENT) { |
printf("Symbol %s not found.\n", symbol); |
} else if (rc == EOVERFLOW) { |
symtab_print_search(symbol); |
symaddr = get_symbol_addr((char *) argv->buffer); |
if (!symaddr) |
printf("Symbol %s not found.\n", argv->buffer); |
else if (symaddr == (uintptr_t) -1) { |
symtab_print_search((char *) argv->buffer); |
printf("Duplicate symbol, be more specific.\n"); |
} else if (rc == EOK) { |
fnc = (unative_t (*)(unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call2); |
} else { |
symbol = get_symtab_entry(symaddr); |
printf("Calling f(%#" PRIxn ", %#" PRIxn "): %p: %s\n", |
arg1, arg2, symaddr, symbol); |
printf("Result: %#" PRIxn "\n", fnc(arg1, arg2)); |
} else { |
printf("No symbol information available.\n"); |
#ifdef ia64 |
fptr.f = symaddr; |
fptr.gp = ((unative_t *)cmd_call2)[1]; |
f = (unative_t (*)(unative_t,unative_t,...)) &fptr; |
#else |
f = (unative_t (*)(unative_t,unative_t,...)) symaddr; |
#endif |
printf("Result: %#" PRIxn "\n", f(arg1, arg2)); |
} |
return 1; |
} |
736,29 → 755,37 |
{ |
uintptr_t symaddr; |
char *symbol; |
unative_t (*fnc)(unative_t, unative_t, unative_t, ...); |
unative_t (*f)(unative_t,unative_t,unative_t,...); |
unative_t arg1 = argv[1].intval; |
unative_t arg2 = argv[2].intval; |
unative_t arg3 = argv[3].intval; |
fncptr_t fptr; |
int rc; |
symbol = (char *) argv->buffer; |
rc = symtab_addr_lookup(symbol, &symaddr); |
#ifdef ia64 |
struct { |
unative_t f; |
unative_t gp; |
}fptr; |
#endif |
if (rc == ENOENT) { |
printf("Symbol %s not found.\n", symbol); |
} else if (rc == EOVERFLOW) { |
symtab_print_search(symbol); |
symaddr = get_symbol_addr((char *) argv->buffer); |
if (!symaddr) |
printf("Symbol %s not found.\n", argv->buffer); |
else if (symaddr == (uintptr_t) -1) { |
symtab_print_search((char *) argv->buffer); |
printf("Duplicate symbol, be more specific.\n"); |
} else if (rc == EOK) { |
fnc = (unative_t (*)(unative_t, unative_t, unative_t, ...)) arch_construct_function(&fptr, (void *) symaddr, (void *) cmd_call3); |
} else { |
symbol = get_symtab_entry(symaddr); |
printf("Calling f(%#" PRIxn ",%#" PRIxn ", %#" PRIxn "): %p: %s\n", |
arg1, arg2, arg3, symaddr, symbol); |
printf("Result: %#" PRIxn "\n", fnc(arg1, arg2, arg3)); |
} else { |
printf("No symbol information available.\n"); |
#ifdef ia64 |
fptr.f = symaddr; |
fptr.gp = ((unative_t *)cmd_call2)[1]; |
f = (unative_t (*)(unative_t,unative_t,unative_t,...)) &fptr; |
#else |
f = (unative_t (*)(unative_t,unative_t,unative_t,...)) symaddr; |
#endif |
printf("Result: %#" PRIxn "\n", f(arg1, arg2, arg3)); |
} |
return 1; |
} |
808,34 → 835,30 |
/** Write 4 byte value to address */ |
int cmd_set4(cmd_arg_t *argv) |
{ |
uintptr_t addr; |
uint32_t *addr; |
uint32_t arg1 = argv[1].intval; |
bool pointer = false; |
int rc; |
if (((char *)argv->buffer)[0] == '*') { |
rc = symtab_addr_lookup((char *) argv->buffer + 1, &addr); |
addr = (uint32_t *) get_symbol_addr((char *) argv->buffer + 1); |
pointer = true; |
} else if (((char *) argv->buffer)[0] >= '0' && |
((char *)argv->buffer)[0] <= '9') { |
rc = EOK; |
addr = atoi((char *)argv->buffer); |
} else { |
rc = symtab_addr_lookup((char *) argv->buffer, &addr); |
} |
((char *)argv->buffer)[0] <= '9') |
addr = (uint32_t *)atoi((char *)argv->buffer); |
else |
addr = (uint32_t *)get_symbol_addr((char *) argv->buffer); |
if (rc == ENOENT) |
if (!addr) |
printf("Symbol %s not found.\n", argv->buffer); |
else if (rc == EOVERFLOW) { |
else if (addr == (uint32_t *) -1) { |
symtab_print_search((char *) argv->buffer); |
printf("Duplicate symbol, be more specific.\n"); |
} else if (rc == EOK) { |
} else { |
if (pointer) |
addr = *(uintptr_t *) addr; |
addr = (uint32_t *)(*(unative_t *)addr); |
printf("Writing %#" PRIx64 " -> %p\n", arg1, addr); |
*(uint32_t *) addr = arg1; |
} else { |
printf("No symbol information available.\n"); |
*addr = arg1; |
} |
return 1; |
953,11 → 976,8 |
int cmd_continue(cmd_arg_t *argv) |
{ |
printf("The kernel will now relinquish the console.\n"); |
release_console(); |
event_notify_0(EVENT_KCONSOLE); |
indev_pop_character(stdin); |
printf("Use userspace controls to redraw the screen.\n"); |
arch_release_console(); |
return 1; |
} |
970,23 → 990,18 |
*/ |
int cmd_tests(cmd_arg_t *argv) |
{ |
size_t len = 0; |
test_t *test; |
for (test = tests; test->name != NULL; test++) { |
if (str_length(test->name) > len) |
len = str_length(test->name); |
} |
for (test = tests; test->name != NULL; test++) |
printf("%-*s %s%s\n", len, test->name, test->desc, (test->safe ? "" : " (unsafe)")); |
printf("%s\t\t%s%s\n", test->name, test->desc, (test->safe ? "" : " (unsafe)")); |
printf("%-*s Run all safe tests\n", len, "*"); |
printf("*\t\tRun all safe tests\n"); |
return 1; |
} |
static bool run_test(const test_t *test) |
{ |
printf("%s (%s)\n", test->name, test->desc); |
printf("%s\t\t%s\n", test->name, test->desc); |
/* Update and read thread accounting |
for benchmarking */ |
997,8 → 1012,7 |
interrupts_restore(ipl); |
/* Execute the test */ |
test_quiet = false; |
char *ret = test->entry(); |
char * ret = test->entry(false); |
/* Update and read thread accounting */ |
ipl = interrupts_disable(); |
1050,8 → 1064,7 |
interrupts_restore(ipl); |
/* Execute the test */ |
test_quiet = true; |
char * ret = test->entry(); |
char * ret = test->entry(true); |
/* Update and read thread accounting */ |
ipl = interrupts_disable(); |
1099,7 → 1112,7 |
{ |
test_t *test; |
if (str_cmp((char *) argv->buffer, "*") == 0) { |
if (strcmp((char *) argv->buffer, "*") == 0) { |
for (test = tests; test->name != NULL; test++) { |
if (test->safe) { |
printf("\n"); |
1111,7 → 1124,7 |
bool fnd = false; |
for (test = tests; test->name != NULL; test++) { |
if (str_cmp(test->name, (char *) argv->buffer) == 0) { |
if (strcmp(test->name, (char *) argv->buffer) == 0) { |
fnd = true; |
run_test(test); |
break; |
1136,33 → 1149,24 |
test_t *test; |
uint32_t cnt = argv[1].intval; |
if (str_cmp((char *) argv->buffer, "*") == 0) { |
for (test = tests; test->name != NULL; test++) { |
if (test->safe) { |
if (!run_bench(test, cnt)) |
break; |
} |
bool fnd = false; |
for (test = tests; test->name != NULL; test++) { |
if (strcmp(test->name, (char *) argv->buffer) == 0) { |
fnd = true; |
if (test->safe) |
run_bench(test, cnt); |
else |
printf("Unsafe test\n"); |
break; |
} |
} else { |
bool fnd = false; |
} |
for (test = tests; test->name != NULL; test++) { |
if (str_cmp(test->name, (char *) argv->buffer) == 0) { |
fnd = true; |
if (test->safe) |
run_bench(test, cnt); |
else |
printf("Unsafe test\n"); |
break; |
} |
} |
if (!fnd) |
printf("Unknown test\n"); |
} |
if (!fnd) |
printf("Unknown test\n"); |
return 1; |
} |
/branches/arm/kernel/generic/src/console/kconsole.c |
---|
31,11 → 31,10 |
*/ |
/** |
* @file kconsole.c |
* @brief Kernel console. |
* @file kconsole.c |
* @brief Kernel console. |
* |
* This file contains kernel thread managing the kernel console. |
* |
*/ |
#include <console/kconsole.h> |
50,14 → 49,8 |
#include <macros.h> |
#include <debug.h> |
#include <func.h> |
#include <string.h> |
#include <symtab.h> |
#include <macros.h> |
#include <sysinfo/sysinfo.h> |
#include <ddi/device.h> |
#include <symtab.h> |
#include <errno.h> |
#include <putchar.h> |
#include <string.h> |
/** Simple kernel console. |
* |
66,7 → 59,7 |
* but makes it possible for other kernel subsystems to |
* register their own commands. |
*/ |
/** Locking. |
* |
* There is a list of cmd_info_t structures. This list |
81,36 → 74,33 |
* When locking two cmd info structures, structure with |
* lower address must be locked first. |
*/ |
SPINLOCK_INITIALIZE(cmd_lock); /**< Lock protecting command list. */ |
LIST_INITIALIZE(cmd_head); /**< Command list. */ |
SPINLOCK_INITIALIZE(cmd_lock); /**< Lock protecting command list. */ |
LIST_INITIALIZE(cmd_head); /**< Command list. */ |
static cmd_info_t *parse_cmdline(char *cmdline, size_t len); |
static bool parse_argument(char *cmdline, size_t len, index_t *start, |
index_t *end); |
static char history[KCONSOLE_HISTORY][MAX_CMDLINE] = {}; |
static wchar_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = {}; |
static size_t history_pos = 0; |
/** Initialize kconsole data structures |
* |
* This is the most basic initialization, almost no |
* other kernel subsystem is ready yet. |
* |
*/ |
/** Initialize kconsole data structures. */ |
void kconsole_init(void) |
{ |
unsigned int i; |
int i; |
cmd_init(); |
for (i = 0; i < KCONSOLE_HISTORY; i++) |
history[i][0] = 0; |
history[i][0] = '\0'; |
} |
/** Register kconsole command. |
* |
* @param cmd Structure describing the command. |
* |
* @return False on failure, true on success. |
* |
* @return 0 on failure, 1 on success. |
*/ |
bool cmd_register(cmd_info_t *cmd) |
int cmd_register(cmd_info_t *cmd) |
{ |
link_t *cur; |
120,14 → 110,16 |
* Make sure the command is not already listed. |
*/ |
for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) { |
cmd_info_t *hlp = list_get_instance(cur, cmd_info_t, link); |
cmd_info_t *hlp; |
hlp = list_get_instance(cur, cmd_info_t, link); |
if (hlp == cmd) { |
/* The command is already there. */ |
spinlock_unlock(&cmd_lock); |
return false; |
return 0; |
} |
/* Avoid deadlock. */ |
if (hlp < cmd) { |
spinlock_lock(&hlp->lock); |
136,13 → 128,13 |
spinlock_lock(&cmd->lock); |
spinlock_lock(&hlp->lock); |
} |
if (str_cmp(hlp->name, cmd->name) == 0) { |
if ((strncmp(hlp->name, cmd->name, max(strlen(cmd->name), |
strlen(hlp->name))) == 0)) { |
/* The command is already there. */ |
spinlock_unlock(&hlp->lock); |
spinlock_unlock(&cmd->lock); |
spinlock_unlock(&cmd_lock); |
return false; |
return 0; |
} |
spinlock_unlock(&hlp->lock); |
155,274 → 147,294 |
list_append(&cmd->link, &cmd_head); |
spinlock_unlock(&cmd_lock); |
return true; |
return 1; |
} |
/** Print count times a character */ |
static void print_cc(wchar_t ch, size_t count) |
static void rdln_print_c(char ch, int count) |
{ |
size_t i; |
int i; |
for (i = 0; i < count; i++) |
putchar(ch); |
} |
/** Insert character to string */ |
static void insert_char(char *str, char ch, int pos) |
{ |
int i; |
for (i = strlen(str); i > pos; i--) |
str[i] = str[i - 1]; |
str[pos] = ch; |
} |
/** Try to find a command beginning with prefix */ |
static const char *cmdtab_search_one(const char *name, link_t **startpos) |
static const char *cmdtab_search_one(const char *name,link_t **startpos) |
{ |
size_t namelen = str_length(name); |
size_t namelen = strlen(name); |
const char *curname; |
spinlock_lock(&cmd_lock); |
if (*startpos == NULL) |
if (!*startpos) |
*startpos = cmd_head.next; |
for (; *startpos != &cmd_head; *startpos = (*startpos)->next) { |
cmd_info_t *hlp = list_get_instance(*startpos, cmd_info_t, link); |
const char *curname = hlp->name; |
if (str_length(curname) < namelen) |
cmd_info_t *hlp; |
hlp = list_get_instance(*startpos, cmd_info_t, link); |
curname = hlp->name; |
if (strlen(curname) < namelen) |
continue; |
if (str_lcmp(curname, name, namelen) == 0) { |
spinlock_unlock(&cmd_lock); |
return (curname + str_lsize(curname, namelen)); |
if (strncmp(curname, name, namelen) == 0) { |
spinlock_unlock(&cmd_lock); |
return curname+namelen; |
} |
} |
spinlock_unlock(&cmd_lock); |
spinlock_unlock(&cmd_lock); |
return NULL; |
} |
/** Command completion of the commands |
/** Command completion of the commands |
* |
* @param name String to match, changed to hint on exit |
* @param size Input buffer size |
* |
* @return Number of found matches |
* |
* @param name - string to match, changed to hint on exit |
* @return number of found matches |
*/ |
static int cmdtab_compl(char *input, size_t size) |
static int cmdtab_compl(char *name) |
{ |
const char *name = input; |
size_t found = 0; |
link_t *pos = NULL; |
const char *hint; |
char output[MAX_CMDLINE]; |
output[0] = 0; |
while ((hint = cmdtab_search_one(name, &pos))) { |
if ((found == 0) || (str_length(output) > str_length(hint))) |
str_cpy(output, MAX_CMDLINE, hint); |
pos = pos->next; |
static char output[MAX_SYMBOL_NAME + 1]; |
link_t *startpos = NULL; |
const char *foundtxt; |
int found = 0; |
int i; |
output[0] = '\0'; |
while ((foundtxt = cmdtab_search_one(name, &startpos))) { |
startpos = startpos->next; |
if (!found) |
strncpy(output, foundtxt, strlen(foundtxt) + 1); |
else { |
for (i = 0; output[i] && foundtxt[i] && |
output[i] == foundtxt[i]; i++) |
; |
output[i] = '\0'; |
} |
found++; |
} |
if ((found > 1) && (str_length(output) != 0)) { |
if (!found) |
return 0; |
if (found > 1 && !strlen(output)) { |
printf("\n"); |
pos = NULL; |
while ((hint = cmdtab_search_one(name, &pos))) { |
cmd_info_t *hlp = list_get_instance(pos, cmd_info_t, link); |
printf("%s (%s)\n", hlp->name, hlp->description); |
pos = pos->next; |
startpos = NULL; |
while ((foundtxt = cmdtab_search_one(name, &startpos))) { |
cmd_info_t *hlp; |
hlp = list_get_instance(startpos, cmd_info_t, link); |
printf("%s - %s\n", hlp->name, hlp->description); |
startpos = startpos->next; |
} |
} |
strncpy(name, output, MAX_SYMBOL_NAME); |
return found; |
if (found > 0) |
str_cpy(input, size, output); |
return found; |
} |
static wchar_t *clever_readline(const char *prompt, indev_t *indev) |
static char *clever_readline(const char *prompt, chardev_t *input) |
{ |
static int histposition = 0; |
static char tmp[MAX_CMDLINE + 1]; |
int curlen = 0, position = 0; |
char *current = history[histposition]; |
int i; |
char mod; /* Command Modifier */ |
char c; |
printf("%s> ", prompt); |
size_t position = 0; |
wchar_t *current = history[history_pos]; |
current[0] = 0; |
while (true) { |
wchar_t ch = indev_pop_character(indev); |
if (ch == '\n') { |
/* Enter */ |
putchar(ch); |
while (1) { |
c = _getc(input); |
if (c == '\n') { |
putchar(c); |
break; |
} |
if (ch == '\b') { |
/* Backspace */ |
if (c == '\b') { /* Backspace */ |
if (position == 0) |
continue; |
if (wstr_remove(current, position - 1)) { |
position--; |
putchar('\b'); |
printf("%ls ", current + position); |
print_cc('\b', wstr_length(current) - position + 1); |
continue; |
} |
for (i = position; i < curlen; i++) |
current[i - 1] = current[i]; |
curlen--; |
position--; |
putchar('\b'); |
for (i = position; i < curlen; i++) |
putchar(current[i]); |
putchar(' '); |
rdln_print_c('\b', curlen - position + 1); |
continue; |
} |
if (ch == '\t') { |
/* Tab completion */ |
if (c == '\t') { /* Tabulator */ |
int found; |
/* Move to the end of the word */ |
for (; (current[position] != 0) && (!isspace(current[position])); |
for (; position < curlen && current[position] != ' '; |
position++) |
putchar(current[position]); |
if (position == 0) |
continue; |
/* Find the beginning of the word |
and copy it to tmp */ |
size_t beg; |
for (beg = position - 1; (beg > 0) && (!isspace(current[beg])); |
beg--); |
if (isspace(current[beg])) |
beg++; |
char tmp[STR_BOUNDS(MAX_CMDLINE)]; |
wstr_nstr(tmp, current + beg, position - beg + 1); |
int found; |
if (beg == 0) { |
/* Command completion */ |
found = cmdtab_compl(tmp, STR_BOUNDS(MAX_CMDLINE)); |
} else { |
/* Symbol completion */ |
found = symtab_compl(tmp, STR_BOUNDS(MAX_CMDLINE)); |
/* Copy to tmp last word */ |
for (i = position - 1; i >= 0 && current[i] != ' '; i--) |
; |
/* If word begins with * or &, skip it */ |
if (tmp[0] == '*' || tmp[0] == '&') |
for (i = 1; tmp[i]; i++) |
tmp[i - 1] = tmp[i]; |
i++; /* I is at the start of the word */ |
strncpy(tmp, current + i, position - i + 1); |
if (i == 0) { /* Command completion */ |
found = cmdtab_compl(tmp); |
} else { /* Symtab completion */ |
found = symtab_compl(tmp); |
} |
if (found == 0) |
if (found == 0) |
continue; |
if (found > 1) { |
/* No unique hint, list was printed */ |
printf("%s> ", prompt); |
printf("%ls", current); |
print_cc('\b', wstr_length(current) - position); |
continue; |
} |
/* We have a hint */ |
size_t off = 0; |
size_t i = 0; |
while ((ch = str_decode(tmp, &off, STR_NO_LIMIT)) != 0) { |
if (!wstr_linsert(current, ch, position + i, MAX_CMDLINE)) |
break; |
i++; |
} |
printf("%ls", current + position); |
position += str_length(tmp); |
print_cc('\b', wstr_length(current) - position); |
if (position == wstr_length(current)) { |
/* Insert a space after the last completed argument */ |
if (wstr_linsert(current, ' ', position, MAX_CMDLINE)) { |
printf("%ls", current + position); |
for (i = 0; tmp[i] && curlen < MAX_CMDLINE; |
i++, curlen++) |
insert_char(current, tmp[i], i + position); |
if (strlen(tmp) || found == 1) { /* If we have a hint */ |
for (i = position; i < curlen; i++) |
putchar(current[i]); |
position += strlen(tmp); |
/* Add space to end */ |
if (found == 1 && position == curlen && |
curlen < MAX_CMDLINE) { |
current[position] = ' '; |
curlen++; |
position++; |
putchar(' '); |
} |
} else { /* No hint, table was printed */ |
printf("%s> ", prompt); |
for (i = 0; i < curlen; i++) |
putchar(current[i]); |
position += strlen(tmp); |
} |
rdln_print_c('\b', curlen - position); |
continue; |
} |
if (ch == U_LEFT_ARROW) { |
/* Left */ |
if (position > 0) { |
putchar('\b'); |
position--; |
} |
continue; |
} |
if (ch == U_RIGHT_ARROW) { |
/* Right */ |
if (position < wstr_length(current)) { |
putchar(current[position]); |
position++; |
} |
continue; |
} |
if ((ch == U_UP_ARROW) || (ch == U_DOWN_ARROW)) { |
/* Up, down */ |
print_cc('\b', position); |
print_cc(' ', wstr_length(current)); |
print_cc('\b', wstr_length(current)); |
if (ch == U_UP_ARROW) { |
/* Up */ |
if (history_pos == 0) |
history_pos = KCONSOLE_HISTORY - 1; |
if (c == 0x1b) { /* Special command */ |
mod = _getc(input); |
c = _getc(input); |
if (mod != 0x5b && mod != 0x4f) |
continue; |
if (c == 0x33 && _getc(input) == 0x7e) { |
/* Delete */ |
if (position == curlen) |
continue; |
for (i = position + 1; i < curlen; i++) { |
putchar(current[i]); |
current[i - 1] = current[i]; |
} |
putchar(' '); |
rdln_print_c('\b', curlen - position); |
curlen--; |
} else if (c == 0x48) { /* Home */ |
rdln_print_c('\b', position); |
position = 0; |
} else if (c == 0x46) { /* End */ |
for (i = position; i < curlen; i++) |
putchar(current[i]); |
position = curlen; |
} else if (c == 0x44) { /* Left */ |
if (position > 0) { |
putchar('\b'); |
position--; |
} |
continue; |
} else if (c == 0x43) { /* Right */ |
if (position < curlen) { |
putchar(current[position]); |
position++; |
} |
continue; |
} else if (c == 0x41 || c == 0x42) { |
/* Up, down */ |
rdln_print_c('\b', position); |
rdln_print_c(' ', curlen); |
rdln_print_c('\b', curlen); |
if (c == 0x41) /* Up */ |
histposition--; |
else |
history_pos--; |
} else { |
/* Down */ |
history_pos++; |
history_pos = history_pos % KCONSOLE_HISTORY; |
histposition++; |
if (histposition < 0) { |
histposition = KCONSOLE_HISTORY - 1; |
} else { |
histposition = |
histposition % KCONSOLE_HISTORY; |
} |
current = history[histposition]; |
printf("%s", current); |
curlen = strlen(current); |
position = curlen; |
continue; |
} |
current = history[history_pos]; |
printf("%ls", current); |
position = wstr_length(current); |
continue; |
} |
if (ch == U_HOME_ARROW) { |
/* Home */ |
print_cc('\b', position); |
position = 0; |
if (curlen >= MAX_CMDLINE) |
continue; |
} |
if (ch == U_END_ARROW) { |
/* End */ |
printf("%ls", current + position); |
position = wstr_length(current); |
continue; |
} |
if (ch == U_DELETE) { |
/* Delete */ |
if (position == wstr_length(current)) |
continue; |
if (wstr_remove(current, position)) { |
printf("%ls ", current + position); |
print_cc('\b', wstr_length(current) - position + 1); |
} |
continue; |
} |
if (wstr_linsert(current, ch, position, MAX_CMDLINE)) { |
printf("%ls", current + position); |
position++; |
print_cc('\b', wstr_length(current) - position); |
} |
insert_char(current, c, position); |
curlen++; |
for (i = position; i < curlen; i++) |
putchar(current[i]); |
position++; |
rdln_print_c('\b',curlen - position); |
} |
if (curlen) { |
histposition++; |
histposition = histposition % KCONSOLE_HISTORY; |
} |
if (wstr_length(current) > 0) { |
history_pos++; |
history_pos = history_pos % KCONSOLE_HISTORY; |
} |
current[curlen] = '\0'; |
return current; |
} |
bool kconsole_check_poll(void) |
/** Kernel console managing thread. |
* |
* @param prompt Kernel console prompt (e.g kconsole/panic). |
*/ |
void kconsole(void *prompt) |
{ |
return check_poll(stdin); |
cmd_info_t *cmd_info; |
count_t len; |
char *cmdline; |
if (!stdin) { |
printf("%s: no stdin\n", __func__); |
return; |
} |
while (true) { |
cmdline = clever_readline((char *) prompt, stdin); |
len = strlen(cmdline); |
if (!len) |
continue; |
cmd_info = parse_cmdline(cmdline, len); |
if (!cmd_info) |
continue; |
if (strncmp(cmd_info->name, "exit", |
min(strlen(cmd_info->name), 5)) == 0) |
break; |
(void) cmd_info->func(cmd_info->argv); |
} |
} |
static bool parse_int_arg(const char *text, size_t len, unative_t *result) |
static int parse_int_arg(char *text, size_t len, unative_t *result) |
{ |
static char symname[MAX_SYMBOL_NAME]; |
uintptr_t symaddr; |
bool isaddr = false; |
bool isptr = false; |
436,113 → 448,63 |
text++; |
len--; |
} |
if ((text[0] < '0') || (text[0] > '9')) { |
char symname[MAX_SYMBOL_NAME]; |
str_ncpy(symname, MAX_SYMBOL_NAME, text, len + 1); |
uintptr_t symaddr; |
int rc = symtab_addr_lookup(symname, &symaddr); |
switch (rc) { |
case ENOENT: |
if (text[0] < '0' || text[0] > '9') { |
strncpy(symname, text, min(len + 1, MAX_SYMBOL_NAME)); |
symaddr = get_symbol_addr(symname); |
if (!symaddr) { |
printf("Symbol %s not found.\n", symname); |
return false; |
case EOVERFLOW: |
return -1; |
} |
if (symaddr == (uintptr_t) -1) { |
printf("Duplicate symbol %s.\n", symname); |
symtab_print_search(symname); |
return false; |
case ENOTSUP: |
printf("No symbol information available.\n"); |
return false; |
return -1; |
} |
if (isaddr) |
*result = (unative_t) symaddr; |
*result = (unative_t)symaddr; |
else if (isptr) |
*result = **((unative_t **) symaddr); |
*result = **((unative_t **)symaddr); |
else |
*result = *((unative_t *) symaddr); |
} else { |
/* It's a number - convert it */ |
*result = *((unative_t *)symaddr); |
} else { /* It's a number - convert it */ |
*result = atoi(text); |
if (isptr) |
*result = *((unative_t *) *result); |
*result = *((unative_t *)*result); |
} |
return true; |
} |
/** Parse argument. |
* |
* Find start and end positions of command line argument. |
* |
* @param cmdline Command line as read from the input device. |
* @param size Size (in bytes) of the string. |
* @param start On entry, 'start' contains pointer to the offset |
* of the first unprocessed character of cmdline. |
* On successful exit, it marks beginning of the next argument. |
* @param end Undefined on entry. On exit, 'end' is the offset of the first |
* character behind the next argument. |
* |
* @return False on failure, true on success. |
* |
*/ |
static bool parse_argument(const char *cmdline, size_t size, size_t *start, size_t *end) |
{ |
ASSERT(start != NULL); |
ASSERT(end != NULL); |
bool found_start = false; |
size_t offset = *start; |
size_t prev = *start; |
wchar_t ch; |
while ((ch = str_decode(cmdline, &offset, size)) != 0) { |
if (!found_start) { |
if (!isspace(ch)) { |
*start = prev; |
found_start = true; |
} |
} else { |
if (isspace(ch)) |
break; |
} |
prev = offset; |
} |
*end = prev; |
return found_start; |
return 0; |
} |
/** Parse command line. |
* |
* @param cmdline Command line as read from input device. |
* @param size Size (in bytes) of the string. |
* @param cmdline Command line as read from input device. |
* @param len Command line length. |
* |
* @return Structure describing the command. |
* |
*/ |
static cmd_info_t *parse_cmdline(const char *cmdline, size_t size) |
cmd_info_t *parse_cmdline(char *cmdline, size_t len) |
{ |
size_t start = 0; |
size_t end = 0; |
if (!parse_argument(cmdline, size, &start, &end)) { |
index_t start = 0, end = 0; |
cmd_info_t *cmd = NULL; |
link_t *cur; |
count_t i; |
int error = 0; |
if (!parse_argument(cmdline, len, &start, &end)) { |
/* Command line did not contain alphanumeric word. */ |
return NULL; |
} |
spinlock_lock(&cmd_lock); |
cmd_info_t *cmd = NULL; |
link_t *cur; |
for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) { |
cmd_info_t *hlp = list_get_instance(cur, cmd_info_t, link); |
cmd_info_t *hlp; |
hlp = list_get_instance(cur, cmd_info_t, link); |
spinlock_lock(&hlp->lock); |
if (str_lcmp(hlp->name, cmdline + start, |
max(str_length(hlp->name), |
str_nlength(cmdline + start, (size_t) (end - start) - 1))) == 0) { |
if (strncmp(hlp->name, &cmdline[start], max(strlen(hlp->name), |
end - start + 1)) == 0) { |
cmd = hlp; |
break; |
} |
550,7 → 512,7 |
spinlock_unlock(&hlp->lock); |
} |
spinlock_unlock(&cmd_lock); |
spinlock_unlock(&cmd_lock); |
if (!cmd) { |
/* Unknown command. */ |
557,7 → 519,7 |
printf("Unknown command.\n"); |
return NULL; |
} |
/* cmd == hlp is locked */ |
/* |
566,54 → 528,52 |
* converted to those specified in the cmd info |
* structure. |
*/ |
bool error = false; |
size_t i; |
for (i = 0; i < cmd->argc; i++) { |
start = end; |
if (!parse_argument(cmdline, size, &start, &end)) { |
char *buf; |
start = end + 1; |
if (!parse_argument(cmdline, len, &start, &end)) { |
printf("Too few arguments.\n"); |
spinlock_unlock(&cmd->lock); |
return NULL; |
} |
char *buf; |
error = 0; |
switch (cmd->argv[i].type) { |
case ARG_TYPE_STRING: |
buf = (char *) cmd->argv[i].buffer; |
str_ncpy(buf, cmd->argv[i].len, cmdline + start, |
end - start); |
strncpy(buf, (const char *) &cmdline[start], |
min((end - start) + 2, cmd->argv[i].len)); |
buf[min((end - start) + 1, cmd->argv[i].len - 1)] = |
'\0'; |
break; |
case ARG_TYPE_INT: |
if (!parse_int_arg(cmdline + start, end - start, |
case ARG_TYPE_INT: |
if (parse_int_arg(cmdline + start, end - start + 1, |
&cmd->argv[i].intval)) |
error = true; |
error = 1; |
break; |
case ARG_TYPE_VAR: |
if ((start < end - 1) && (cmdline[start] == '"')) { |
if (cmdline[end - 1] == '"') { |
buf = (char *) cmd->argv[i].buffer; |
str_ncpy(buf, cmd->argv[i].len, |
cmdline + start + 1, |
(end - start) - 1); |
cmd->argv[i].intval = (unative_t) buf; |
cmd->argv[i].vartype = ARG_TYPE_STRING; |
} else { |
printf("Wrong synxtax.\n"); |
error = true; |
} |
} else if (parse_int_arg(cmdline + start, |
end - start, &cmd->argv[i].intval)) { |
if (start != end && cmdline[start] == '"' && |
cmdline[end] == '"') { |
buf = (char *) cmd->argv[i].buffer; |
strncpy(buf, (const char *) &cmdline[start + 1], |
min((end-start), cmd->argv[i].len)); |
buf[min((end - start), cmd->argv[i].len - 1)] = |
'\0'; |
cmd->argv[i].intval = (unative_t) buf; |
cmd->argv[i].vartype = ARG_TYPE_STRING; |
} else if (!parse_int_arg(cmdline + start, |
end - start + 1, &cmd->argv[i].intval)) { |
cmd->argv[i].vartype = ARG_TYPE_INT; |
} else { |
printf("Unrecognized variable argument.\n"); |
error = true; |
error = 1; |
} |
break; |
case ARG_TYPE_INVALID: |
default: |
printf("Invalid argument type\n"); |
error = true; |
printf("invalid argument type\n"); |
error = 1; |
break; |
} |
} |
623,8 → 583,8 |
return NULL; |
} |
start = end; |
if (parse_argument(cmdline, size, &start, &end)) { |
start = end + 1; |
if (parse_argument(cmdline, len, &start, &end)) { |
printf("Too many arguments.\n"); |
spinlock_unlock(&cmd->lock); |
return NULL; |
634,55 → 594,42 |
return cmd; |
} |
/** Kernel console prompt. |
/** Parse argument. |
* |
* @param prompt Kernel console prompt (e.g kconsole/panic). |
* @param msg Message to display in the beginning. |
* @param kcon Wait for keypress to show the prompt |
* and never exit. |
* Find start and end positions of command line argument. |
* |
* @param cmdline Command line as read from the input device. |
* @param len Number of characters in cmdline. |
* @param start On entry, 'start' contains pointer to the index |
* of first unprocessed character of cmdline. |
* On successful exit, it marks beginning of the next argument. |
* @param end Undefined on entry. On exit, 'end' points to the last character |
* of the next argument. |
* |
* @return false on failure, true on success. |
*/ |
void kconsole(char *prompt, char *msg, bool kcon) |
bool parse_argument(char *cmdline, size_t len, index_t *start, index_t *end) |
{ |
if (!stdin) { |
LOG("No stdin for kernel console"); |
return; |
} |
index_t i; |
bool found_start = false; |
if (msg) |
printf("%s", msg); |
ASSERT(start != NULL); |
ASSERT(end != NULL); |
if (kcon) |
indev_pop_character(stdin); |
else |
printf("Type \"exit\" to leave the console.\n"); |
while (true) { |
wchar_t *tmp = clever_readline((char *) prompt, stdin); |
size_t len = wstr_length(tmp); |
if (!len) |
continue; |
char cmdline[STR_BOUNDS(MAX_CMDLINE)]; |
wstr_nstr(cmdline, tmp, STR_BOUNDS(MAX_CMDLINE)); |
if ((!kcon) && (len == 4) && (str_lcmp(cmdline, "exit", 4) == 0)) |
break; |
cmd_info_t *cmd_info = parse_cmdline(cmdline, STR_BOUNDS(MAX_CMDLINE)); |
if (!cmd_info) |
continue; |
(void) cmd_info->func(cmd_info->argv); |
for (i = *start; i < len; i++) { |
if (!found_start) { |
if (isspace(cmdline[i])) |
(*start)++; |
else |
found_start = true; |
} else { |
if (isspace(cmdline[i])) |
break; |
} |
} |
} |
*end = i - 1; |
/** Kernel console managing thread. |
* |
*/ |
void kconsole_thread(void *data) |
{ |
kconsole("kconsole", "Kernel console ready (press any key to activate)\n", true); |
return found_start; |
} |
/** @} |
/branches/arm/kernel/generic/src/console/console.c |
---|
39,70 → 39,79 |
#include <synch/waitq.h> |
#include <synch/spinlock.h> |
#include <arch/types.h> |
#include <ddi/device.h> |
#include <ddi/irq.h> |
#include <ddi/ddi.h> |
#include <ipc/event.h> |
#include <ipc/irq.h> |
#include <arch.h> |
#include <func.h> |
#include <print.h> |
#include <putchar.h> |
#include <atomic.h> |
#include <syscall/copy.h> |
#include <errno.h> |
#include <string.h> |
#define KLOG_PAGES 4 |
#define KLOG_LENGTH (KLOG_PAGES * PAGE_SIZE / sizeof(wchar_t)) |
#define KLOG_LATENCY 8 |
#define KLOG_SIZE PAGE_SIZE |
#define KLOG_LATENCY 8 |
/** Kernel log cyclic buffer */ |
static wchar_t klog[KLOG_LENGTH] __attribute__ ((aligned (PAGE_SIZE))); |
/**< Kernel log cyclic buffer */ |
static char klog[KLOG_SIZE] __attribute__ ((aligned (PAGE_SIZE))); |
/** Kernel log initialized */ |
/**< Kernel log initialized */ |
static bool klog_inited = false; |
/** First kernel log characters */ |
static size_t klog_start = 0; |
/** Number of valid kernel log characters */ |
/**< First kernel log characters */ |
static index_t klog_start = 0; |
/**< Number of valid kernel log characters */ |
static size_t klog_len = 0; |
/** Number of stored (not printed) kernel log characters */ |
/**< Number of stored (not printed) kernel log characters */ |
static size_t klog_stored = 0; |
/** Number of stored kernel log characters for uspace */ |
/**< Number of stored kernel log characters for uspace */ |
static size_t klog_uspace = 0; |
/** Kernel log spinlock */ |
/**< Kernel log spinlock */ |
SPINLOCK_INITIALIZE(klog_lock); |
/** Physical memory area used for klog buffer */ |
static parea_t klog_parea; |
/* |
* For now, we use 0 as INR. |
* However, it is therefore desirable to have architecture specific |
* definition of KLOG_VIRT_INR in the future. |
*/ |
#define KLOG_VIRT_INR 0 |
static indev_operations_t stdin_ops = { |
.poll = NULL |
static irq_t klog_irq; |
static chardev_operations_t null_stdout_ops = { |
.suspend = NULL, |
.resume = NULL, |
.write = NULL, |
.read = NULL |
}; |
/** Silence output */ |
bool silent = false; |
chardev_t null_stdout = { |
.name = "null", |
.op = &null_stdout_ops |
}; |
/** Standard input and output character devices */ |
indev_t *stdin = NULL; |
outdev_t *stdout = NULL; |
indev_t *stdin_wire(void) |
/** Allways refuse IRQ ownership. |
* |
* This is not a real IRQ, so we always decline. |
* |
* @return Always returns IRQ_DECLINE. |
*/ |
static irq_ownership_t klog_claim(void) |
{ |
if (stdin == NULL) { |
stdin = malloc(sizeof(indev_t), FRAME_ATOMIC); |
if (stdin != NULL) |
indev_initialize("stdin", stdin, &stdin_ops); |
} |
return stdin; |
return IRQ_DECLINE; |
} |
/** Standard input character device */ |
chardev_t *stdin = NULL; |
chardev_t *stdout = &null_stdout; |
/** Initialize kernel logging facility |
* |
* The shared area contains kernel cyclic buffer. Userspace application may |
* be notified on new data with indication of position and size |
* of the data within the circular buffer. |
* |
*/ |
void klog_init(void) |
{ |
109,13 → 118,26 |
void *faddr = (void *) KA2PA(klog); |
ASSERT((uintptr_t) faddr % FRAME_SIZE == 0); |
ASSERT(KLOG_SIZE % FRAME_SIZE == 0); |
devno_t devno = device_assign_devno(); |
klog_parea.pbase = (uintptr_t) faddr; |
klog_parea.frames = SIZE2FRAMES(sizeof(klog)); |
klog_parea.vbase = (uintptr_t) klog; |
klog_parea.frames = SIZE2FRAMES(KLOG_SIZE); |
klog_parea.cacheable = true; |
ddi_parea_register(&klog_parea); |
sysinfo_set_item_val("klog.faddr", NULL, (unative_t) faddr); |
sysinfo_set_item_val("klog.pages", NULL, KLOG_PAGES); |
sysinfo_set_item_val("klog.pages", NULL, SIZE2FRAMES(KLOG_SIZE)); |
sysinfo_set_item_val("klog.devno", NULL, devno); |
sysinfo_set_item_val("klog.inr", NULL, KLOG_VIRT_INR); |
irq_initialize(&klog_irq); |
klog_irq.devno = devno; |
klog_irq.inr = KLOG_VIRT_INR; |
klog_irq.claim = klog_claim; |
irq_register(&klog_irq); |
spinlock_lock(&klog_lock); |
klog_inited = true; |
122,88 → 144,91 |
spinlock_unlock(&klog_lock); |
} |
void grab_console(void) |
/** Get character from character device. Do not echo character. |
* |
* @param chardev Character device. |
* |
* @return Character read. |
*/ |
uint8_t _getc(chardev_t *chardev) |
{ |
bool prev = silent; |
silent = false; |
arch_grab_console(); |
/* Force the console to print the prompt */ |
if ((stdin) && (prev)) |
indev_push_character(stdin, '\n'); |
} |
uint8_t ch; |
ipl_t ipl; |
void release_console(void) |
{ |
silent = true; |
arch_release_console(); |
} |
if (atomic_get(&haltstate)) { |
/* If we are here, we are hopefully on the processor, that |
* issued the 'halt' command, so proceed to read the character |
* directly from input |
*/ |
if (chardev->op->read) |
return chardev->op->read(chardev); |
/* no other way of interacting with user, halt */ |
if (CPU) |
printf("cpu%u: ", CPU->id); |
else |
printf("cpu: "); |
printf("halted - no kconsole\n"); |
cpu_halt(); |
} |
/** Tell kernel to get keyboard/console access again */ |
unative_t sys_debug_enable_console(void) |
{ |
#ifdef CONFIG_KCONSOLE |
grab_console(); |
return true; |
#else |
return false; |
#endif |
} |
waitq_sleep(&chardev->wq); |
ipl = interrupts_disable(); |
spinlock_lock(&chardev->lock); |
ch = chardev->buffer[(chardev->index - chardev->counter) % CHARDEV_BUFLEN]; |
chardev->counter--; |
spinlock_unlock(&chardev->lock); |
interrupts_restore(ipl); |
/** Tell kernel to relinquish keyboard/console access */ |
unative_t sys_debug_disable_console(void) |
{ |
release_console(); |
return true; |
chardev->op->resume(chardev); |
return ch; |
} |
/** Get string from input character device. |
/** Get string from character device. |
* |
* Read characters from input character device until first occurrence |
* Read characters from character device until first occurrence |
* of newline character. |
* |
* @param indev Input character device. |
* @param buf Buffer where to store string terminated by NULL. |
* @param chardev Character device. |
* @param buf Buffer where to store string terminated by '\0'. |
* @param buflen Size of the buffer. |
* |
* @return Number of characters read. |
* |
*/ |
size_t gets(indev_t *indev, char *buf, size_t buflen) |
count_t gets(chardev_t *chardev, char *buf, size_t buflen) |
{ |
size_t offset = 0; |
size_t count = 0; |
buf[offset] = 0; |
wchar_t ch; |
while ((ch = indev_pop_character(indev)) != '\n') { |
index_t index = 0; |
char ch; |
while (index < buflen) { |
ch = _getc(chardev); |
if (ch == '\b') { |
if (count > 0) { |
/* Space, backspace, space */ |
if (index > 0) { |
index--; |
/* Space backspace, space */ |
putchar('\b'); |
putchar(' '); |
putchar('\b'); |
count--; |
offset = str_lsize(buf, count); |
buf[offset] = 0; |
} |
continue; |
} |
putchar(ch); |
if (ch == '\n') { /* end of string => write 0, return */ |
buf[index] = '\0'; |
return (count_t) index; |
} |
if (chr_encode(ch, buf, &offset, buflen - 1) == EOK) { |
putchar(ch); |
count++; |
buf[offset] = 0; |
} |
buf[index++] = ch; |
} |
return count; |
return (count_t) index; |
} |
/** Get character from input device & echo it to screen */ |
wchar_t getc(indev_t *indev) |
/** Get character from device & echo it to screen */ |
uint8_t getc(chardev_t *chardev) |
{ |
wchar_t ch = indev_pop_character(indev); |
uint8_t ch; |
ch = _getc(chardev); |
putchar(ch); |
return ch; |
} |
212,8 → 237,8 |
{ |
spinlock_lock(&klog_lock); |
if ((klog_inited) && (event_is_subscribed(EVENT_KLOG)) && (klog_uspace > 0)) { |
event_notify_3(EVENT_KLOG, klog_start, klog_len, klog_uspace); |
if ((klog_inited) && (klog_irq.notif_cfg.notify) && (klog_uspace > 0)) { |
ipc_irq_send_msg_3(&klog_irq, klog_start, klog_len, klog_uspace); |
klog_uspace = 0; |
} |
220,27 → 245,27 |
spinlock_unlock(&klog_lock); |
} |
void putchar(const wchar_t ch) |
void putchar(char c) |
{ |
spinlock_lock(&klog_lock); |
if ((klog_stored > 0) && (stdout) && (stdout->op->write)) { |
if ((klog_stored > 0) && (stdout->op->write)) { |
/* Print charaters stored in kernel log */ |
size_t i; |
index_t i; |
for (i = klog_len - klog_stored; i < klog_len; i++) |
stdout->op->write(stdout, klog[(klog_start + i) % KLOG_LENGTH], silent); |
stdout->op->write(stdout, klog[(klog_start + i) % KLOG_SIZE]); |
klog_stored = 0; |
} |
/* Store character in the cyclic kernel log */ |
klog[(klog_start + klog_len) % KLOG_LENGTH] = ch; |
if (klog_len < KLOG_LENGTH) |
klog[(klog_start + klog_len) % KLOG_SIZE] = c; |
if (klog_len < KLOG_SIZE) |
klog_len++; |
else |
klog_start = (klog_start + 1) % KLOG_LENGTH; |
klog_start = (klog_start + 1) % KLOG_SIZE; |
if ((stdout) && (stdout->op->write)) |
stdout->op->write(stdout, ch, silent); |
if (stdout->op->write) |
stdout->op->write(stdout, c); |
else { |
/* The character is just in the kernel log */ |
if (klog_stored < klog_len) |
253,7 → 278,7 |
/* Check notify uspace to update */ |
bool update; |
if ((klog_uspace > KLOG_LATENCY) || (ch == '\n')) |
if ((klog_uspace > KLOG_LATENCY) || (c == '\n')) |
update = true; |
else |
update = false; |
264,38 → 289,5 |
klog_update(); |
} |
/** Print using kernel facility |
* |
* Print to kernel log. |
* |
*/ |
unative_t sys_klog(int fd, const void *buf, size_t size) |
{ |
char *data; |
int rc; |
if (size > PAGE_SIZE) |
return ELIMIT; |
if (size > 0) { |
data = (char *) malloc(size + 1, 0); |
if (!data) |
return ENOMEM; |
rc = copy_from_uspace(data, buf, size); |
if (rc) { |
free(data); |
return rc; |
} |
data[size] = 0; |
printf("%s", data); |
free(data); |
} else |
klog_update(); |
return size; |
} |
/** @} |
*/ |
/branches/arm/kernel/generic/src/console/chardev.c |
---|
33,119 → 33,46 |
*/ |
#include <console/chardev.h> |
#include <putchar.h> |
#include <synch/waitq.h> |
#include <synch/spinlock.h> |
#include <print.h> |
#include <func.h> |
#include <arch.h> |
/** Initialize input character device. |
/** Initialize character device. |
* |
* @param indev Input character device. |
* @param op Implementation of input character device operations. |
* |
* @param chardev Character device. |
* @param op Implementation of character device operations. |
*/ |
void indev_initialize(char *name, indev_t *indev, |
indev_operations_t *op) |
void chardev_initialize(char *name, chardev_t *chardev, |
chardev_operations_t *op) |
{ |
indev->name = name; |
waitq_initialize(&indev->wq); |
spinlock_initialize(&indev->lock, "indev"); |
indev->counter = 0; |
indev->index = 0; |
indev->op = op; |
chardev->name = name; |
waitq_initialize(&chardev->wq); |
spinlock_initialize(&chardev->lock, "chardev"); |
chardev->counter = 0; |
chardev->index = 0; |
chardev->op = op; |
} |
/** Push character read from input character device. |
* |
* @param indev Input character device. |
* @param ch Character being pushed. |
* |
* @param chardev Character device. |
* @param ch Character being pushed. |
*/ |
void indev_push_character(indev_t *indev, wchar_t ch) |
void chardev_push_character(chardev_t *chardev, uint8_t ch) |
{ |
ASSERT(indev); |
spinlock_lock(&indev->lock); |
if (indev->counter == INDEV_BUFLEN - 1) { |
/* Buffer full */ |
spinlock_unlock(&indev->lock); |
return; |
spinlock_lock(&chardev->lock); |
chardev->counter++; |
if (chardev->counter == CHARDEV_BUFLEN - 1) { |
/* buffer full => disable device interrupt */ |
chardev->op->suspend(chardev); |
} |
indev->counter++; |
indev->buffer[indev->index++] = ch; |
/* Index modulo size of buffer */ |
indev->index = indev->index % INDEV_BUFLEN; |
waitq_wakeup(&indev->wq, WAKEUP_FIRST); |
spinlock_unlock(&indev->lock); |
chardev->buffer[chardev->index++] = ch; |
chardev->index = chardev->index % CHARDEV_BUFLEN; /* index modulo size of buffer */ |
waitq_wakeup(&chardev->wq, WAKEUP_FIRST); |
spinlock_unlock(&chardev->lock); |
} |
/** Pop character from input character device. |
* |
* @param indev Input character device. |
* |
* @return Character read. |
* |
*/ |
wchar_t indev_pop_character(indev_t *indev) |
{ |
if (atomic_get(&haltstate)) { |
/* If we are here, we are hopefully on the processor that |
* issued the 'halt' command, so proceed to read the character |
* directly from input |
*/ |
if (check_poll(indev)) |
return indev->op->poll(indev); |
/* No other way of interacting with user */ |
interrupts_disable(); |
if (CPU) |
printf("cpu%u: ", CPU->id); |
else |
printf("cpu: "); |
printf("halted (no polling input)\n"); |
cpu_halt(); |
} |
waitq_sleep(&indev->wq); |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&indev->lock); |
wchar_t ch = indev->buffer[(indev->index - indev->counter) % INDEV_BUFLEN]; |
indev->counter--; |
spinlock_unlock(&indev->lock); |
interrupts_restore(ipl); |
return ch; |
} |
/** Initialize output character device. |
* |
* @param outdev Output character device. |
* @param op Implementation of output character device operations. |
* |
*/ |
void outdev_initialize(char *name, outdev_t *outdev, |
outdev_operations_t *op) |
{ |
outdev->name = name; |
spinlock_initialize(&outdev->lock, "outdev"); |
outdev->op = op; |
} |
bool check_poll(indev_t *indev) |
{ |
if (indev == NULL) |
return false; |
if (indev->op == NULL) |
return false; |
return (indev->op->poll != NULL); |
} |
/** @} |
*/ |
/branches/arm/kernel/generic/src/main/uinit.c |
---|
79,14 → 79,6 |
uarg.uspace_thread_arg = NULL; |
free((uspace_arg_t *) arg); |
/* |
* Disable interrupts so that the execution of userspace() is not |
* disturbed by any interrupts as some of the userspace() |
* implementations will switch to the userspace stack before switching |
* the mode. |
*/ |
(void) interrupts_disable(); |
userspace(&uarg); |
} |
/branches/arm/kernel/generic/src/main/kinit.c |
---|
32,7 → 32,7 |
/** |
* @file |
* @brief Kernel initialization thread. |
* @brief Kernel initialization thread. |
* |
* This file contains kinit kernel thread which carries out |
* high level system initialization. |
64,8 → 64,6 |
#include <security/cap.h> |
#include <lib/rd.h> |
#include <ipc/ipc.h> |
#include <debug.h> |
#include <string.h> |
#ifdef CONFIG_SMP |
#include <smp/smp.h> |
74,15 → 72,6 |
#include <synch/waitq.h> |
#include <synch/spinlock.h> |
#define ALIVE_CHARS 4 |
#ifdef CONFIG_KCONSOLE |
static char alive[ALIVE_CHARS] = "-\\|/"; |
#endif |
#define INIT_PREFIX "init:" |
#define INIT_PREFIX_LEN 5 |
/** Kernel initialization thread. |
* |
* kinit takes care of higher level kernel |
93,19 → 82,16 |
*/ |
void kinit(void *arg) |
{ |
thread_t *t; |
#if defined(CONFIG_SMP) || defined(CONFIG_KCONSOLE) |
thread_t *thread; |
#endif |
/* |
* Detach kinit as nobody will call thread_join_timeout() on it. |
*/ |
thread_detach(THREAD); |
interrupts_disable(); |
#ifdef CONFIG_SMP |
#ifdef CONFIG_SMP |
if (config.cpu_count > 1) { |
waitq_initialize(&ap_completion_wq); |
/* |
114,90 → 100,78 |
* not mess together with kcpulb threads. |
* Just a beautification. |
*/ |
thread = thread_create(kmp, NULL, TASK, THREAD_FLAG_WIRED, "kmp", true); |
if (thread != NULL) { |
spinlock_lock(&thread->lock); |
thread->cpu = &cpus[0]; |
spinlock_unlock(&thread->lock); |
thread_ready(thread); |
if ((t = thread_create(kmp, NULL, TASK, THREAD_FLAG_WIRED, |
"kmp", true))) { |
spinlock_lock(&t->lock); |
t->cpu = &cpus[0]; |
spinlock_unlock(&t->lock); |
thread_ready(t); |
} else |
panic("Unable to create kmp thread."); |
thread_join(thread); |
thread_detach(thread); |
panic("thread_create/kmp\n"); |
thread_join(t); |
thread_detach(t); |
} |
#endif /* CONFIG_SMP */ |
/* |
* Now that all CPUs are up, we can report what we've found. |
*/ |
cpu_list(); |
#ifdef CONFIG_SMP |
if (config.cpu_count > 1) { |
size_t i; |
count_t i; |
/* |
* For each CPU, create its load balancing thread. |
*/ |
for (i = 0; i < config.cpu_count; i++) { |
thread = thread_create(kcpulb, NULL, TASK, THREAD_FLAG_WIRED, "kcpulb", true); |
if (thread != NULL) { |
spinlock_lock(&thread->lock); |
thread->cpu = &cpus[i]; |
spinlock_unlock(&thread->lock); |
thread_ready(thread); |
if ((t = thread_create(kcpulb, NULL, TASK, |
THREAD_FLAG_WIRED, "kcpulb", true))) { |
spinlock_lock(&t->lock); |
t->cpu = &cpus[i]; |
spinlock_unlock(&t->lock); |
thread_ready(t); |
} else |
printf("Unable to create kcpulb thread for cpu" PRIs "\n", i); |
panic("thread_create/kcpulb\n"); |
} |
} |
#endif /* CONFIG_SMP */ |
/* |
* At this point SMP, if present, is configured. |
*/ |
arch_post_smp_init(); |
#ifdef CONFIG_KCONSOLE |
if (stdin) { |
/* |
* Create kernel console. |
*/ |
thread = thread_create(kconsole_thread, NULL, TASK, 0, "kconsole", false); |
if (thread != NULL) |
thread_ready(thread); |
else |
printf("Unable to create kconsole thread\n"); |
} |
#endif /* CONFIG_KCONSOLE */ |
/* |
* Create kernel console. |
*/ |
t = thread_create(kconsole, (void *) "kconsole", TASK, 0, "kconsole", |
false); |
if (t) |
thread_ready(t); |
else |
panic("thread_create/kconsole\n"); |
interrupts_enable(); |
/* |
* Create user tasks, load RAM disk images. |
*/ |
size_t i; |
count_t i; |
program_t programs[CONFIG_INIT_TASKS]; |
for (i = 0; i < init.cnt; i++) { |
if (init.tasks[i].addr % FRAME_SIZE) { |
printf("init[%" PRIs "].addr is not frame aligned\n", i); |
printf("init[%" PRIc "].addr is not frame aligned", i); |
continue; |
} |
/* |
* Construct task name from the 'init:' prefix and the |
* name stored in the init structure (if any). |
*/ |
char namebuf[TASK_NAME_BUFLEN]; |
char *name; |
name = init.tasks[i].name; |
if (name[0] == 0) |
name = "<unknown>"; |
ASSERT(TASK_NAME_BUFLEN >= INIT_PREFIX_LEN); |
str_cpy(namebuf, TASK_NAME_BUFLEN, INIT_PREFIX); |
str_cpy(namebuf + INIT_PREFIX_LEN, |
TASK_NAME_BUFLEN - INIT_PREFIX_LEN, name); |
int rc = program_create_from_image((void *) init.tasks[i].addr, |
namebuf, &programs[i]); |
if ((rc == 0) && (programs[i].task != NULL)) { |
&programs[i]); |
if (rc == 0 && programs[i].task != NULL) { |
/* |
* Set capabilities to init userspace tasks. |
*/ |
210,34 → 184,31 |
/* It was the program loader and was registered */ |
} else { |
/* RAM disk image */ |
int rd = init_rd((rd_header_t *) init.tasks[i].addr, init.tasks[i].size); |
int rd = init_rd((rd_header_t *) init.tasks[i].addr, |
init.tasks[i].size); |
if (rd != RE_OK) |
printf("Init binary %" PRIs " not used (error %d)\n", i, rd); |
printf("Init binary %" PRIc " not used, error " |
"code %d.\n", i, rd); |
} |
} |
/* |
* Run user tasks. |
* Run user tasks with reasonable delays |
*/ |
for (i = 0; i < init.cnt; i++) { |
if (programs[i].task != NULL) |
if (programs[i].task != NULL) { |
thread_usleep(50000); |
program_ready(&programs[i]); |
} |
} |
#ifdef CONFIG_KCONSOLE |
if (!stdin) { |
thread_sleep(10); |
printf("kinit: No stdin\nKernel alive: ."); |
unsigned int i = 0; |
while (true) { |
printf("\b%c", alive[i % ALIVE_CHARS]); |
while (1) { |
thread_sleep(1); |
i++; |
printf("kinit... "); |
} |
} |
#endif /* CONFIG_KCONSOLE */ |
} |
/** @} |
/branches/arm/kernel/generic/src/main/main.c |
---|
32,7 → 32,7 |
/** |
* @file |
* @brief Main initialization kernel function for all processors. |
* @brief Main initialization kernel function for all processors. |
* |
* During kernel boot, all processors, after architecture dependent |
* initialization, start executing code found in this file. After |
81,9 → 81,8 |
#include <adt/btree.h> |
#include <smp/smp.h> |
#include <ddi/ddi.h> |
#include <main/main.h> |
#include <ipc/event.h> |
/** Global configuration structure. */ |
config_t config; |
106,15 → 105,18 |
* appropriate sizes and addresses. |
*/ |
/** Virtual address of where the kernel is loaded. */ |
/**< Virtual address of where the kernel is loaded. */ |
uintptr_t hardcoded_load_address = 0; |
/** Size of the kernel code in bytes. */ |
/**< Size of the kernel code in bytes. */ |
size_t hardcoded_ktext_size = 0; |
/** Size of the kernel data in bytes. */ |
/**< Size of the kernel data in bytes. */ |
size_t hardcoded_kdata_size = 0; |
/** Lowest safe stack virtual address. */ |
/**< Lowest safe stack virtual address. */ |
uintptr_t stack_safe = 0; |
void main_bsp(void); |
void main_ap(void); |
/* |
* These two functions prevent stack from underflowing during the |
* kernel boot phase when SP is set to the very top of the reserved |
153,7 → 155,7 |
config.stack_base = config.base + config.kernel_size; |
/* Avoid placing stack on top of init */ |
size_t i; |
count_t i; |
for (i = 0; i < init.cnt; i++) { |
if (PA_overlaps(config.stack_base, config.stack_size, |
init.tasks[i].addr, init.tasks[i].size)) |
189,6 → 191,8 |
{ |
/* Keep this the first thing. */ |
the_initialize(THE); |
LOG(); |
version_print(); |
197,7 → 201,7 |
config.base, config.kernel_size, config.stack_base, |
config.stack_size); |
#ifdef CONFIG_KCONSOLE |
/* |
* kconsole data structures must be initialized very early |
* because other subsystems will register their respective |
204,7 → 208,6 |
* commands. |
*/ |
LOG_EXEC(kconsole_init()); |
#endif |
/* |
* Exception handler initialization, before architecture |
211,7 → 214,7 |
* starts adding its own handlers |
*/ |
LOG_EXEC(exc_init()); |
/* |
* Memory management subsystems initialization. |
*/ |
233,7 → 236,7 |
/* Slab must be initialized after we know the number of processors. */ |
LOG_EXEC(slab_enable_cpucache()); |
printf("Detected %" PRIs " CPU(s), %" PRIu64" MiB free memory\n", |
printf("Detected %" PRIc " CPU(s), %" PRIu64" MiB free memory\n", |
config.cpu_count, SIZE2MB(zone_total_size())); |
LOG_EXEC(cpu_init()); |
247,32 → 250,31 |
LOG_EXEC(futex_init()); |
if (init.cnt > 0) { |
size_t i; |
count_t i; |
for (i = 0; i < init.cnt; i++) |
LOG("init[%" PRIs "].addr=%#" PRIp ", init[%" PRIs |
"].size=%#" PRIs, i, init.tasks[i].addr, i, |
printf("init[%" PRIc "].addr=%#" PRIp ", init[%" PRIc |
"].size=%#" PRIs "\n", i, init.tasks[i].addr, i, |
init.tasks[i].size); |
} else |
printf("No init binaries found.\n"); |
printf("No init binaries found\n"); |
LOG_EXEC(ipc_init()); |
LOG_EXEC(event_init()); |
LOG_EXEC(klog_init()); |
/* |
* Create kernel task. |
*/ |
task_t *kernel = task_create(AS_KERNEL, "kernel"); |
if (!kernel) |
panic("Cannot create kernel task."); |
panic("Can't create kernel task\n"); |
/* |
* Create the first thread. |
*/ |
thread_t *kinit_thread |
= thread_create(kinit, NULL, kernel, 0, "kinit", true); |
thread_t *kinit_thread = thread_create(kinit, NULL, kernel, 0, "kinit", |
true); |
if (!kinit_thread) |
panic("Cannot create kinit thread."); |
panic("Can't create kinit thread\n"); |
LOG_EXEC(thread_ready(kinit_thread)); |
/* |
326,7 → 328,6 |
* collide with another CPU coming up. To prevent this, we |
* switch to this cpu's private stack prior to waking kmp up. |
*/ |
context_save(&CPU->saved_context); |
context_set(&CPU->saved_context, FADDR(main_ap_separated_stack), |
(uintptr_t) CPU->stack, CPU_STACK_SIZE); |
context_restore(&CPU->saved_context); |
/branches/arm/kernel/generic/src/main/version.c |
---|
34,22 → 34,21 |
#include <main/version.h> |
#include <print.h> |
#include <macros.h> |
char *project = "SPARTAN kernel"; |
char *copyright = "Copyright (c) 2001-2009 HelenOS project"; |
char *release = STRING(RELEASE); |
char *name = STRING(NAME); |
char *arch = STRING(KARCH); |
char *copyright = "Copyright (c) 2001-2008 HelenOS project"; |
char *release = RELEASE; |
char *name = NAME; |
char *arch = ARCH; |
#ifdef REVISION |
char *revision = ", revision " STRING(REVISION); |
char *revision = ", revision " REVISION; |
#else |
char *revision = ""; |
#endif |
#ifdef TIMESTAMP |
char *timestamp = " on " STRING(TIMESTAMP); |
char *timestamp = " on " TIMESTAMP; |
#else |
char *timestamp = ""; |
#endif |
/branches/arm/kernel/generic/src/main/shutdown.c |
---|
32,11 → 32,10 |
/** |
* @file |
* @brief Shutdown procedures. |
* @brief Shutdown procedures. |
*/ |
#include <arch.h> |
#include <func.h> |
#include <print.h> |
void reboot(void) |
48,7 → 47,6 |
#endif |
arch_reboot(); |
halt(); |
} |
/** @} |
/branches/arm/kernel/generic/src/proc/task.c |
---|
52,10 → 52,7 |
#include <print.h> |
#include <errno.h> |
#include <func.h> |
#include <string.h> |
#include <syscall/copy.h> |
#include <macros.h> |
#include <ipc/event.h> |
/** Spinlock protecting the tasks_tree AVL tree. */ |
SPINLOCK_INITIALIZE(tasks_lock); |
133,7 → 130,7 |
/** Create new task with no threads. |
* |
* @param as Task's address space. |
* @param name Symbolic name (a copy is made). |
* @param name Symbolic name. |
* |
* @return New task's structure. |
* |
151,10 → 148,7 |
spinlock_initialize(&ta->lock, "task_ta_lock"); |
list_initialize(&ta->th_head); |
ta->as = as; |
memcpy(ta->name, name, TASK_NAME_BUFLEN); |
ta->name[TASK_NAME_BUFLEN - 1] = 0; |
ta->name = name; |
atomic_set(&ta->refcount, 0); |
atomic_set(&ta->lifecount, 0); |
ta->context = CONTEXT; |
167,10 → 161,10 |
udebug_task_init(&ta->udebug); |
/* Init kbox stuff */ |
ipc_answerbox_init(&ta->kb.box, ta); |
ta->kb.thread = NULL; |
mutex_initialize(&ta->kb.cleanup_lock, MUTEX_PASSIVE); |
ta->kb.finished = false; |
ipc_answerbox_init(&ta->kernel_box, ta); |
ta->kb_thread = NULL; |
mutex_initialize(&ta->kb_cleanup_lock, MUTEX_PASSIVE); |
ta->kb_finished = false; |
#endif |
ipc_answerbox_init(&ta->answerbox, ta); |
198,14 → 192,7 |
avltree_insert(&tasks_tree, &ta->tasks_tree_node); |
spinlock_unlock(&tasks_lock); |
interrupts_restore(ipl); |
/* |
* Notify about task creation. |
*/ |
if (event_is_subscribed(EVENT_WAIT)) |
event_notify_3(EVENT_WAIT, TASK_CREATE, LOWER32(ta->taskid), |
UPPER32(ta->taskid)); |
return ta; |
} |
238,13 → 225,6 |
if (atomic_predec(&t->as->refcount) == 0) |
as_destroy(t->as); |
/* |
* Notify about task destruction. |
*/ |
if (event_is_subscribed(EVENT_WAIT)) |
event_notify_3(EVENT_WAIT, TASK_DESTROY, LOWER32(t->taskid), |
UPPER32(t->taskid)); |
free(t); |
TASK = NULL; |
} |
266,35 → 246,6 |
sizeof(TASK->taskid)); |
} |
/** Syscall for setting the task name. |
* |
* The name simplifies identifying the task in the task list. |
* |
* @param name The new name for the task. (typically the same |
* as the command used to execute it). |
* |
* @return 0 on success or an error code from @ref errno.h. |
*/ |
unative_t sys_task_set_name(const char *uspace_name, size_t name_len) |
{ |
int rc; |
char namebuf[TASK_NAME_BUFLEN]; |
/* Cap length of name and copy it from userspace. */ |
if (name_len > TASK_NAME_BUFLEN - 1) |
name_len = TASK_NAME_BUFLEN - 1; |
rc = copy_from_uspace(namebuf, uspace_name, name_len); |
if (rc != 0) |
return (unative_t) rc; |
namebuf[name_len] = '\0'; |
str_cpy(TASK->name, TASK_NAME_BUFLEN, namebuf); |
return EOK; |
} |
/** Find task structure corresponding to task ID. |
* |
* The tasks_lock must be already held by the caller of this function and |
385,7 → 336,7 |
bool sleeping = false; |
thr = list_get_instance(cur, thread_t, th_link); |
spinlock_lock(&thr->lock); |
thr->interrupted = true; |
if (thr->state == Sleeping) |
413,13 → 364,13 |
order(task_get_accounting(t), &cycles, &suffix); |
#ifdef __32_BITS__ |
printf("%-6" PRIu64 " %-12s %-3" PRIu32 " %10p %10p %9" PRIu64 |
printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %10p %10p %9" PRIu64 |
"%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles, |
suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls)); |
#endif |
#ifdef __64_BITS__ |
printf("%-6" PRIu64 " %-12s %-3" PRIu32 " %18p %18p %9" PRIu64 |
printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %18p %18p %9" PRIu64 |
"%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles, |
suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls)); |
#endif |
444,16 → 395,16 |
spinlock_lock(&tasks_lock); |
#ifdef __32_BITS__ |
printf("taskid name ctx address as " |
printf("taskid name ctx address as " |
"cycles threads calls callee\n"); |
printf("------ ------------ --- ---------- ---------- " |
printf("------ ---------- --- ---------- ---------- " |
"---------- ------- ------ ------>\n"); |
#endif |
#ifdef __64_BITS__ |
printf("taskid name ctx address as " |
printf("taskid name ctx address as " |
"cycles threads calls callee\n"); |
printf("------ ------------ --- ------------------ ------------------ " |
printf("------ ---------- --- ------------------ ------------------ " |
"---------- ------- ------ ------>\n"); |
#endif |
/branches/arm/kernel/generic/src/proc/thread.c |
---|
102,7 → 102,7 |
thread_id_t last_tid = 0; |
static slab_cache_t *thread_slab; |
#ifdef CONFIG_FPU |
#ifdef ARCH_HAS_FPU |
slab_cache_t *fpu_context_slab; |
#endif |
161,7 → 161,7 |
/* call the architecture-specific part of the constructor */ |
thr_constructor_arch(t); |
#ifdef CONFIG_FPU |
#ifdef ARCH_HAS_FPU |
#ifdef CONFIG_FPU_LAZY |
t->saved_fpu_context = NULL; |
#else |
169,11 → 169,11 |
if (!t->saved_fpu_context) |
return -1; |
#endif |
#endif |
#endif |
t->kstack = (uint8_t *) frame_alloc(STACK_FRAMES, FRAME_KA | kmflags); |
if (!t->kstack) { |
#ifdef CONFIG_FPU |
#ifdef ARCH_HAS_FPU |
if (t->saved_fpu_context) |
slab_free(fpu_context_slab, t->saved_fpu_context); |
#endif |
196,7 → 196,7 |
thr_destructor_arch(t); |
frame_free(KA2PA(t->kstack)); |
#ifdef CONFIG_FPU |
#ifdef ARCH_HAS_FPU |
if (t->saved_fpu_context) |
slab_free(fpu_context_slab, t->saved_fpu_context); |
#endif |
211,11 → 211,11 |
void thread_init(void) |
{ |
THREAD = NULL; |
atomic_set(&nrdy, 0); |
atomic_set(&nrdy,0); |
thread_slab = slab_cache_create("thread_slab", sizeof(thread_t), 0, |
thr_constructor, thr_destructor, 0); |
#ifdef CONFIG_FPU |
#ifdef ARCH_HAS_FPU |
fpu_context_slab = slab_cache_create("fpu_slab", sizeof(fpu_context_t), |
FPU_CONTEXT_ALIGN, NULL, NULL, 0); |
#endif |
279,7 → 279,7 |
* guarantee that the task won't cease to exist during the |
* call. The task's lock may not be held. |
* @param flags Thread flags. |
* @param name Symbolic name (a copy is made). |
* @param name Symbolic name. |
* @param uncounted Thread's accounting doesn't affect accumulated task |
* accounting. |
* |
316,7 → 316,6 |
interrupts_restore(ipl); |
memcpy(t->name, name, THREAD_NAME_BUFLEN); |
t->name[THREAD_NAME_BUFLEN - 1] = 0; |
t->thread_code = func; |
t->thread_arg = arg; |
709,7 → 708,7 |
* |
*/ |
unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, |
size_t name_len, thread_id_t *uspace_thread_id) |
thread_id_t *uspace_thread_id) |
{ |
thread_t *t; |
char namebuf[THREAD_NAME_BUFLEN]; |
716,15 → 715,10 |
uspace_arg_t *kernel_uarg; |
int rc; |
if (name_len > THREAD_NAME_BUFLEN - 1) |
name_len = THREAD_NAME_BUFLEN - 1; |
rc = copy_from_uspace(namebuf, uspace_name, name_len); |
rc = copy_from_uspace(namebuf, uspace_name, THREAD_NAME_BUFLEN); |
if (rc != 0) |
return (unative_t) rc; |
namebuf[name_len] = 0; |
/* |
* In case of failure, kernel_uarg will be deallocated in this function. |
* In case of success, kernel_uarg will be freed in uinit(). |
763,20 → 757,14 |
return (unative_t) rc; |
} |
} |
#ifdef CONFIG_UDEBUG |
/* |
* Generate udebug THREAD_B event and attach the thread. |
* This must be done atomically (with the debug locks held), |
* otherwise we would either miss some thread or receive |
* THREAD_B events for threads that already existed |
* and could be detected with THREAD_READ before. |
*/ |
udebug_thread_b_event_attach(t, TASK); |
#else |
thread_attach(t, TASK); |
#endif |
thread_ready(t); |
#ifdef CONFIG_UDEBUG |
/* Generate udebug THREAD_B event */ |
udebug_thread_b_event(t); |
#endif |
return 0; |
} else |
free(kernel_uarg); |
/branches/arm/kernel/generic/src/proc/program.c |
---|
67,10 → 67,9 |
* |
* @param as Address space containing a binary program image. |
* @param entry_addr Program entry-point address in program address space. |
* @param name Name to set for the program's task. |
* @param p Buffer for storing program information. |
*/ |
void program_create(as_t *as, uintptr_t entry_addr, char *name, program_t *p) |
void program_create(as_t *as, uintptr_t entry_addr, program_t *p) |
{ |
as_area_t *a; |
uspace_arg_t *kernel_uarg; |
82,7 → 81,7 |
kernel_uarg->uspace_thread_arg = NULL; |
kernel_uarg->uspace_uarg = NULL; |
p->task = task_create(as, name); |
p->task = task_create(as, "app"); |
ASSERT(p->task); |
/* |
107,7 → 106,6 |
* executable image. The task is returned in *task. |
* |
* @param image_addr Address of an executable program image. |
* @param name Name to set for the program's task. |
* @param p Buffer for storing program info. If image_addr |
* points to a loader image, p->task will be set to |
* NULL and EOK will be returned. |
114,7 → 112,7 |
* |
* @return EOK on success or negative error code. |
*/ |
int program_create_from_image(void *image_addr, char *name, program_t *p) |
int program_create_from_image(void *image_addr, program_t *p) |
{ |
as_t *as; |
unsigned int rc; |
133,12 → 131,12 |
/* Register image as the program loader */ |
ASSERT(program_loader == NULL); |
program_loader = image_addr; |
LOG("Registered program loader at 0x%" PRIp "\n", |
printf("Registered program loader at 0x%" PRIp "\n", |
image_addr); |
return EOK; |
} |
program_create(as, ((elf_header_t *) image_addr)->e_entry, name, p); |
program_create(as, ((elf_header_t *) image_addr)->e_entry, p); |
return EOK; |
} |
145,12 → 143,10 |
/** Create a task from the program loader image. |
* |
* @param p Buffer for storing program info. |
* @param name Name to set for the program's task. |
* |
* @param p Buffer for storing program info. |
* @return EOK on success or negative error code. |
*/ |
int program_create_loader(program_t *p, char *name) |
int program_create_loader(program_t *p) |
{ |
as_t *as; |
unsigned int rc; |
171,8 → 167,7 |
return ENOENT; |
} |
program_create(as, ((elf_header_t *) program_loader)->e_entry, |
name, p); |
program_create(as, ((elf_header_t *) program_loader)->e_entry, p); |
return EOK; |
} |
190,37 → 185,48 |
/** Syscall for creating a new loader instance from userspace. |
* |
* Creates a new task from the program loader image and sets |
* the task name. |
* Creates a new task from the program loader image, connects a phone |
* to it and stores the phone id into the provided buffer. |
* |
* @param name Name to set on the new task (typically the same |
* as the command used to execute it). |
* @param uspace_phone_id Userspace address where to store the phone id. |
* |
* @return 0 on success or an error code from @ref errno.h. |
*/ |
unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len) |
unative_t sys_program_spawn_loader(int *uspace_phone_id) |
{ |
program_t p; |
int fake_id; |
int rc; |
char namebuf[TASK_NAME_BUFLEN]; |
int phone_id; |
/* Cap length of name and copy it from userspace. */ |
fake_id = 0; |
if (name_len > TASK_NAME_BUFLEN - 1) |
name_len = TASK_NAME_BUFLEN - 1; |
rc = copy_from_uspace(namebuf, uspace_name, name_len); |
/* Before we even try creating the task, see if we can write the id */ |
rc = (unative_t) copy_to_uspace(uspace_phone_id, &fake_id, |
sizeof(fake_id)); |
if (rc != 0) |
return (unative_t) rc; |
return rc; |
namebuf[name_len] = 0; |
phone_id = phone_alloc(); |
if (phone_id < 0) |
return ELIMIT; |
/* Spawn the new task. */ |
rc = program_create_loader(&p, namebuf); |
rc = program_create_loader(&p); |
if (rc != 0) |
return rc; |
phone_connect(phone_id, &p.task->answerbox); |
/* No need to aquire lock before task_ready() */ |
rc = (unative_t) copy_to_uspace(uspace_phone_id, &phone_id, |
sizeof(phone_id)); |
if (rc != 0) { |
/* Ooops */ |
ipc_phone_hangup(&TASK->phones[phone_id]); |
task_kill(p.task->taskid); |
return rc; |
} |
// FIXME: control the capabilities |
cap_set(p.task, cap_get(TASK)); |
/branches/arm/kernel/generic/src/proc/scheduler.c |
---|
451,7 → 451,7 |
/* |
* Entering state is unexpected. |
*/ |
panic("tid%" PRIu64 ": unexpected state %s.", |
panic("tid%" PRIu64 ": unexpected state %s\n", |
THREAD->tid, thread_states[THREAD->state]); |
break; |
} |
708,7 → 708,7 |
continue; |
spinlock_lock(&cpus[cpu].lock); |
printf("cpu%u: address=%p, nrdy=%ld, needs_relink=%" PRIs "\n", |
printf("cpu%u: address=%p, nrdy=%ld, needs_relink=%" PRIc "\n", |
cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy), |
cpus[cpu].needs_relink); |
/branches/arm/kernel/generic/src/proc/tasklet.c |
---|
51,7 → 51,7 |
tasklet_list = malloc(sizeof(tasklet_descriptor_t *) * config.cpu_count, 0); |
if (!tasklet_list) |
panic("Error initializing tasklets."); |
panic("Error initializing tasklets"); |
for (i = 0; i < config.cpu_count; i++) |
tasklet_list[i] = NULL; |
/branches/arm/kernel/generic/src/syscall/syscall.c |
---|
32,9 → 32,9 |
/** |
* @file |
* @brief Syscall table and syscall wrappers. |
* @brief Syscall table and syscall wrappers. |
*/ |
#include <syscall/syscall.h> |
#include <proc/thread.h> |
#include <proc/task.h> |
41,19 → 41,61 |
#include <proc/program.h> |
#include <mm/as.h> |
#include <print.h> |
#include <putchar.h> |
#include <errno.h> |
#include <arch.h> |
#include <debug.h> |
#include <ddi/device.h> |
#include <ipc/sysipc.h> |
#include <synch/futex.h> |
#include <synch/smc.h> |
#include <ddi/ddi.h> |
#include <ipc/event.h> |
#include <security/cap.h> |
#include <syscall/copy.h> |
#include <sysinfo/sysinfo.h> |
#include <console/console.h> |
#include <udebug/udebug.h> |
/** Print using kernel facility |
* |
* Print to kernel log. |
* |
*/ |
static unative_t sys_klog(int fd, const void * buf, size_t count) |
{ |
size_t i; |
char *data; |
int rc; |
if (count > PAGE_SIZE) |
return ELIMIT; |
if (count > 0) { |
data = (char *) malloc(count, 0); |
if (!data) |
return ENOMEM; |
rc = copy_from_uspace(data, buf, count); |
if (rc) { |
free(data); |
return rc; |
} |
for (i = 0; i < count; i++) |
putchar(data[i]); |
free(data); |
} else |
klog_update(); |
return count; |
} |
/** Tell kernel to get keyboard/console access again */ |
static unative_t sys_debug_enable_console(void) |
{ |
arch_grab_console(); |
return 0; |
} |
/** Dispatch system call */ |
unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3, |
unative_t a4, unative_t a5, unative_t a6, unative_t id) |
61,20 → 103,13 |
unative_t rc; |
#ifdef CONFIG_UDEBUG |
bool debug; |
udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false); |
#endif |
/* |
* Early check for undebugged tasks. We do not lock anything as this |
* test need not be precise in either way. |
*/ |
debug = THREAD->udebug.active; |
if (debug) { |
udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false); |
} |
if (id < SYSCALL_END) { |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_begin(); |
#endif |
if (id < SYSCALL_END) { |
rc = syscall_table[id](a1, a2, a3, a4, a5, a6); |
} else { |
printf("Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id); |
81,22 → 116,13 |
task_kill(TASK->taskid); |
thread_exit(); |
} |
if (THREAD->interrupted) |
thread_exit(); |
#ifdef CONFIG_UDEBUG |
if (debug) { |
udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true); |
/* |
* Stopping point needed for tasks that only invoke |
* non-blocking system calls. Not needed if the task |
* is not being debugged (it cannot block here). |
*/ |
udebug_stoppable_begin(); |
udebug_stoppable_end(); |
} |
udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true); |
udebug_stoppable_end(); |
#endif |
return rc; |
112,7 → 138,6 |
(syshandler_t) sys_thread_get_id, |
(syshandler_t) sys_task_get_id, |
(syshandler_t) sys_task_set_name, |
(syshandler_t) sys_program_spawn_loader, |
/* Synchronization related syscalls. */ |
134,14 → 159,10 |
(syshandler_t) sys_ipc_answer_fast, |
(syshandler_t) sys_ipc_answer_slow, |
(syshandler_t) sys_ipc_forward_fast, |
(syshandler_t) sys_ipc_forward_slow, |
(syshandler_t) sys_ipc_wait_for_call, |
(syshandler_t) sys_ipc_hangup, |
(syshandler_t) sys_ipc_register_irq, |
(syshandler_t) sys_ipc_unregister_irq, |
/* Event notification syscalls. */ |
(syshandler_t) sys_event_subscribe, |
/* Capabilities related syscalls. */ |
(syshandler_t) sys_cap_grant, |
148,7 → 169,6 |
(syshandler_t) sys_cap_revoke, |
/* DDI related syscalls. */ |
(syshandler_t) sys_device_assign_devno, |
(syshandler_t) sys_physmem_map, |
(syshandler_t) sys_iospace_enable, |
(syshandler_t) sys_preempt_control, |
159,8 → 179,7 |
/* Debug calls */ |
(syshandler_t) sys_debug_enable_console, |
(syshandler_t) sys_debug_disable_console, |
(syshandler_t) sys_ipc_connect_kbox |
}; |
/branches/arm/kernel/generic/src/mm/as.c |
---|
122,7 → 122,7 |
int rc; |
link_initialize(&as->inactive_as_with_asid_link); |
mutex_initialize(&as->lock, MUTEX_PASSIVE); |
mutex_initialize(&as->lock, MUTEX_PASSIVE); |
rc = as_constructor_arch(as, flags); |
146,12 → 146,8 |
AS_KERNEL = as_create(FLAG_AS_KERNEL); |
if (!AS_KERNEL) |
panic("Cannot create kernel address space."); |
panic("can't create kernel address space\n"); |
/* Make sure the kernel address space |
* reference count never drops to zero. |
*/ |
atomic_set(&AS_KERNEL->refcount, 1); |
} |
/** Create address space. |
180,7 → 176,7 |
#else |
page_table_create(flags); |
#endif |
return as; |
} |
418,8 → 414,8 |
btree_node_t, leaf_link); |
if ((cond = (bool) node->keys)) { |
uintptr_t b = node->key[node->keys - 1]; |
size_t c = |
(size_t) node->value[node->keys - 1]; |
count_t c = |
(count_t) node->value[node->keys - 1]; |
unsigned int i = 0; |
if (overlaps(b, c * PAGE_SIZE, area->base, |
444,8 → 440,8 |
i = (start_free - b) >> PAGE_WIDTH; |
if (!used_space_remove(area, start_free, |
c - i)) |
panic("Cannot remove used " |
"space."); |
panic("Could not remove used " |
"space.\n"); |
} else { |
/* |
* The interval of used space can be |
452,8 → 448,8 |
* completely removed. |
*/ |
if (!used_space_remove(area, b, c)) |
panic("Cannot remove used " |
"space."); |
panic("Could not remove used " |
"space.\n"); |
} |
for (; i < c; i++) { |
555,10 → 551,10 |
node = list_get_instance(cur, btree_node_t, leaf_link); |
for (i = 0; i < node->keys; i++) { |
uintptr_t b = node->key[i]; |
size_t j; |
count_t j; |
pte_t *pte; |
for (j = 0; j < (size_t) node->value[i]; j++) { |
for (j = 0; j < (count_t) node->value[i]; j++) { |
page_table_lock(as, false); |
pte = page_mapping_find(as, b + j * PAGE_SIZE); |
ASSERT(pte && PTE_VALID(pte) && |
773,12 → 769,11 |
* In order for this to work properly, this may copy the data |
* into private anonymous memory (unless it's already there). |
* |
* @param as Address space. |
* @param flags Flags of the area memory. |
* @param address Address within the area to be changed. |
* @param as Address space. |
* @param flags Flags of the area memory. |
* @param address Address withing the area to be changed. |
* |
* @return Zero on success or a value from @ref errno.h on failure. |
* |
* @return Zero on success or a value from @ref errno.h on failure. |
*/ |
int as_area_change_flags(as_t *as, int flags, uintptr_t address) |
{ |
788,9 → 783,9 |
ipl_t ipl; |
int page_flags; |
uintptr_t *old_frame; |
size_t frame_idx; |
size_t used_pages; |
index_t frame_idx; |
count_t used_pages; |
/* Flags for the new memory mapping */ |
page_flags = area_flags_to_page_flags(flags); |
804,7 → 799,7 |
return ENOENT; |
} |
if ((area->sh_info) || (area->backend != &anon_backend)) { |
if (area->sh_info || area->backend != &anon_backend) { |
/* Copying shared areas not supported yet */ |
/* Copying non-anonymous memory not supported yet */ |
mutex_unlock(&area->lock); |
827,7 → 822,7 |
node = list_get_instance(cur, btree_node_t, leaf_link); |
for (i = 0; i < node->keys; i++) { |
used_pages += (size_t) node->value[i]; |
used_pages += (count_t) node->value[i]; |
} |
} |
853,10 → 848,10 |
node = list_get_instance(cur, btree_node_t, leaf_link); |
for (i = 0; i < node->keys; i++) { |
uintptr_t b = node->key[i]; |
size_t j; |
count_t j; |
pte_t *pte; |
for (j = 0; j < (size_t) node->value[i]; j++) { |
for (j = 0; j < (count_t) node->value[i]; j++) { |
page_table_lock(as, false); |
pte = page_mapping_find(as, b + j * PAGE_SIZE); |
ASSERT(pte && PTE_VALID(pte) && |
875,7 → 870,6 |
*/ |
tlb_invalidate_pages(as->asid, area->base, area->pages); |
/* |
* Invalidate potential software translation caches (e.g. TSB on |
* sparc64). |
903,9 → 897,9 |
node = list_get_instance(cur, btree_node_t, leaf_link); |
for (i = 0; i < node->keys; i++) { |
uintptr_t b = node->key[i]; |
size_t j; |
count_t j; |
for (j = 0; j < (size_t) node->value[i]; j++) { |
for (j = 0; j < (count_t) node->value[i]; j++) { |
page_table_lock(as, false); |
/* Insert the new mapping */ |
1397,16 → 1391,16 |
* |
* @return Zero on failure and non-zero on success. |
*/ |
int used_space_insert(as_area_t *a, uintptr_t page, size_t count) |
int used_space_insert(as_area_t *a, uintptr_t page, count_t count) |
{ |
btree_node_t *leaf, *node; |
size_t pages; |
count_t pages; |
unsigned int i; |
ASSERT(page == ALIGN_DOWN(page, PAGE_SIZE)); |
ASSERT(count); |
pages = (size_t) btree_search(&a->used_space, page, &leaf); |
pages = (count_t) btree_search(&a->used_space, page, &leaf); |
if (pages) { |
/* |
* We hit the beginning of some used space. |
1423,8 → 1417,8 |
if (node) { |
uintptr_t left_pg = node->key[node->keys - 1]; |
uintptr_t right_pg = leaf->key[0]; |
size_t left_cnt = (size_t) node->value[node->keys - 1]; |
size_t right_cnt = (size_t) leaf->value[0]; |
count_t left_cnt = (count_t) node->value[node->keys - 1]; |
count_t right_cnt = (count_t) leaf->value[0]; |
/* |
* Examine the possibility that the interval fits |
1478,7 → 1472,7 |
} |
} else if (page < leaf->key[0]) { |
uintptr_t right_pg = leaf->key[0]; |
size_t right_cnt = (size_t) leaf->value[0]; |
count_t right_cnt = (count_t) leaf->value[0]; |
/* |
* Investigate the border case in which the left neighbour does |
1513,8 → 1507,8 |
if (node) { |
uintptr_t left_pg = leaf->key[leaf->keys - 1]; |
uintptr_t right_pg = node->key[0]; |
size_t left_cnt = (size_t) leaf->value[leaf->keys - 1]; |
size_t right_cnt = (size_t) node->value[0]; |
count_t left_cnt = (count_t) leaf->value[leaf->keys - 1]; |
count_t right_cnt = (count_t) node->value[0]; |
/* |
* Examine the possibility that the interval fits |
1568,7 → 1562,7 |
} |
} else if (page >= leaf->key[leaf->keys - 1]) { |
uintptr_t left_pg = leaf->key[leaf->keys - 1]; |
size_t left_cnt = (size_t) leaf->value[leaf->keys - 1]; |
count_t left_cnt = (count_t) leaf->value[leaf->keys - 1]; |
/* |
* Investigate the border case in which the right neighbour |
1606,8 → 1600,8 |
if (page < leaf->key[i]) { |
uintptr_t left_pg = leaf->key[i - 1]; |
uintptr_t right_pg = leaf->key[i]; |
size_t left_cnt = (size_t) leaf->value[i - 1]; |
size_t right_cnt = (size_t) leaf->value[i]; |
count_t left_cnt = (count_t) leaf->value[i - 1]; |
count_t right_cnt = (count_t) leaf->value[i]; |
/* |
* The interval fits between left_pg and right_pg. |
1665,8 → 1659,8 |
} |
} |
panic("Inconsistency detected while adding %" PRIs " pages of used " |
"space at %p.", count, page); |
panic("Inconsistency detected while adding %" PRIc " pages of used " |
"space at %p.\n", count, page); |
} |
/** Mark portion of address space area as unused. |
1679,16 → 1673,16 |
* |
* @return Zero on failure and non-zero on success. |
*/ |
int used_space_remove(as_area_t *a, uintptr_t page, size_t count) |
int used_space_remove(as_area_t *a, uintptr_t page, count_t count) |
{ |
btree_node_t *leaf, *node; |
size_t pages; |
count_t pages; |
unsigned int i; |
ASSERT(page == ALIGN_DOWN(page, PAGE_SIZE)); |
ASSERT(count); |
pages = (size_t) btree_search(&a->used_space, page, &leaf); |
pages = (count_t) btree_search(&a->used_space, page, &leaf); |
if (pages) { |
/* |
* We are lucky, page is the beginning of some interval. |
1717,7 → 1711,7 |
node = btree_leaf_node_left_neighbour(&a->used_space, leaf); |
if (node && page < leaf->key[0]) { |
uintptr_t left_pg = node->key[node->keys - 1]; |
size_t left_cnt = (size_t) node->value[node->keys - 1]; |
count_t left_cnt = (count_t) node->value[node->keys - 1]; |
if (overlaps(left_pg, left_cnt * PAGE_SIZE, page, |
count * PAGE_SIZE)) { |
1733,7 → 1727,7 |
return 1; |
} else if (page + count * PAGE_SIZE < |
left_pg + left_cnt*PAGE_SIZE) { |
size_t new_cnt; |
count_t new_cnt; |
/* |
* The interval is contained in the rightmost |
1757,7 → 1751,7 |
if (page > leaf->key[leaf->keys - 1]) { |
uintptr_t left_pg = leaf->key[leaf->keys - 1]; |
size_t left_cnt = (size_t) leaf->value[leaf->keys - 1]; |
count_t left_cnt = (count_t) leaf->value[leaf->keys - 1]; |
if (overlaps(left_pg, left_cnt * PAGE_SIZE, page, |
count * PAGE_SIZE)) { |
1772,7 → 1766,7 |
return 1; |
} else if (page + count * PAGE_SIZE < left_pg + |
left_cnt * PAGE_SIZE) { |
size_t new_cnt; |
count_t new_cnt; |
/* |
* The interval is contained in the rightmost |
1799,7 → 1793,7 |
for (i = 1; i < leaf->keys - 1; i++) { |
if (page < leaf->key[i]) { |
uintptr_t left_pg = leaf->key[i - 1]; |
size_t left_cnt = (size_t) leaf->value[i - 1]; |
count_t left_cnt = (count_t) leaf->value[i - 1]; |
/* |
* Now the interval is between intervals corresponding |
1819,7 → 1813,7 |
return 1; |
} else if (page + count * PAGE_SIZE < |
left_pg + left_cnt * PAGE_SIZE) { |
size_t new_cnt; |
count_t new_cnt; |
/* |
* The interval is contained in the |
1844,8 → 1838,8 |
} |
error: |
panic("Inconsistency detected while removing %" PRIs " pages of used " |
"space from %p.", count, page); |
panic("Inconsistency detected while removing %" PRIc " pages of used " |
"space from %p.\n", count, page); |
} |
/** Remove reference to address space area share info. |
1943,7 → 1937,7 |
as_area_t *area = node->value[i]; |
mutex_lock(&area->lock); |
printf("as_area: %p, base=%p, pages=%" PRIs |
printf("as_area: %p, base=%p, pages=%" PRIc |
" (%p - %p)\n", area, area->base, area->pages, |
area->base, area->base + FRAMES2SIZE(area->pages)); |
mutex_unlock(&area->lock); |
/branches/arm/kernel/generic/src/mm/backend_anon.c |
---|
152,7 → 152,7 |
*/ |
page_mapping_insert(AS, addr, frame, as_area_get_flags(area)); |
if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1)) |
panic("Cannot insert used space."); |
panic("Could not insert used space.\n"); |
return AS_PF_OK; |
} |
195,7 → 195,7 |
node = list_get_instance(cur, btree_node_t, leaf_link); |
for (i = 0; i < node->keys; i++) { |
uintptr_t base = node->key[i]; |
size_t count = (size_t) node->value[i]; |
count_t count = (count_t) node->value[i]; |
unsigned int j; |
for (j = 0; j < count; j++) { |
/branches/arm/kernel/generic/src/mm/backend_elf.c |
---|
82,7 → 82,7 |
elf_segment_header_t *entry = area->backend_data.segment; |
btree_node_t *leaf; |
uintptr_t base, frame, page, start_anon; |
size_t i; |
index_t i; |
bool dirty = false; |
if (!as_area_check_access(area, access)) |
129,7 → 129,7 |
page_mapping_insert(AS, addr, frame, |
as_area_get_flags(area)); |
if (!used_space_insert(area, page, 1)) |
panic("Cannot insert used space."); |
panic("Could not insert used space.\n"); |
mutex_unlock(&area->sh_info->lock); |
return AS_PF_OK; |
} |
214,7 → 214,7 |
page_mapping_insert(AS, addr, frame, as_area_get_flags(area)); |
if (!used_space_insert(area, page, 1)) |
panic("Cannot insert used space."); |
panic("Could not insert used space.\n"); |
return AS_PF_OK; |
} |
234,7 → 234,7 |
elf_header_t *elf = area->backend_data.elf; |
elf_segment_header_t *entry = area->backend_data.segment; |
uintptr_t base, start_anon; |
size_t i; |
index_t i; |
ASSERT((page >= ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) && |
(page < entry->p_vaddr + entry->p_memsz)); |
304,7 → 304,7 |
for (i = 0; i < node->keys; i++) { |
uintptr_t base = node->key[i]; |
size_t count = (size_t) node->value[i]; |
count_t count = (count_t) node->value[i]; |
unsigned int j; |
/* |
/branches/arm/kernel/generic/src/mm/frame.c |
---|
1,7 → 1,6 |
/* |
* Copyright (c) 2001-2005 Jakub Jermar |
* Copyright (c) 2005 Sergey Bondari |
* Copyright (c) 2009 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
34,7 → 33,7 |
/** |
* @file |
* @brief Physical frame allocator. |
* @brief Physical frame allocator. |
* |
* This file contains the physical frame allocator and memory zone management. |
* The frame allocator is built on top of the buddy allocator. |
42,6 → 41,16 |
* @see buddy.c |
*/ |
/* |
* Locking order |
* |
* In order to access particular zone, the process must first lock |
* the zones.lock, then lock the zone and then unlock the zones.lock. |
* This insures, that we can fiddle with the zones in runtime without |
* affecting the processes. |
* |
*/ |
#include <arch/types.h> |
#include <mm/frame.h> |
#include <mm/as.h> |
48,6 → 57,7 |
#include <panic.h> |
#include <debug.h> |
#include <adt/list.h> |
#include <synch/spinlock.h> |
#include <synch/mutex.h> |
#include <synch/condvar.h> |
#include <arch/asm.h> |
59,37 → 69,72 |
#include <macros.h> |
#include <config.h> |
zones_t zones; |
typedef struct { |
count_t refcount; /**< tracking of shared frames */ |
uint8_t buddy_order; /**< buddy system block order */ |
link_t buddy_link; /**< link to the next free block inside one |
order */ |
void *parent; /**< If allocated by slab, this points there */ |
} frame_t; |
typedef struct { |
SPINLOCK_DECLARE(lock); /**< this lock protects everything below */ |
pfn_t base; /**< frame_no of the first frame in the frames |
array */ |
count_t count; /**< Size of zone */ |
frame_t *frames; /**< array of frame_t structures in this |
zone */ |
count_t free_count; /**< number of free frame_t structures */ |
count_t busy_count; /**< number of busy frame_t structures */ |
buddy_system_t *buddy_system; /**< buddy system for the zone */ |
int flags; |
} zone_t; |
/* |
* The zoneinfo.lock must be locked when accessing zoneinfo structure. |
* Some of the attributes in zone_t structures are 'read-only' |
*/ |
typedef struct { |
SPINLOCK_DECLARE(lock); |
unsigned int count; |
zone_t *info[ZONES_MAX]; |
} zones_t; |
static zones_t zones; |
/* |
* Synchronization primitives used to sleep when there is no memory |
* available. |
*/ |
mutex_t mem_avail_mtx; |
condvar_t mem_avail_cv; |
size_t mem_avail_req = 0; /**< Number of frames requested. */ |
size_t mem_avail_gen = 0; /**< Generation counter. */ |
unsigned long mem_avail_frames = 0; /**< Number of available frames. */ |
unsigned long mem_avail_gen = 0; /**< Generation counter. */ |
/********************/ |
/* Helper functions */ |
/********************/ |
static inline size_t frame_index(zone_t *zone, frame_t *frame) |
static inline index_t frame_index(zone_t *zone, frame_t *frame) |
{ |
return (size_t) (frame - zone->frames); |
return (index_t) (frame - zone->frames); |
} |
static inline size_t frame_index_abs(zone_t *zone, frame_t *frame) |
static inline index_t frame_index_abs(zone_t *zone, frame_t *frame) |
{ |
return (size_t) (frame - zone->frames) + zone->base; |
return (index_t) (frame - zone->frames) + zone->base; |
} |
static inline bool frame_index_valid(zone_t *zone, size_t index) |
static inline int frame_index_valid(zone_t *zone, index_t index) |
{ |
return (index < zone->count); |
} |
static inline size_t make_frame_index(zone_t *zone, frame_t *frame) |
/** Compute pfn_t from frame_t pointer & zone pointer */ |
static index_t make_frame_index(zone_t *zone, frame_t *frame) |
{ |
return (frame - zone->frames); |
} |
96,8 → 141,7 |
/** Initialize frame structure. |
* |
* @param frame Frame structure to be initialized. |
* |
* @param frame Frame structure to be initialized. |
*/ |
static void frame_initialize(frame_t *frame) |
{ |
105,145 → 149,153 |
frame->buddy_order = 0; |
} |
/*******************/ |
/* Zones functions */ |
/*******************/ |
/**********************/ |
/* Zoneinfo functions */ |
/**********************/ |
/** Insert-sort zone into zones list. |
* |
* Assume interrupts are disabled and zones lock is |
* locked. |
* |
* @param base Base frame of the newly inserted zone. |
* @param count Number of frames of the newly inserted zone. |
* |
* @return Zone number on success, -1 on error. |
* |
* @param newzone New zone to be inserted into zone list. |
* @return Zone number on success, -1 on error. |
*/ |
static size_t zones_insert_zone(pfn_t base, size_t count) |
static int zones_add_zone(zone_t *newzone) |
{ |
unsigned int i, j; |
ipl_t ipl; |
zone_t *z; |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
/* Try to merge */ |
if (zones.count + 1 == ZONES_MAX) { |
printf("Maximum zone count %u exceeded!\n", ZONES_MAX); |
return (size_t) -1; |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return -1; |
} |
size_t i; |
for (i = 0; i < zones.count; i++) { |
/* Check for overlap */ |
if (overlaps(base, count, |
zones.info[i].base, zones.info[i].count)) { |
/* Check for overflow */ |
z = zones.info[i]; |
if (overlaps(newzone->base, newzone->count, z->base, |
z->count)) { |
printf("Zones overlap!\n"); |
return (size_t) -1; |
return -1; |
} |
if (base < zones.info[i].base) |
if (newzone->base < z->base) |
break; |
} |
/* Move other zones up */ |
size_t j; |
for (j = zones.count; j > i; j--) { |
zones.info[j] = zones.info[j - 1]; |
zones.info[j].buddy_system->data = |
(void *) &zones.info[j - 1]; |
} |
for (j = i; j < zones.count; j++) |
zones.info[j + 1] = zones.info[j]; |
zones.info[i] = newzone; |
zones.count++; |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return i; |
} |
/** Get total available frames. |
/** Try to find a zone where can we find the frame. |
* |
* Assume interrupts are disabled and zones lock is |
* locked. |
* Assume interrupts are disabled. |
* |
* @return Total number of available frames. |
* |
* @param frame Frame number contained in zone. |
* @param pzone If not null, it is used as zone hint. Zone index is |
* filled into the variable on success. |
* @return Pointer to locked zone containing frame. |
*/ |
#ifdef CONFIG_DEBUG |
static size_t total_frames_free(void) |
static zone_t *find_zone_and_lock(pfn_t frame, unsigned int *pzone) |
{ |
size_t total = 0; |
size_t i; |
for (i = 0; i < zones.count; i++) |
total += zones.info[i].free_count; |
unsigned int i; |
unsigned int hint = pzone ? *pzone : 0; |
zone_t *z; |
return total; |
} |
#endif |
spinlock_lock(&zones.lock); |
/** Find a zone with a given frames. |
* |
* Assume interrupts are disabled and zones lock is |
* locked. |
* |
* @param frame Frame number contained in zone. |
* @param count Number of frames to look for. |
* @param hint Used as zone hint. |
* |
* @return Zone index or -1 if not found. |
* |
*/ |
size_t find_zone(pfn_t frame, size_t count, size_t hint) |
{ |
if (hint >= zones.count) |
hint = 0; |
size_t i = hint; |
i = hint; |
do { |
if ((zones.info[i].base <= frame) |
&& (zones.info[i].base + zones.info[i].count >= frame + count)) |
return i; |
z = zones.info[i]; |
spinlock_lock(&z->lock); |
if (z->base <= frame && z->base + z->count > frame) { |
/* Unlock the global lock */ |
spinlock_unlock(&zones.lock); |
if (pzone) |
*pzone = i; |
return z; |
} |
spinlock_unlock(&z->lock); |
i++; |
if (i >= zones.count) |
i = 0; |
} while (i != hint); |
return (size_t) -1; |
spinlock_unlock(&zones.lock); |
return NULL; |
} |
/** @return True if zone can allocate specified order */ |
static bool zone_can_alloc(zone_t *zone, uint8_t order) |
static int zone_can_alloc(zone_t *z, uint8_t order) |
{ |
return (zone_flags_available(zone->flags) |
&& buddy_system_can_alloc(zone->buddy_system, order)); |
return buddy_system_can_alloc(z->buddy_system, order); |
} |
/** Find a zone that can allocate order frames. |
/** Find and lock zone that can allocate order frames. |
* |
* Assume interrupts are disabled and zones lock is |
* locked. |
* Assume interrupts are disabled. |
* |
* @param order Size (2^order) of free space we are trying to find. |
* @param flags Required flags of the target zone. |
* @param hind Preferred zone. |
* |
* @param order Size (2^order) of free space we are trying to find. |
* @param flags Required flags of the target zone. |
* @param pzone Pointer to preferred zone or NULL, on return contains |
* zone number. |
*/ |
static size_t find_free_zone(uint8_t order, zone_flags_t flags, size_t hint) |
static zone_t * |
find_free_zone_and_lock(uint8_t order, int flags, unsigned int *pzone) |
{ |
unsigned int i; |
zone_t *z; |
unsigned int hint = pzone ? *pzone : 0; |
/* Mask off flags that are not applicable. */ |
flags &= FRAME_LOW_4_GiB; |
spinlock_lock(&zones.lock); |
if (hint >= zones.count) |
hint = 0; |
size_t i = hint; |
i = hint; |
do { |
z = zones.info[i]; |
spinlock_lock(&z->lock); |
/* |
* Check whether the zone meets the search criteria. |
*/ |
if ((zones.info[i].flags & flags) == flags) { |
if ((z->flags & flags) == flags) { |
/* |
* Check if the zone has 2^order frames area available. |
*/ |
if (zone_can_alloc(&zones.info[i], order)) |
return i; |
if (zone_can_alloc(z, order)) { |
spinlock_unlock(&zones.lock); |
if (pzone) |
*pzone = i; |
return z; |
} |
} |
i++; |
if (i >= zones.count) |
spinlock_unlock(&z->lock); |
if (++i >= zones.count) |
i = 0; |
} while (i != hint); |
return (size_t) -1; |
spinlock_unlock(&zones.lock); |
return NULL; |
} |
/**************************/ |
255,73 → 307,82 |
* Find block that is parent of current list. |
* That means go to lower addresses, until such block is found |
* |
* @param order Order of parent must be different then this |
* parameter!! |
* |
* @param order Order of parent must be different then this |
* parameter!! |
*/ |
static link_t *zone_buddy_find_block(buddy_system_t *buddy, link_t *child, |
static link_t *zone_buddy_find_block(buddy_system_t *b, link_t *child, |
uint8_t order) |
{ |
frame_t *frame = list_get_instance(child, frame_t, buddy_link); |
zone_t *zone = (zone_t *) buddy->data; |
frame_t *frame; |
zone_t *zone; |
index_t index; |
size_t index = frame_index(zone, frame); |
frame = list_get_instance(child, frame_t, buddy_link); |
zone = (zone_t *) b->data; |
index = frame_index(zone, frame); |
do { |
if (zone->frames[index].buddy_order != order) |
if (zone->frames[index].buddy_order != order) { |
return &zone->frames[index].buddy_link; |
} while (index-- > 0); |
} |
} while(index-- > 0); |
return NULL; |
} |
/** Buddy system find_buddy implementation. |
* |
* @param buddy Buddy system. |
* @param block Block for which buddy should be found. |
* @param b Buddy system. |
* @param block Block for which buddy should be found. |
* |
* @return Buddy for given block if found. |
* |
* @return Buddy for given block if found. |
*/ |
static link_t *zone_buddy_find_buddy(buddy_system_t *buddy, link_t *block) |
static link_t *zone_buddy_find_buddy(buddy_system_t *b, link_t *block) |
{ |
frame_t *frame = list_get_instance(block, frame_t, buddy_link); |
zone_t *zone = (zone_t *) buddy->data; |
frame_t *frame; |
zone_t *zone; |
index_t index; |
bool is_left, is_right; |
frame = list_get_instance(block, frame_t, buddy_link); |
zone = (zone_t *) b->data; |
ASSERT(IS_BUDDY_ORDER_OK(frame_index_abs(zone, frame), |
frame->buddy_order)); |
bool is_left = IS_BUDDY_LEFT_BLOCK_ABS(zone, frame); |
size_t index; |
is_left = IS_BUDDY_LEFT_BLOCK_ABS(zone, frame); |
is_right = IS_BUDDY_RIGHT_BLOCK_ABS(zone, frame); |
ASSERT(is_left ^ is_right); |
if (is_left) { |
index = (frame_index(zone, frame)) + |
(1 << frame->buddy_order); |
} else { /* is_right */ |
} else { /* if (is_right) */ |
index = (frame_index(zone, frame)) - |
(1 << frame->buddy_order); |
} |
if (frame_index_valid(zone, index)) { |
if ((zone->frames[index].buddy_order == frame->buddy_order) && |
(zone->frames[index].refcount == 0)) { |
if (zone->frames[index].buddy_order == frame->buddy_order && |
zone->frames[index].refcount == 0) { |
return &zone->frames[index].buddy_link; |
} |
} |
return NULL; |
return NULL; |
} |
/** Buddy system bisect implementation. |
* |
* @param buddy Buddy system. |
* @param block Block to bisect. |
* @param b Buddy system. |
* @param block Block to bisect. |
* |
* @return Right block. |
* |
* @return Right block. |
*/ |
static link_t *zone_buddy_bisect(buddy_system_t *buddy, link_t *block) |
static link_t *zone_buddy_bisect(buddy_system_t *b, link_t *block) |
{ |
frame_t *frame_l = list_get_instance(block, frame_t, buddy_link); |
frame_t *frame_r = (frame_l + (1 << (frame_l->buddy_order - 1))); |
frame_t *frame_l, *frame_r; |
frame_l = list_get_instance(block, frame_t, buddy_link); |
frame_r = (frame_l + (1 << (frame_l->buddy_order - 1))); |
return &frame_r->buddy_link; |
} |
328,68 → 389,75 |
/** Buddy system coalesce implementation. |
* |
* @param buddy Buddy system. |
* @param block_1 First block. |
* @param block_2 First block's buddy. |
* @param b Buddy system. |
* @param block_1 First block. |
* @param block_2 First block's buddy. |
* |
* @return Coalesced block (actually block that represents lower |
* address). |
* |
* @return Coalesced block (actually block that represents lower |
* address). |
*/ |
static link_t *zone_buddy_coalesce(buddy_system_t *buddy, link_t *block_1, |
link_t *block_2) |
static link_t *zone_buddy_coalesce(buddy_system_t *b, link_t *block_1, |
link_t *block_2) |
{ |
frame_t *frame1 = list_get_instance(block_1, frame_t, buddy_link); |
frame_t *frame2 = list_get_instance(block_2, frame_t, buddy_link); |
frame_t *frame1, *frame2; |
return ((frame1 < frame2) ? block_1 : block_2); |
frame1 = list_get_instance(block_1, frame_t, buddy_link); |
frame2 = list_get_instance(block_2, frame_t, buddy_link); |
return frame1 < frame2 ? block_1 : block_2; |
} |
/** Buddy system set_order implementation. |
* |
* @param buddy Buddy system. |
* @param block Buddy system block. |
* @param order Order to set. |
* |
* @param b Buddy system. |
* @param block Buddy system block. |
* @param order Order to set. |
*/ |
static void zone_buddy_set_order(buddy_system_t *buddy, link_t *block, |
static void zone_buddy_set_order(buddy_system_t *b, link_t *block, |
uint8_t order) |
{ |
list_get_instance(block, frame_t, buddy_link)->buddy_order = order; |
frame_t *frame; |
frame = list_get_instance(block, frame_t, buddy_link); |
frame->buddy_order = order; |
} |
/** Buddy system get_order implementation. |
* |
* @param buddy Buddy system. |
* @param block Buddy system block. |
* @param b Buddy system. |
* @param block Buddy system block. |
* |
* @return Order of block. |
* |
* @return Order of block. |
*/ |
static uint8_t zone_buddy_get_order(buddy_system_t *buddy, link_t *block) |
static uint8_t zone_buddy_get_order(buddy_system_t *b, link_t *block) |
{ |
return list_get_instance(block, frame_t, buddy_link)->buddy_order; |
frame_t *frame; |
frame = list_get_instance(block, frame_t, buddy_link); |
return frame->buddy_order; |
} |
/** Buddy system mark_busy implementation. |
* |
* @param buddy Buddy system. |
* @param block Buddy system block. |
* |
* @param b Buddy system. |
* @param block Buddy system block. |
*/ |
static void zone_buddy_mark_busy(buddy_system_t *buddy, link_t * block) |
static void zone_buddy_mark_busy(buddy_system_t *b, link_t * block) |
{ |
list_get_instance(block, frame_t, buddy_link)->refcount = 1; |
frame_t * frame; |
frame = list_get_instance(block, frame_t, buddy_link); |
frame->refcount = 1; |
} |
/** Buddy system mark_available implementation. |
* |
* @param buddy Buddy system. |
* @param block Buddy system block. |
* @param b Buddy system. |
* @param block Buddy system block. |
*/ |
static void zone_buddy_mark_available(buddy_system_t *buddy, link_t *block) |
static void zone_buddy_mark_available(buddy_system_t *b, link_t *block) |
{ |
list_get_instance(block, frame_t, buddy_link)->refcount = 0; |
frame_t *frame; |
frame = list_get_instance(block, frame_t, buddy_link); |
frame->refcount = 0; |
} |
static buddy_system_operations_t zone_buddy_system_operations = { |
409,57 → 477,60 |
/** Allocate frame in particular zone. |
* |
* Assume zone is locked and is available for allocation. |
* Assume zone is locked. |
* Panics if allocation is impossible. |
* |
* @param zone Zone to allocate from. |
* @param order Allocate exactly 2^order frames. |
* @param zone Zone to allocate from. |
* @param order Allocate exactly 2^order frames. |
* |
* @return Frame index in zone. |
* @return Frame index in zone. |
* |
*/ |
static pfn_t zone_frame_alloc(zone_t *zone, uint8_t order) |
{ |
ASSERT(zone_flags_available(zone->flags)); |
pfn_t v; |
link_t *tmp; |
frame_t *frame; |
/* Allocate frames from zone buddy system */ |
link_t *link = buddy_system_alloc(zone->buddy_system, order); |
tmp = buddy_system_alloc(zone->buddy_system, order); |
ASSERT(link); |
ASSERT(tmp); |
/* Update zone information. */ |
zone->free_count -= (1 << order); |
zone->busy_count += (1 << order); |
/* Frame will be actually a first frame of the block. */ |
frame_t *frame = list_get_instance(link, frame_t, buddy_link); |
frame = list_get_instance(tmp, frame_t, buddy_link); |
/* Get frame address */ |
return make_frame_index(zone, frame); |
/* get frame address */ |
v = make_frame_index(zone, frame); |
return v; |
} |
/** Free frame from zone. |
* |
* Assume zone is locked and is available for deallocation. |
* Assume zone is locked. |
* |
* @param zone Pointer to zone from which the frame is to be freed. |
* @param frame_idx Frame index relative to zone. |
* |
* @param zone Pointer to zone from which the frame is to be freed. |
* @param frame_idx Frame index relative to zone. |
*/ |
static void zone_frame_free(zone_t *zone, size_t frame_idx) |
static void zone_frame_free(zone_t *zone, index_t frame_idx) |
{ |
ASSERT(zone_flags_available(zone->flags)); |
frame_t *frame; |
uint8_t order; |
frame = &zone->frames[frame_idx]; |
frame_t *frame = &zone->frames[frame_idx]; |
/* Remember frame order */ |
uint8_t order = frame->buddy_order; |
/* remember frame order */ |
order = frame->buddy_order; |
ASSERT(frame->refcount); |
if (!--frame->refcount) { |
buddy_system_free(zone->buddy_system, &frame->buddy_link); |
/* Update zone information. */ |
zone->free_count += (1 << order); |
zone->busy_count -= (1 << order); |
467,7 → 538,7 |
} |
/** Return frame from zone. */ |
static frame_t *zone_get_frame(zone_t *zone, size_t frame_idx) |
static frame_t *zone_get_frame(zone_t *zone, index_t frame_idx) |
{ |
ASSERT(frame_idx < zone->count); |
return &zone->frames[frame_idx]; |
474,648 → 545,569 |
} |
/** Mark frame in zone unavailable to allocation. */ |
static void zone_mark_unavailable(zone_t *zone, size_t frame_idx) |
static void zone_mark_unavailable(zone_t *zone, index_t frame_idx) |
{ |
ASSERT(zone_flags_available(zone->flags)); |
frame_t *frame = zone_get_frame(zone, frame_idx); |
frame_t *frame; |
link_t *link; |
frame = zone_get_frame(zone, frame_idx); |
if (frame->refcount) |
return; |
link_t *link __attribute__ ((unused)); |
link = buddy_system_alloc_block(zone->buddy_system, |
&frame->buddy_link); |
ASSERT(link); |
zone->free_count--; |
mutex_lock(&mem_avail_mtx); |
mem_avail_frames--; |
mutex_unlock(&mem_avail_mtx); |
} |
/** Merge two zones. |
/** Join two zones. |
* |
* Expect buddy to point to space at least zone_conf_size large. |
* Assume z1 & z2 are locked and compatible and zones lock is |
* locked. |
* Expect zone_t *z to point to space at least zone_conf_size large. |
* |
* @param z1 First zone to merge. |
* @param z2 Second zone to merge. |
* @param old_z1 Original date of the first zone. |
* @param buddy Merged zone buddy. |
* Assume z1 & z2 are locked. |
* |
* @param z Target zone structure pointer. |
* @param z1 Zone to merge. |
* @param z2 Zone to merge. |
*/ |
static void zone_merge_internal(size_t z1, size_t z2, zone_t *old_z1, buddy_system_t *buddy) |
static void _zone_merge(zone_t *z, zone_t *z1, zone_t *z2) |
{ |
ASSERT(zone_flags_available(zones.info[z1].flags)); |
ASSERT(zone_flags_available(zones.info[z2].flags)); |
ASSERT(zones.info[z1].flags == zones.info[z2].flags); |
ASSERT(zones.info[z1].base < zones.info[z2].base); |
ASSERT(!overlaps(zones.info[z1].base, zones.info[z1].count, |
zones.info[z2].base, zones.info[z2].count)); |
uint8_t max_order; |
unsigned int i; |
int z2idx; |
pfn_t frame_idx; |
frame_t *frame; |
ASSERT(!overlaps(z1->base, z1->count, z2->base, z2->count)); |
ASSERT(z1->base < z2->base); |
spinlock_initialize(&z->lock, "zone_lock"); |
z->base = z1->base; |
z->count = z2->base + z2->count - z1->base; |
z->flags = z1->flags & z2->flags; |
z->free_count = z1->free_count + z2->free_count; |
z->busy_count = z1->busy_count + z2->busy_count; |
/* Difference between zone bases */ |
pfn_t base_diff = zones.info[z2].base - zones.info[z1].base; |
zones.info[z1].count = base_diff + zones.info[z2].count; |
zones.info[z1].free_count += zones.info[z2].free_count; |
zones.info[z1].busy_count += zones.info[z2].busy_count; |
zones.info[z1].buddy_system = buddy; |
uint8_t order = fnzb(zones.info[z1].count); |
buddy_system_create(zones.info[z1].buddy_system, order, |
&zone_buddy_system_operations, (void *) &zones.info[z1]); |
zones.info[z1].frames = |
(frame_t *) ((uint8_t *) zones.info[z1].buddy_system |
+ buddy_conf_size(order)); |
/* This marks all frames busy */ |
size_t i; |
for (i = 0; i < zones.info[z1].count; i++) |
frame_initialize(&zones.info[z1].frames[i]); |
max_order = fnzb(z->count); |
z->buddy_system = (buddy_system_t *) &z[1]; |
buddy_system_create(z->buddy_system, max_order, |
&zone_buddy_system_operations, (void *) z); |
z->frames = (frame_t *)((uint8_t *) z->buddy_system + |
buddy_conf_size(max_order)); |
for (i = 0; i < z->count; i++) { |
/* This marks all frames busy */ |
frame_initialize(&z->frames[i]); |
} |
/* Copy frames from both zones to preserve full frame orders, |
* parents etc. Set all free frames with refcount = 0 to 1, because |
* we add all free frames to buddy allocator later again, clearing |
* order to 0. Don't set busy frames with refcount = 0, as they |
* parents etc. Set all free frames with refcount=0 to 1, because |
* we add all free frames to buddy allocator later again, clear |
* order to 0. Don't set busy frames with refcount=0, as they |
* will not be reallocated during merge and it would make later |
* problems with allocation/free. |
*/ |
for (i = 0; i < old_z1->count; i++) |
zones.info[z1].frames[i] = old_z1->frames[i]; |
for (i = 0; i < zones.info[z2].count; i++) |
zones.info[z1].frames[base_diff + i] |
= zones.info[z2].frames[i]; |
for (i = 0; i < z1->count; i++) |
z->frames[i] = z1->frames[i]; |
for (i = 0; i < z2->count; i++) { |
z2idx = i + (z2->base - z1->base); |
z->frames[z2idx] = z2->frames[i]; |
} |
i = 0; |
while (i < zones.info[z1].count) { |
if (zones.info[z1].frames[i].refcount) { |
/* Skip busy frames */ |
i += 1 << zones.info[z1].frames[i].buddy_order; |
} else { |
/* Free frames, set refcount = 1 |
* (all free frames have refcount == 0, we need not |
* to check the order) |
*/ |
zones.info[z1].frames[i].refcount = 1; |
zones.info[z1].frames[i].buddy_order = 0; |
while (i < z->count) { |
if (z->frames[i].refcount) { |
/* skip busy frames */ |
i += 1 << z->frames[i].buddy_order; |
} else { /* Free frames, set refcount=1 */ |
/* All free frames have refcount=0, we need not |
* to check the order */ |
z->frames[i].refcount = 1; |
z->frames[i].buddy_order = 0; |
i++; |
} |
} |
/* Add free blocks from the original zone z1 */ |
while (zone_can_alloc(old_z1, 0)) { |
/* Allocate from the original zone */ |
pfn_t frame_idx = zone_frame_alloc(old_z1, 0); |
/* Free the frame from the merged zone */ |
frame_t *frame = &zones.info[z1].frames[frame_idx]; |
/* Add free blocks from the 2 original zones */ |
while (zone_can_alloc(z1, 0)) { |
frame_idx = zone_frame_alloc(z1, 0); |
frame = &z->frames[frame_idx]; |
frame->refcount = 0; |
buddy_system_free(zones.info[z1].buddy_system, &frame->buddy_link); |
buddy_system_free(z->buddy_system, &frame->buddy_link); |
} |
/* Add free blocks from the original zone z2 */ |
while (zone_can_alloc(&zones.info[z2], 0)) { |
/* Allocate from the original zone */ |
pfn_t frame_idx = zone_frame_alloc(&zones.info[z2], 0); |
/* Free the frame from the merged zone */ |
frame_t *frame = &zones.info[z1].frames[base_diff + frame_idx]; |
while (zone_can_alloc(z2, 0)) { |
frame_idx = zone_frame_alloc(z2, 0); |
frame = &z->frames[frame_idx + (z2->base - z1->base)]; |
frame->refcount = 0; |
buddy_system_free(zones.info[z1].buddy_system, &frame->buddy_link); |
buddy_system_free(z->buddy_system, &frame->buddy_link); |
} |
} |
/** Return old configuration frames into the zone. |
* |
* We have two cases: |
* - The configuration data is outside the zone |
* -> do nothing (perhaps call frame_free?) |
* - The configuration data was created by zone_create |
* or updated by reduce_region -> free every frame |
* We have several cases |
* - the conf. data is outside of zone -> exit, shall we call frame_free?? |
* - the conf. data was created by zone_create or |
* updated with reduce_region -> free every frame |
* |
* @param znum The actual zone where freeing should occur. |
* @param pfn Old zone configuration frame. |
* @param count Old zone frame count. |
* |
* @param newzone The actual zone where freeing should occur. |
* @param oldzone Pointer to old zone configuration data that should |
* be freed from new zone. |
*/ |
static void return_config_frames(size_t znum, pfn_t pfn, size_t count) |
static void return_config_frames(zone_t *newzone, zone_t *oldzone) |
{ |
ASSERT(zone_flags_available(zones.info[znum].flags)); |
pfn_t pfn; |
frame_t *frame; |
count_t cframes; |
unsigned int i; |
pfn = ADDR2PFN((uintptr_t)KA2PA(oldzone)); |
cframes = SIZE2FRAMES(zone_conf_size(oldzone->count)); |
size_t cframes = SIZE2FRAMES(zone_conf_size(count)); |
if ((pfn < zones.info[znum].base) |
|| (pfn >= zones.info[znum].base + zones.info[znum].count)) |
if (pfn < newzone->base || pfn >= newzone->base + newzone->count) |
return; |
frame_t *frame __attribute__ ((unused)); |
frame = &zones.info[znum].frames[pfn - zones.info[znum].base]; |
frame = &newzone->frames[pfn - newzone->base]; |
ASSERT(!frame->buddy_order); |
size_t i; |
for (i = 0; i < cframes; i++) { |
zones.info[znum].busy_count++; |
zone_frame_free(&zones.info[znum], |
pfn - zones.info[znum].base + i); |
newzone->busy_count++; |
zone_frame_free(newzone, pfn+i-newzone->base); |
} |
} |
/** Reduce allocated block to count of order 0 frames. |
* |
* The allocated block needs 2^order frames. Reduce all frames |
* in the block to order 0 and free the unneeded frames. This means that |
* when freeing the previously allocated block starting with frame_idx, |
* The allocated block need 2^order frames of space. Reduce all frames |
* in block to order 0 and free the unneeded frames. This means, that |
* when freeing the previously allocated block starting with frame_idx, |
* you have to free every frame. |
* |
* @param znum Zone. |
* @param frame_idx Index the first frame of the block. |
* @param count Allocated frames in block. |
* |
* @param zone |
* @param frame_idx Index to block. |
* @param count Allocated space in block. |
*/ |
static void zone_reduce_region(size_t znum, pfn_t frame_idx, size_t count) |
static void zone_reduce_region(zone_t *zone, pfn_t frame_idx, count_t count) |
{ |
ASSERT(zone_flags_available(zones.info[znum].flags)); |
ASSERT(frame_idx + count < zones.info[znum].count); |
count_t i; |
uint8_t order; |
frame_t *frame; |
uint8_t order = zones.info[znum].frames[frame_idx].buddy_order; |
ASSERT((size_t) (1 << order) >= count); |
ASSERT(frame_idx + count < zone->count); |
order = zone->frames[frame_idx].buddy_order; |
ASSERT((count_t) (1 << order) >= count); |
/* Reduce all blocks to order 0 */ |
size_t i; |
for (i = 0; i < (size_t) (1 << order); i++) { |
frame_t *frame = &zones.info[znum].frames[i + frame_idx]; |
for (i = 0; i < (count_t) (1 << order); i++) { |
frame = &zone->frames[i + frame_idx]; |
frame->buddy_order = 0; |
if (!frame->refcount) |
frame->refcount = 1; |
ASSERT(frame->refcount == 1); |
} |
/* Free unneeded frames */ |
for (i = count; i < (size_t) (1 << order); i++) |
zone_frame_free(&zones.info[znum], i + frame_idx); |
for (i = count; i < (count_t) (1 << order); i++) { |
zone_frame_free(zone, i + frame_idx); |
} |
} |
/** Merge zones z1 and z2. |
* |
* The merged zones must be 2 zones with no zone existing in between |
* (which means that z2 = z1 + 1). Both zones must be available zones |
* with the same flags. |
* - the zones must be 2 zones with no zone existing in between, |
* which means that z2 = z1+1 |
* |
* When you create a new zone, the frame allocator configuration does |
* not to be 2^order size. Once the allocator is running it is no longer |
* possible, merged configuration data occupies more space :-/ |
* |
* The function uses |
* |
* - When you create a new zone, the frame allocator configuration does |
* not to be 2^order size. Once the allocator is running it is no longer |
* possible, merged configuration data occupies more space :-/ |
*/ |
bool zone_merge(size_t z1, size_t z2) |
void zone_merge(unsigned int z1, unsigned int z2) |
{ |
ipl_t ipl = interrupts_disable(); |
ipl_t ipl; |
zone_t *zone1, *zone2, *newzone; |
unsigned int cframes; |
uint8_t order; |
unsigned int i; |
pfn_t pfn; |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
bool ret = true; |
/* We can join only 2 zones with none existing inbetween, |
* the zones have to be available and with the same |
* set of flags |
*/ |
if ((z1 >= zones.count) || (z2 >= zones.count) |
|| (z2 - z1 != 1) |
|| (!zone_flags_available(zones.info[z1].flags)) |
|| (!zone_flags_available(zones.info[z2].flags)) |
|| (zones.info[z1].flags != zones.info[z2].flags)) { |
ret = false; |
if ((z1 >= zones.count) || (z2 >= zones.count)) |
goto errout; |
} |
pfn_t cframes = SIZE2FRAMES(zone_conf_size( |
zones.info[z2].base - zones.info[z1].base |
+ zones.info[z2].count)); |
uint8_t order; |
/* We can join only 2 zones with none existing inbetween */ |
if (z2 - z1 != 1) |
goto errout; |
zone1 = zones.info[z1]; |
zone2 = zones.info[z2]; |
spinlock_lock(&zone1->lock); |
spinlock_lock(&zone2->lock); |
cframes = SIZE2FRAMES(zone_conf_size(zone2->base + zone2->count - |
zone1->base)); |
if (cframes == 1) |
order = 0; |
else |
order = fnzb(cframes - 1) + 1; |
/* Allocate zonedata inside one of the zones */ |
if (zone_can_alloc(zone1, order)) |
pfn = zone1->base + zone_frame_alloc(zone1, order); |
else if (zone_can_alloc(zone2, order)) |
pfn = zone2->base + zone_frame_alloc(zone2, order); |
else |
order = fnzb(cframes - 1) + 1; |
/* Allocate merged zone data inside one of the zones */ |
pfn_t pfn; |
if (zone_can_alloc(&zones.info[z1], order)) { |
pfn = zones.info[z1].base + zone_frame_alloc(&zones.info[z1], order); |
} else if (zone_can_alloc(&zones.info[z2], order)) { |
pfn = zones.info[z2].base + zone_frame_alloc(&zones.info[z2], order); |
} else { |
ret = false; |
goto errout; |
} |
/* Preserve original data from z1 */ |
zone_t old_z1 = zones.info[z1]; |
old_z1.buddy_system->data = (void *) &old_z1; |
/* Do zone merging */ |
buddy_system_t *buddy = (buddy_system_t *) PA2KA(PFN2ADDR(pfn)); |
zone_merge_internal(z1, z2, &old_z1, buddy); |
goto errout2; |
newzone = (zone_t *) PA2KA(PFN2ADDR(pfn)); |
_zone_merge(newzone, zone1, zone2); |
/* Free unneeded config frames */ |
zone_reduce_region(z1, pfn - zones.info[z1].base, cframes); |
zone_reduce_region(newzone, pfn - newzone->base, cframes); |
/* Subtract zone information from busy frames */ |
zones.info[z1].busy_count -= cframes; |
/* Free old zone information */ |
return_config_frames(z1, |
ADDR2PFN(KA2PA((uintptr_t) old_z1.frames)), old_z1.count); |
return_config_frames(z1, |
ADDR2PFN(KA2PA((uintptr_t) zones.info[z2].frames)), |
zones.info[z2].count); |
/* Move zones down */ |
size_t i; |
for (i = z2 + 1; i < zones.count; i++) { |
newzone->busy_count -= cframes; |
/* Replace existing zones in zoneinfo list */ |
zones.info[z1] = newzone; |
for (i = z2 + 1; i < zones.count; i++) |
zones.info[i - 1] = zones.info[i]; |
zones.info[i - 1].buddy_system->data = |
(void *) &zones.info[i - 1]; |
} |
zones.count--; |
/* Free old zone information */ |
return_config_frames(newzone, zone1); |
return_config_frames(newzone, zone2); |
errout2: |
/* Nobody is allowed to enter to zone, so we are safe |
* to touch the spinlocks last time */ |
spinlock_unlock(&zone1->lock); |
spinlock_unlock(&zone2->lock); |
errout: |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return ret; |
} |
/** Merge all mergeable zones into one big zone. |
/** Merge all zones into one big zone. |
* |
* It is reasonable to do this on systems where |
* BIOS reports parts in chunks, so that we could |
* have 1 zone (it's faster). |
* |
* It is reasonable to do this on systems whose bios reports parts in chunks, |
* so that we could have 1 zone (it's faster). |
*/ |
void zone_merge_all(void) |
{ |
size_t i = 0; |
while (i < zones.count) { |
if (!zone_merge(i, i + 1)) |
i++; |
int count = zones.count; |
while (zones.count > 1 && --count) { |
zone_merge(0, 1); |
break; |
} |
} |
/** Create new frame zone. |
* |
* @param zone Zone to construct. |
* @param buddy Address of buddy system configuration information. |
* @param start Physical address of the first frame within the zone. |
* @param count Count of frames in zone. |
* @param flags Zone flags. |
* @param start Physical address of the first frame within the zone. |
* @param count Count of frames in zone. |
* @param z Address of configuration information of zone. |
* @param flags Zone flags. |
* |
* @return Initialized zone. |
* |
* @return Initialized zone. |
*/ |
static void zone_construct(zone_t *zone, buddy_system_t *buddy, pfn_t start, size_t count, zone_flags_t flags) |
static void zone_construct(pfn_t start, count_t count, zone_t *z, int flags) |
{ |
zone->base = start; |
zone->count = count; |
zone->flags = flags; |
zone->free_count = count; |
zone->busy_count = 0; |
zone->buddy_system = buddy; |
unsigned int i; |
uint8_t max_order; |
spinlock_initialize(&z->lock, "zone_lock"); |
z->base = start; |
z->count = count; |
/* Mask off flags that are calculated automatically. */ |
flags &= ~FRAME_LOW_4_GiB; |
/* Determine calculated flags. */ |
if (z->base + count < (1ULL << (32 - FRAME_WIDTH))) /* 4 GiB */ |
flags |= FRAME_LOW_4_GiB; |
z->flags = flags; |
z->free_count = count; |
z->busy_count = 0; |
/* |
* Compute order for buddy system, initialize |
*/ |
max_order = fnzb(count); |
z->buddy_system = (buddy_system_t *)&z[1]; |
if (zone_flags_available(flags)) { |
/* |
* Compute order for buddy system and initialize |
*/ |
uint8_t order = fnzb(count); |
buddy_system_create(zone->buddy_system, order, |
&zone_buddy_system_operations, (void *) zone); |
/* Allocate frames _after_ the confframe */ |
/* Check sizes */ |
zone->frames = (frame_t *) ((uint8_t *) zone->buddy_system + |
buddy_conf_size(order)); |
size_t i; |
for (i = 0; i < count; i++) |
frame_initialize(&zone->frames[i]); |
/* Stuffing frames */ |
for (i = 0; i < count; i++) { |
zone->frames[i].refcount = 0; |
buddy_system_free(zone->buddy_system, &zone->frames[i].buddy_link); |
} |
} else |
zone->frames = NULL; |
buddy_system_create(z->buddy_system, max_order, |
&zone_buddy_system_operations, (void *) z); |
/* Allocate frames _after_ the conframe */ |
/* Check sizes */ |
z->frames = (frame_t *)((uint8_t *) z->buddy_system + |
buddy_conf_size(max_order)); |
for (i = 0; i < count; i++) { |
frame_initialize(&z->frames[i]); |
} |
/* Stuffing frames */ |
for (i = 0; i < count; i++) { |
z->frames[i].refcount = 0; |
buddy_system_free(z->buddy_system, &z->frames[i].buddy_link); |
} |
} |
/** Compute configuration data size for zone. |
* |
* @param count Size of zone in frames. |
* |
* @return Size of zone configuration info (in bytes). |
* |
* @param count Size of zone in frames. |
* @return Size of zone configuration info (in bytes). |
*/ |
uintptr_t zone_conf_size(size_t count) |
uintptr_t zone_conf_size(count_t count) |
{ |
return (count * sizeof(frame_t) + buddy_conf_size(fnzb(count))); |
int size = sizeof(zone_t) + count * sizeof(frame_t); |
int max_order; |
max_order = fnzb(count); |
size += buddy_conf_size(max_order); |
return size; |
} |
/** Create and add zone to system. |
* |
* @param start First frame number (absolute). |
* @param count Size of zone in frames. |
* @param confframe Where configuration frames are supposed to be. |
* Automatically checks, that we will not disturb the |
* kernel and possibly init. If confframe is given |
* _outside_ this zone, it is expected, that the area is |
* already marked BUSY and big enough to contain |
* zone_conf_size() amount of data. If the confframe is |
* inside the area, the zone free frame information is |
* modified not to include it. |
* @param start First frame number (absolute). |
* @param count Size of zone in frames. |
* @param confframe Where configuration frames are supposed to be. |
* Automatically checks, that we will not disturb the |
* kernel and possibly init. If confframe is given |
* _outside_ this zone, it is expected, that the area is |
* already marked BUSY and big enough to contain |
* zone_conf_size() amount of data. If the confframe is |
* inside the area, the zone free frame information is |
* modified not to include it. |
* |
* @return Zone number or -1 on error. |
* |
* @return Zone number or -1 on error. |
*/ |
size_t zone_create(pfn_t start, size_t count, pfn_t confframe, zone_flags_t flags) |
int zone_create(pfn_t start, count_t count, pfn_t confframe, int flags) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
if (zone_flags_available(flags)) { /* Create available zone */ |
/* Theoretically we could have NULL here, practically make sure |
* nobody tries to do that. If some platform requires, remove |
* the assert |
*/ |
ASSERT(confframe != NULL); |
/* If confframe is supposed to be inside our zone, then make sure |
* it does not span kernel & init |
*/ |
size_t confcount = SIZE2FRAMES(zone_conf_size(count)); |
if ((confframe >= start) && (confframe < start + count)) { |
for (; confframe < start + count; confframe++) { |
uintptr_t addr = PFN2ADDR(confframe); |
zone_t *z; |
uintptr_t addr; |
count_t confcount; |
unsigned int i; |
int znum; |
/* Theoretically we could have here 0, practically make sure |
* nobody tries to do that. If some platform requires, remove |
* the assert |
*/ |
ASSERT(confframe); |
/* If conframe is supposed to be inside our zone, then make sure |
* it does not span kernel & init |
*/ |
confcount = SIZE2FRAMES(zone_conf_size(count)); |
if (confframe >= start && confframe < start + count) { |
for (; confframe < start + count; confframe++) { |
addr = PFN2ADDR(confframe); |
if (overlaps(addr, PFN2ADDR(confcount), |
KA2PA(config.base), config.kernel_size)) |
continue; |
if (overlaps(addr, PFN2ADDR(confcount), |
KA2PA(config.stack_base), config.stack_size)) |
continue; |
bool overlap = false; |
count_t i; |
for (i = 0; i < init.cnt; i++) |
if (overlaps(addr, PFN2ADDR(confcount), |
KA2PA(config.base), config.kernel_size)) |
continue; |
if (overlaps(addr, PFN2ADDR(confcount), |
KA2PA(config.stack_base), config.stack_size)) |
continue; |
bool overlap = false; |
size_t i; |
for (i = 0; i < init.cnt; i++) |
if (overlaps(addr, PFN2ADDR(confcount), |
KA2PA(init.tasks[i].addr), |
init.tasks[i].size)) { |
overlap = true; |
break; |
} |
if (overlap) |
continue; |
break; |
} |
KA2PA(init.tasks[i].addr), |
init.tasks[i].size)) { |
overlap = true; |
break; |
} |
if (overlap) |
continue; |
if (confframe >= start + count) |
panic("Cannot find configuration data for zone."); |
break; |
} |
size_t znum = zones_insert_zone(start, count); |
if (znum == (size_t) -1) { |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return (size_t) -1; |
if (confframe >= start + count) |
panic("Cannot find configuration data for zone."); |
} |
z = (zone_t *) PA2KA(PFN2ADDR(confframe)); |
zone_construct(start, count, z, flags); |
znum = zones_add_zone(z); |
if (znum == -1) |
return -1; |
mutex_lock(&mem_avail_mtx); |
mem_avail_frames += count; |
mutex_unlock(&mem_avail_mtx); |
/* If confdata in zone, mark as unavailable */ |
if (confframe >= start && confframe < start + count) |
for (i = confframe; i < confframe + confcount; i++) { |
zone_mark_unavailable(z, i - z->base); |
} |
buddy_system_t *buddy = (buddy_system_t *) PA2KA(PFN2ADDR(confframe)); |
zone_construct(&zones.info[znum], buddy, start, count, flags); |
/* If confdata in zone, mark as unavailable */ |
if ((confframe >= start) && (confframe < start + count)) { |
size_t i; |
for (i = confframe; i < confframe + confcount; i++) |
zone_mark_unavailable(&zones.info[znum], |
i - zones.info[znum].base); |
} |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return znum; |
} |
/* Non-available zone */ |
size_t znum = zones_insert_zone(start, count); |
if (znum == (size_t) -1) { |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return (size_t) -1; |
} |
zone_construct(&zones.info[znum], NULL, start, count, flags); |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return znum; |
} |
/*******************/ |
/***************************************/ |
/* Frame functions */ |
/*******************/ |
/** Set parent of frame. */ |
void frame_set_parent(pfn_t pfn, void *data, size_t hint) |
void frame_set_parent(pfn_t pfn, void *data, unsigned int hint) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
size_t znum = find_zone(pfn, 1, hint); |
ASSERT(znum != (size_t) -1); |
zone_get_frame(&zones.info[znum], |
pfn - zones.info[znum].base)->parent = data; |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
zone_t *zone = find_zone_and_lock(pfn, &hint); |
ASSERT(zone); |
zone_get_frame(zone, pfn - zone->base)->parent = data; |
spinlock_unlock(&zone->lock); |
} |
void *frame_get_parent(pfn_t pfn, size_t hint) |
void *frame_get_parent(pfn_t pfn, unsigned int hint) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
zone_t *zone = find_zone_and_lock(pfn, &hint); |
void *res; |
ASSERT(zone); |
res = zone_get_frame(zone, pfn - zone->base)->parent; |
size_t znum = find_zone(pfn, 1, hint); |
ASSERT(znum != (size_t) -1); |
void *res = zone_get_frame(&zones.info[znum], |
pfn - zones.info[znum].base)->parent; |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
spinlock_unlock(&zone->lock); |
return res; |
} |
/** Allocate power-of-two frames of physical memory. |
* |
* @param order Allocate exactly 2^order frames. |
* @param flags Flags for host zone selection and address processing. |
* @param pzone Preferred zone. |
* @param order Allocate exactly 2^order frames. |
* @param flags Flags for host zone selection and address processing. |
* @param pzone Preferred zone. |
* |
* @return Physical address of the allocated frame. |
* @return Physical address of the allocated frame. |
* |
*/ |
void *frame_alloc_generic(uint8_t order, frame_flags_t flags, size_t *pzone) |
void *frame_alloc_generic(uint8_t order, int flags, unsigned int *pzone) |
{ |
size_t size = ((size_t) 1) << order; |
ipl_t ipl; |
size_t hint = pzone ? (*pzone) : 0; |
int freed; |
pfn_t v; |
zone_t *zone; |
unsigned long gen = 0; |
loop: |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
/* |
* First, find suitable frame zone. |
*/ |
size_t znum = find_free_zone(order, |
FRAME_TO_ZONE_FLAGS(flags), hint); |
zone = find_free_zone_and_lock(order, flags, pzone); |
/* If no memory, reclaim some slab memory, |
if it does not help, reclaim all */ |
if ((znum == (size_t) -1) && (!(flags & FRAME_NO_RECLAIM))) { |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
size_t freed = slab_reclaim(0); |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
if (freed > 0) |
znum = find_free_zone(order, |
FRAME_TO_ZONE_FLAGS(flags), hint); |
if (znum == (size_t) -1) { |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
if (!zone && !(flags & FRAME_NO_RECLAIM)) { |
freed = slab_reclaim(0); |
if (freed) |
zone = find_free_zone_and_lock(order, flags, pzone); |
if (!zone) { |
freed = slab_reclaim(SLAB_RECLAIM_ALL); |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
if (freed > 0) |
znum = find_free_zone(order, |
FRAME_TO_ZONE_FLAGS(flags), hint); |
if (freed) |
zone = find_free_zone_and_lock(order, flags, |
pzone); |
} |
} |
if (znum == (size_t) -1) { |
if (!zone) { |
/* |
* Sleep until some frames are available again. |
*/ |
if (flags & FRAME_ATOMIC) { |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return NULL; |
return 0; |
} |
#ifdef CONFIG_DEBUG |
size_t avail = total_frames_free(); |
unsigned long avail; |
mutex_lock(&mem_avail_mtx); |
avail = mem_avail_frames; |
mutex_unlock(&mem_avail_mtx); |
printf("Thread %" PRIu64 " waiting for %u frames, " |
"%u available.\n", THREAD->tid, 1ULL << order, avail); |
#endif |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
/* |
* Sleep until some frames are available again. |
*/ |
#ifdef CONFIG_DEBUG |
printf("Thread %" PRIu64 " waiting for %" PRIs " frames, " |
"%" PRIs " available.\n", THREAD->tid, size, avail); |
#endif |
mutex_lock(&mem_avail_mtx); |
if (mem_avail_req > 0) |
mem_avail_req = min(mem_avail_req, size); |
else |
mem_avail_req = size; |
size_t gen = mem_avail_gen; |
while (gen == mem_avail_gen) |
while ((mem_avail_frames < (1ULL << order)) || |
gen == mem_avail_gen) |
condvar_wait(&mem_avail_cv, &mem_avail_mtx); |
gen = mem_avail_gen; |
mutex_unlock(&mem_avail_mtx); |
#ifdef CONFIG_DEBUG |
printf("Thread %" PRIu64 " woken up.\n", THREAD->tid); |
mutex_lock(&mem_avail_mtx); |
avail = mem_avail_frames; |
mutex_unlock(&mem_avail_mtx); |
printf("Thread %" PRIu64 " woken up, %u frames available.\n", |
THREAD->tid, avail); |
#endif |
interrupts_restore(ipl); |
goto loop; |
} |
pfn_t pfn = zone_frame_alloc(&zones.info[znum], order) |
+ zones.info[znum].base; |
v = zone_frame_alloc(zone, order); |
v += zone->base; |
spinlock_unlock(&zone->lock); |
spinlock_unlock(&zones.lock); |
mutex_lock(&mem_avail_mtx); |
mem_avail_frames -= (1ULL << order); |
mutex_unlock(&mem_avail_mtx); |
interrupts_restore(ipl); |
if (pzone) |
*pzone = znum; |
if (flags & FRAME_KA) |
return (void *) PA2KA(PFN2ADDR(pfn)); |
return (void *) PFN2ADDR(pfn); |
return (void *)PA2KA(PFN2ADDR(v)); |
return (void *)PFN2ADDR(v); |
} |
/** Free a frame. |
* |
* Find respective frame structure for supplied physical frame address. |
* Decrement frame reference count. If it drops to zero, move the frame |
* structure to free list. |
* Decrement frame reference count. |
* If it drops to zero, move the frame structure to free list. |
* |
* @param frame Physical Address of of the frame to be freed. |
* |
* @param frame Physical Address of of the frame to be freed. |
*/ |
void frame_free(uintptr_t frame) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
ipl_t ipl; |
zone_t *zone; |
pfn_t pfn = ADDR2PFN(frame); |
ipl = interrupts_disable(); |
/* |
* First, find host frame zone for addr. |
*/ |
pfn_t pfn = ADDR2PFN(frame); |
size_t znum = find_zone(pfn, 1, NULL); |
zone = find_zone_and_lock(pfn, NULL); |
ASSERT(zone); |
ASSERT(znum != (size_t) -1); |
zone_frame_free(zone, pfn - zone->base); |
zone_frame_free(&zones.info[znum], pfn - zones.info[znum].base); |
spinlock_unlock(&zone->lock); |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
/* |
* Signal that some memory has been freed. |
*/ |
mutex_lock(&mem_avail_mtx); |
if (mem_avail_req > 0) |
mem_avail_req--; |
if (mem_avail_req == 0) { |
mem_avail_gen++; |
condvar_broadcast(&mem_avail_cv); |
} |
mem_avail_frames++; |
mem_avail_gen++; |
condvar_broadcast(&mem_avail_cv); |
mutex_unlock(&mem_avail_mtx); |
interrupts_restore(ipl); |
} |
/** Add reference to frame. |
1123,45 → 1115,44 |
* Find respective frame structure for supplied PFN and |
* increment frame reference count. |
* |
* @param pfn Frame number of the frame to be freed. |
* |
* @param pfn Frame number of the frame to be freed. |
*/ |
void frame_reference_add(pfn_t pfn) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
ipl_t ipl; |
zone_t *zone; |
frame_t *frame; |
ipl = interrupts_disable(); |
/* |
* First, find host frame zone for addr. |
*/ |
size_t znum = find_zone(pfn, 1, NULL); |
zone = find_zone_and_lock(pfn, NULL); |
ASSERT(zone); |
ASSERT(znum != (size_t) -1); |
frame = &zone->frames[pfn - zone->base]; |
frame->refcount++; |
zones.info[znum].frames[pfn - zones.info[znum].base].refcount++; |
spinlock_unlock(&zones.lock); |
spinlock_unlock(&zone->lock); |
interrupts_restore(ipl); |
} |
/** Mark given range unavailable in frame zones. */ |
void frame_mark_unavailable(pfn_t start, size_t count) |
void frame_mark_unavailable(pfn_t start, count_t count) |
{ |
ipl_t ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
unsigned int i; |
zone_t *zone; |
unsigned int prefzone = 0; |
size_t i; |
for (i = 0; i < count; i++) { |
size_t znum = find_zone(start + i, 1, 0); |
if (znum == (size_t) -1) /* PFN not found */ |
zone = find_zone_and_lock(start + i, &prefzone); |
if (!zone) /* PFN not found */ |
continue; |
zone_mark_unavailable(&zones.info[znum], |
start + i - zones.info[znum].base); |
zone_mark_unavailable(zone, start + i - zone->base); |
spinlock_unlock(&zone->lock); |
} |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
} |
/** Initialize physical memory management. */ |
1173,7 → 1164,6 |
mutex_initialize(&mem_avail_mtx, MUTEX_ACTIVE); |
condvar_initialize(&mem_avail_cv); |
} |
/* Tell the architecture to create some memory */ |
frame_arch_init(); |
if (config.cpu_active == 1) { |
1182,34 → 1172,41 |
frame_mark_unavailable(ADDR2PFN(KA2PA(config.stack_base)), |
SIZE2FRAMES(config.stack_size)); |
size_t i; |
count_t i; |
for (i = 0; i < init.cnt; i++) { |
pfn_t pfn = ADDR2PFN(KA2PA(init.tasks[i].addr)); |
frame_mark_unavailable(pfn, |
SIZE2FRAMES(init.tasks[i].size)); |
} |
if (ballocs.size) |
frame_mark_unavailable(ADDR2PFN(KA2PA(ballocs.base)), |
SIZE2FRAMES(ballocs.size)); |
/* Black list first frame, as allocating NULL would |
* fail in some places |
*/ |
* fail in some places */ |
frame_mark_unavailable(0, 1); |
} |
} |
/** Return total size of all zones. */ |
uint64_t zone_total_size(void) |
{ |
ipl_t ipl = interrupts_disable(); |
zone_t *zone = NULL; |
unsigned int i; |
ipl_t ipl; |
uint64_t total = 0; |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
uint64_t total = 0; |
size_t i; |
for (i = 0; i < zones.count; i++) |
total += (uint64_t) FRAMES2SIZE(zones.info[i].count); |
for (i = 0; i < zones.count; i++) { |
zone = zones.info[i]; |
spinlock_lock(&zone->lock); |
total += (uint64_t) FRAMES2SIZE(zone->count); |
spinlock_unlock(&zone->lock); |
} |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
1220,14 → 1217,18 |
/** Prints list of zones. */ |
void zone_print_list(void) |
{ |
#ifdef __32_BITS__ |
printf("# base address frames flags free frames busy frames\n"); |
printf("-- ------------ ------------ -------- ------------ ------------\n"); |
zone_t *zone = NULL; |
unsigned int i; |
ipl_t ipl; |
#ifdef __32_BITS__ |
printf("# base address free frames busy frames\n"); |
printf("-- ------------ ------------ ------------\n"); |
#endif |
#ifdef __64_BITS__ |
printf("# base address frames flags free frames busy frames\n"); |
printf("-- -------------------- ------------ -------- ------------ ------------\n"); |
printf("# base address free frames busy frames\n"); |
printf("-- -------------------- ------------ ------------\n"); |
#endif |
/* |
1240,10 → 1241,13 |
* we may end up with inaccurate output (e.g. a zone being skipped from |
* the listing). |
*/ |
size_t i; |
for (i = 0;; i++) { |
ipl_t ipl = interrupts_disable(); |
for (i = 0; ; i++) { |
uintptr_t base; |
count_t free_count; |
count_t busy_count; |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
if (i >= zones.count) { |
1251,61 → 1255,56 |
interrupts_restore(ipl); |
break; |
} |
zone = zones.info[i]; |
spinlock_lock(&zone->lock); |
base = PFN2ADDR(zone->base); |
free_count = zone->free_count; |
busy_count = zone->busy_count; |
spinlock_unlock(&zone->lock); |
uintptr_t base = PFN2ADDR(zones.info[i].base); |
size_t count = zones.info[i].count; |
zone_flags_t flags = zones.info[i].flags; |
size_t free_count = zones.info[i].free_count; |
size_t busy_count = zones.info[i].busy_count; |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
bool available = zone_flags_available(flags); |
printf("%-2" PRIs, i); |
#ifdef __32_BITS__ |
printf(" %10p", base); |
printf("%-2u %10p %12" PRIc " %12" PRIc "\n", i, base, |
free_count, busy_count); |
#endif |
#ifdef __64_BITS__ |
printf(" %18p", base); |
printf("%-2u %18p %12" PRIc " %12" PRIc "\n", i, base, |
free_count, busy_count); |
#endif |
printf(" %12" PRIs " %c%c%c ", count, |
available ? 'A' : ' ', |
(flags & ZONE_RESERVED) ? 'R' : ' ', |
(flags & ZONE_FIRMWARE) ? 'F' : ' '); |
if (available) |
printf("%12" PRIs " %12" PRIs, |
free_count, busy_count); |
printf("\n"); |
} |
} |
/** Prints zone details. |
* |
* @param num Zone base address or zone number. |
* |
* @param num Zone base address or zone number. |
*/ |
void zone_print_one(size_t num) |
void zone_print_one(unsigned int num) |
{ |
ipl_t ipl = interrupts_disable(); |
zone_t *zone = NULL; |
ipl_t ipl; |
unsigned int i; |
uintptr_t base; |
count_t count; |
count_t busy_count; |
count_t free_count; |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
size_t znum = (size_t) -1; |
size_t i; |
for (i = 0; i < zones.count; i++) { |
if ((i == num) || (PFN2ADDR(zones.info[i].base) == num)) { |
znum = i; |
if ((i == num) || (PFN2ADDR(zones.info[i]->base) == num)) { |
zone = zones.info[i]; |
break; |
} |
} |
if (znum == (size_t) -1) { |
if (!zone) { |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
printf("Zone not found.\n"); |
1312,33 → 1311,24 |
return; |
} |
uintptr_t base = PFN2ADDR(zones.info[i].base); |
zone_flags_t flags = zones.info[i].flags; |
size_t count = zones.info[i].count; |
size_t free_count = zones.info[i].free_count; |
size_t busy_count = zones.info[i].busy_count; |
spinlock_lock(&zone->lock); |
base = PFN2ADDR(zone->base); |
count = zone->count; |
busy_count = zone->busy_count; |
free_count = zone->free_count; |
spinlock_unlock(&zone->lock); |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
bool available = zone_flags_available(flags); |
printf("Zone number: %" PRIs "\n", znum); |
printf("Zone base address: %p\n", base); |
printf("Zone size: %" PRIs " frames (%" PRIs " KiB)\n", count, |
printf("Zone size: %" PRIc " frames (%" PRIs " KiB)\n", count, |
SIZE2KB(FRAMES2SIZE(count))); |
printf("Zone flags: %c%c%c\n", |
available ? 'A' : ' ', |
(flags & ZONE_RESERVED) ? 'R' : ' ', |
(flags & ZONE_FIRMWARE) ? 'F' : ' '); |
if (available) { |
printf("Allocated space: %" PRIs " frames (%" PRIs " KiB)\n", |
busy_count, SIZE2KB(FRAMES2SIZE(busy_count))); |
printf("Available space: %" PRIs " frames (%" PRIs " KiB)\n", |
free_count, SIZE2KB(FRAMES2SIZE(free_count))); |
} |
printf("Allocated space: %" PRIc " frames (%" PRIs " KiB)\n", |
busy_count, SIZE2KB(FRAMES2SIZE(busy_count))); |
printf("Available space: %" PRIc " frames (%" PRIs " KiB)\n", |
free_count, SIZE2KB(FRAMES2SIZE(free_count))); |
} |
/** @} |
*/ |
/branches/arm/kernel/generic/src/mm/buddy.c |
---|
46,7 → 46,7 |
#include <macros.h> |
/** Return size needed for the buddy configuration data. */ |
size_t buddy_conf_size(size_t max_order) |
size_t buddy_conf_size(int max_order) |
{ |
return sizeof(buddy_system_t) + (max_order + 1) * sizeof(link_t); |
} |
/branches/arm/kernel/generic/src/mm/slab.c |
---|
129,7 → 129,7 |
static slab_cache_t *slab_extern_cache; |
/** Caches for malloc */ |
static slab_cache_t *malloc_caches[SLAB_MAX_MALLOC_W - SLAB_MIN_MALLOC_W + 1]; |
static char *malloc_names[] = { |
char *malloc_names[] = { |
"malloc-16", |
"malloc-32", |
"malloc-64", |
144,11 → 144,7 |
"malloc-32K", |
"malloc-64K", |
"malloc-128K", |
"malloc-256K", |
"malloc-512K", |
"malloc-1M", |
"malloc-2M", |
"malloc-4M" |
"malloc-256K" |
}; |
/** Slab descriptor */ |
156,8 → 152,8 |
slab_cache_t *cache; /**< Pointer to parent cache. */ |
link_t link; /**< List of full/partial slabs. */ |
void *start; /**< Start address of first available item. */ |
size_t available; /**< Count of available items in this slab. */ |
size_t nextavail; /**< The index of next available item. */ |
count_t available; /**< Count of available items in this slab. */ |
index_t nextavail; /**< The index of next available item. */ |
} slab_t; |
#ifdef CONFIG_DEBUG |
177,7 → 173,7 |
slab_t *slab; |
size_t fsize; |
unsigned int i; |
size_t zone = 0; |
unsigned int zone = 0; |
data = frame_alloc_generic(cache->order, FRAME_KA | flags, &zone); |
if (!data) { |
215,7 → 211,7 |
* |
* @return number of freed frames |
*/ |
static size_t slab_space_free(slab_cache_t *cache, slab_t *slab) |
static count_t slab_space_free(slab_cache_t *cache, slab_t *slab) |
{ |
frame_free(KA2PA(slab->start)); |
if (! (cache->flags & SLAB_CACHE_SLINSIDE)) |
243,7 → 239,7 |
* |
* @return Number of freed pages |
*/ |
static size_t slab_obj_destroy(slab_cache_t *cache, void *obj, slab_t *slab) |
static count_t slab_obj_destroy(slab_cache_t *cache, void *obj, slab_t *slab) |
{ |
int freed = 0; |
371,10 → 367,10 |
* |
* @return Number of freed pages |
*/ |
static size_t magazine_destroy(slab_cache_t *cache, slab_magazine_t *mag) |
static count_t magazine_destroy(slab_cache_t *cache, slab_magazine_t *mag) |
{ |
unsigned int i; |
size_t frames = 0; |
count_t frames = 0; |
for (i = 0; i < mag->busy; i++) { |
frames += slab_obj_destroy(cache, mag->objs[i], NULL); |
649,11 → 645,11 |
* @param flags If contains SLAB_RECLAIM_ALL, do aggressive freeing |
* @return Number of freed pages |
*/ |
static size_t _slab_reclaim(slab_cache_t *cache, int flags) |
static count_t _slab_reclaim(slab_cache_t *cache, int flags) |
{ |
unsigned int i; |
slab_magazine_t *mag; |
size_t frames = 0; |
count_t frames = 0; |
int magcount; |
if (cache->flags & SLAB_CACHE_NOMAGAZINE) |
771,11 → 767,11 |
} |
/* Go through all caches and reclaim what is possible */ |
size_t slab_reclaim(int flags) |
count_t slab_reclaim(int flags) |
{ |
slab_cache_t *cache; |
link_t *cur; |
size_t frames = 0; |
count_t frames = 0; |
spinlock_lock(&slab_cache_lock); |
936,7 → 932,7 |
void *malloc(unsigned int size, int flags) |
{ |
ASSERT(_slab_initialized); |
ASSERT(size <= (1 << SLAB_MAX_MALLOC_W)); |
ASSERT(size && size <= (1 << SLAB_MAX_MALLOC_W)); |
if (size < (1 << SLAB_MIN_MALLOC_W)) |
size = (1 << SLAB_MIN_MALLOC_W); |
/branches/arm/kernel/generic/src/mm/tlb.c |
---|
79,7 → 79,7 |
* @param count Number of pages, if required by type. |
*/ |
void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, |
uintptr_t page, size_t count) |
uintptr_t page, count_t count) |
{ |
unsigned int i; |
108,7 → 108,7 |
/* |
* Enqueue the message. |
*/ |
size_t idx = cpu->tlb_messages_count++; |
index_t idx = cpu->tlb_messages_count++; |
cpu->tlb_messages[idx].type = type; |
cpu->tlb_messages[idx].asid = asid; |
cpu->tlb_messages[idx].page = page; |
143,7 → 143,7 |
tlb_invalidate_type_t type; |
asid_t asid; |
uintptr_t page; |
size_t count; |
count_t count; |
unsigned int i; |
ASSERT(CPU); |
173,7 → 173,7 |
tlb_invalidate_pages(asid, page, count); |
break; |
default: |
panic("Unknown type (%d).", type); |
panic("unknown type (%d)\n", type); |
break; |
} |
if (type == TLB_INVL_ALL) |
/branches/arm/kernel/generic/src/mm/backend_phys.c |
---|
77,7 → 77,7 |
page_mapping_insert(AS, addr, base + (addr - area->base), |
as_area_get_flags(area)); |
if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1)) |
panic("Cannot insert used space."); |
panic("Could not insert used space.\n"); |
return AS_PF_OK; |
} |
/branches/arm/kernel/generic/src/lib/string.c |
---|
File deleted |
/branches/arm/kernel/generic/src/lib/memstr.c |
---|
1,6 → 1,5 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2008 Jiri Svoboda |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
77,51 → 76,6 |
return (char *) dst; |
} |
/** Move memory block with possible overlapping. |
* |
* Copy cnt bytes from src address to dst address. The source and destination |
* memory areas may overlap. |
* |
* @param src Source address to copy from. |
* @param dst Destination address to copy to. |
* @param cnt Number of bytes to copy. |
* |
* @return Destination address. |
*/ |
void *memmove(void *dst, const void *src, size_t n) |
{ |
const uint8_t *sp; |
uint8_t *dp; |
/* Nothing to do? */ |
if (src == dst) |
return dst; |
/* Non-overlapping? */ |
if (dst >= src + n || src >= dst + n) { |
return memcpy(dst, src, n); |
} |
/* Which direction? */ |
if (src > dst) { |
/* Forwards. */ |
sp = src; |
dp = dst; |
while (n-- != 0) |
*dp++ = *sp++; |
} else { |
/* Backwards. */ |
sp = src + (n - 1); |
dp = dst + (n - 1); |
while (n-- != 0) |
*dp-- = *sp--; |
} |
return dst; |
} |
/** Fill block of memory |
* |
* Fill cnt bytes at dst address with the value x. The filling is done |
160,5 → 114,25 |
p[i] = x; |
} |
/** Copy string. |
* |
* Copy string from src address to dst address. The copying is done |
* char-by-char until the null character. The source and destination memory |
* areas cannot overlap. |
* |
* @param src Source string to copy from. |
* @param dst Destination string to copy to. |
* |
* @return Address of the destination string. |
*/ |
char *strcpy(char *dest, const char *src) |
{ |
char *orig = dest; |
while ((*(dest++) = *(src++))) |
; |
return orig; |
} |
/** @} |
*/ |
/branches/arm/kernel/generic/src/lib/rd.c |
---|
88,7 → 88,9 |
rd_parea.pbase = ALIGN_DOWN((uintptr_t) KA2PA((void *) header + hsize), |
FRAME_SIZE); |
rd_parea.vbase = (uintptr_t) ((void *) header + hsize); |
rd_parea.frames = SIZE2FRAMES(dsize); |
rd_parea.cacheable = true; |
ddi_parea_register(&rd_parea); |
sysinfo_set_item_val("rd", NULL, true); |
/branches/arm/kernel/generic/src/lib/func.c |
---|
47,7 → 47,7 |
/** Halt wrapper |
* |
* Set halt flag and halt the CPU. |
* Set halt flag and halt the cpu. |
* |
*/ |
void halt() |
54,7 → 54,9 |
{ |
#ifdef CONFIG_DEBUG |
bool rundebugger = false; |
// TODO test_and_set not defined on all arches |
// if (!test_and_set(&haltstate)) |
if (!atomic_get(&haltstate)) { |
atomic_set(&haltstate, 1); |
rundebugger = true; |
62,22 → 64,118 |
#else |
atomic_set(&haltstate, 1); |
#endif |
interrupts_disable(); |
#if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE)) |
if ((rundebugger) && (kconsole_check_poll())) |
kconsole("panic", "\nLast resort kernel console ready.\n", false); |
#endif |
#ifdef CONFIG_DEBUG |
if (rundebugger) { |
printf("\n"); |
kconsole("panic"); /* Run kconsole as a last resort to user */ |
} |
#endif |
if (CPU) |
printf("cpu%u: halted\n", CPU->id); |
else |
printf("cpu: halted\n"); |
cpu_halt(); |
} |
/** Return number of characters in a string. |
* |
* @param str NULL terminated string. |
* |
* @return Number of characters in str. |
*/ |
size_t strlen(const char *str) |
{ |
int i; |
for (i = 0; str[i]; i++) |
; |
return i; |
} |
/** Compare two NULL terminated strings |
* |
* Do a char-by-char comparison of two NULL terminated strings. |
* The strings are considered equal iff they consist of the same |
* characters on the minimum of their lengths. |
* |
* @param src First string to compare. |
* @param dst Second string to compare. |
* |
* @return 0 if the strings are equal, -1 if first is smaller, 1 if second smaller. |
* |
*/ |
int strcmp(const char *src, const char *dst) |
{ |
for (; *src && *dst; src++, dst++) { |
if (*src < *dst) |
return -1; |
if (*src > *dst) |
return 1; |
} |
if (*src == *dst) |
return 0; |
if (!*src) |
return -1; |
return 1; |
} |
/** Compare two NULL terminated strings |
* |
* Do a char-by-char comparison of two NULL terminated strings. |
* The strings are considered equal iff they consist of the same |
* characters on the minimum of their lengths and specified maximal |
* length. |
* |
* @param src First string to compare. |
* @param dst Second string to compare. |
* @param len Maximal length for comparison. |
* |
* @return 0 if the strings are equal, -1 if first is smaller, 1 if second smaller. |
* |
*/ |
int strncmp(const char *src, const char *dst, size_t len) |
{ |
unsigned int i; |
for (i = 0; (*src) && (*dst) && (i < len); src++, dst++, i++) { |
if (*src < *dst) |
return -1; |
if (*src > *dst) |
return 1; |
} |
if (i == len || *src == *dst) |
return 0; |
if (!*src) |
return -1; |
return 1; |
} |
/** Copy NULL terminated string. |
* |
* Copy at most 'len' characters from string 'src' to 'dest'. |
* If 'src' is shorter than 'len', '\0' is inserted behind the |
* last copied character. |
* |
* @param src Source string. |
* @param dest Destination buffer. |
* @param len Size of destination buffer. |
*/ |
void strncpy(char *dest, const char *src, size_t len) |
{ |
unsigned int i; |
for (i = 0; i < len; i++) { |
if (!(dest[i] = src[i])) |
return; |
} |
dest[i-1] = '\0'; |
} |
/** Convert ascii representation to unative_t |
* |
* Supports 0x for hexa & 0 for octal notation. |
/branches/arm/kernel/generic/src/lib/sort.c |
---|
45,8 → 45,8 |
#define EBUFSIZE 32 |
void _qsort(void * data, size_t n, size_t e_size, int (* cmp) (void * a, void * b), void *tmp, void *pivot); |
void _bubblesort(void * data, size_t n, size_t e_size, int (* cmp) (void * a, void * b), void *slot); |
void _qsort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b), void *tmp, void *pivot); |
void _bubblesort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b), void *slot); |
/** Quicksort wrapper |
* |
61,7 → 61,7 |
* @param cmp Comparator function. |
* |
*/ |
void qsort(void * data, size_t n, size_t e_size, int (* cmp) (void * a, void * b)) |
void qsort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b)) |
{ |
uint8_t buf_tmp[EBUFSIZE]; |
uint8_t buf_pivot[EBUFSIZE]; |
93,7 → 93,7 |
* @param pivot Pointer to scratch memory buffer e_size bytes long. |
* |
*/ |
void _qsort(void * data, size_t n, size_t e_size, int (* cmp) (void * a, void * b), void *tmp, void *pivot) |
void _qsort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b), void *tmp, void *pivot) |
{ |
if (n > 4) { |
unsigned int i = 0, j = n - 1; |
133,7 → 133,7 |
* @param cmp Comparator function. |
* |
*/ |
void bubblesort(void * data, size_t n, size_t e_size, int (* cmp) (void * a, void * b)) |
void bubblesort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b)) |
{ |
uint8_t buf_slot[EBUFSIZE]; |
void * slot = buf_slot; |
160,7 → 160,7 |
* @param slot Pointer to scratch memory buffer e_size bytes long. |
* |
*/ |
void _bubblesort(void * data, size_t n, size_t e_size, int (* cmp) (void * a, void * b), void *slot) |
void _bubblesort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b), void *slot) |
{ |
bool done = false; |
void * p; |
/branches/arm/kernel/generic/src/sysinfo/sysinfo.c |
---|
163,8 → 163,7 |
i = 0; |
} |
} |
panic("Not reached."); |
panic("Not reached\n"); |
return NULL; |
} |
/branches/arm/kernel/generic/src/synch/rwlock.c |
---|
231,10 → 231,10 |
interrupts_restore(ipl); |
break; |
case ESYNCH_OK_ATOMIC: |
panic("_mutex_lock_timeout() == ESYNCH_OK_ATOMIC."); |
panic("_mutex_lock_timeout() == ESYNCH_OK_ATOMIC\n"); |
break; |
default: |
panic("Invalid ESYNCH."); |
panic("invalid ESYNCH\n"); |
break; |
} |
return rc; |
/branches/arm/kernel/generic/src/synch/spinlock.c |
---|
32,9 → 32,9 |
/** |
* @file |
* @brief Spinlocks. |
* @brief Spinlocks. |
*/ |
#include <synch/spinlock.h> |
#include <atomic.h> |
#include <arch/barrier.h> |
75,7 → 75,8 |
#ifdef CONFIG_DEBUG_SPINLOCK |
void spinlock_lock_debug(spinlock_t *sl) |
{ |
size_t i = 0; |
count_t i = 0; |
char *symbol; |
bool deadlock_reported = false; |
preemption_disable(); |
105,10 → 106,12 |
continue; |
#endif |
if (i++ > DEADLOCK_THRESHOLD) { |
printf("cpu%u: looping on spinlock %" PRIp ":%s, " |
"caller=%" PRIp "(%s)\n", CPU->id, sl, sl->name, |
CALLER, symtab_fmt_name_lookup(CALLER)); |
printf("cpu%u: looping on spinlock %" PRIp ":%s, caller=%" PRIp, |
CPU->id, sl, sl->name, CALLER); |
symbol = get_symtab_entry(CALLER); |
if (symbol) |
printf("(%s)", symbol); |
printf("\n"); |
i = 0; |
deadlock_reported = true; |
} |
/branches/arm/kernel/generic/src/synch/waitq.c |
---|
415,7 → 415,7 |
void _waitq_wakeup_unsafe(waitq_t *wq, wakeup_mode_t mode) |
{ |
thread_t *t; |
size_t count = 0; |
count_t count = 0; |
loop: |
if (list_empty(&wq->head)) { |
/branches/arm/kernel/generic/src/synch/futex.c |
---|
59,8 → 59,8 |
static void futex_initialize(futex_t *futex); |
static futex_t *futex_find(uintptr_t paddr); |
static size_t futex_ht_hash(unative_t *key); |
static bool futex_ht_compare(unative_t *key, size_t keys, link_t *item); |
static index_t futex_ht_hash(unative_t *key); |
static bool futex_ht_compare(unative_t *key, count_t keys, link_t *item); |
static void futex_ht_remove_callback(link_t *item); |
/** |
115,7 → 115,6 |
uintptr_t paddr; |
pte_t *t; |
ipl_t ipl; |
int rc; |
ipl = interrupts_disable(); |
135,17 → 134,9 |
interrupts_restore(ipl); |
futex = futex_find(paddr); |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_begin(); |
#endif |
rc = waitq_sleep_timeout(&futex->wq, usec, flags | |
return (unative_t) waitq_sleep_timeout(&futex->wq, usec, flags | |
SYNCH_FLAGS_INTERRUPTIBLE); |
#ifdef CONFIG_UDEBUG |
udebug_stoppable_end(); |
#endif |
return (unative_t) rc; |
} |
/** Wakeup one thread waiting in futex wait queue. |
288,9 → 279,9 |
* |
* @return Index into futex hash table. |
*/ |
size_t futex_ht_hash(unative_t *key) |
index_t futex_ht_hash(unative_t *key) |
{ |
return (*key & (FUTEX_HT_SIZE - 1)); |
return *key & (FUTEX_HT_SIZE-1); |
} |
/** Compare futex hash table item with a key. |
300,7 → 291,7 |
* |
* @return True if the item matches the key. False otherwise. |
*/ |
bool futex_ht_compare(unative_t *key, size_t keys, link_t *item) |
bool futex_ht_compare(unative_t *key, count_t keys, link_t *item) |
{ |
futex_t *futex; |
/branches/arm/kernel/generic/src/cpu/cpu.c |
---|
64,7 → 64,7 |
cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count, |
FRAME_ATOMIC); |
if (!cpus) |
panic("Cannot allocate CPU structures."); |
panic("malloc/cpus"); |
/* initialize everything */ |
memsetb(cpus, sizeof(cpu_t) * config.cpu_count, 0); |
86,7 → 86,7 |
} |
#endif /* CONFIG_SMP */ |
CPU = &cpus[config.cpu_active - 1]; |
CPU = &cpus[config.cpu_active-1]; |
CPU->active = 1; |
CPU->tlb_active = 1; |
/branches/arm/kernel/generic/src/adt/hash_table.c |
---|
32,7 → 32,7 |
/** |
* @file |
* @brief Implementation of generic chained hash table. |
* @brief Implementation of generic chained hash table. |
* |
* This file contains implementation of generic chained hash table. |
*/ |
51,20 → 51,18 |
* @param max_keys Maximal number of keys needed to identify an item. |
* @param op Hash table operations structure. |
*/ |
void hash_table_create(hash_table_t *h, size_t m, size_t max_keys, hash_table_operations_t *op) |
void hash_table_create(hash_table_t *h, count_t m, count_t max_keys, hash_table_operations_t *op) |
{ |
size_t i; |
index_t i; |
ASSERT(h); |
ASSERT(op); |
ASSERT(op->hash); |
ASSERT(op->compare); |
ASSERT(op && op->hash && op->compare); |
ASSERT(max_keys > 0); |
h->entry = (link_t *) malloc(m * sizeof(link_t), 0); |
if (!h->entry) |
panic("Cannot allocate memory for hash table."); |
if (!h->entry) { |
panic("cannot allocate memory for hash table\n"); |
} |
memsetb(h->entry, m * sizeof(link_t), 0); |
for (i = 0; i < m; i++) |
83,14 → 81,11 |
*/ |
void hash_table_insert(hash_table_t *h, unative_t key[], link_t *item) |
{ |
size_t chain; |
index_t chain; |
ASSERT(item); |
ASSERT(h); |
ASSERT(h->op); |
ASSERT(h->op->hash); |
ASSERT(h->op->compare); |
ASSERT(h && h->op && h->op->hash && h->op->compare); |
chain = h->op->hash(key); |
ASSERT(chain < h->entries); |
107,13 → 102,10 |
link_t *hash_table_find(hash_table_t *h, unative_t key[]) |
{ |
link_t *cur; |
size_t chain; |
ASSERT(h); |
ASSERT(h->op); |
ASSERT(h->op->hash); |
ASSERT(h->op->compare); |
index_t chain; |
ASSERT(h && h->op && h->op->hash && h->op->compare); |
chain = h->op->hash(key); |
ASSERT(chain < h->entries); |
131,25 → 123,22 |
/** Remove all matching items from hash table. |
* |
* For each removed item, h->remove_callback() is called (if not NULL). |
* For each removed item, h->remove_callback() is called. |
* |
* @param h Hash table. |
* @param key Array of keys that will be compared against items of the hash table. |
* @param keys Number of keys in the key array. |
*/ |
void hash_table_remove(hash_table_t *h, unative_t key[], size_t keys) |
void hash_table_remove(hash_table_t *h, unative_t key[], count_t keys) |
{ |
size_t chain; |
index_t chain; |
link_t *cur; |
ASSERT(h); |
ASSERT(h->op); |
ASSERT(h->op->hash); |
ASSERT(h->op->compare); |
ASSERT(h && h->op && h->op->hash && h->op->compare && h->op->remove_callback); |
ASSERT(keys <= h->max_keys); |
if (keys == h->max_keys) { |
/* |
* All keys are known, hash_table_find() can be used to find the entry. |
*/ |
157,8 → 146,7 |
cur = hash_table_find(h, key); |
if (cur) { |
list_remove(cur); |
if (h->op->remove_callback) |
h->op->remove_callback(cur); |
h->op->remove_callback(cur); |
} |
return; |
} |
176,8 → 164,7 |
cur = cur->prev; |
list_remove(hlp); |
if (h->op->remove_callback) |
h->op->remove_callback(hlp); |
h->op->remove_callback(hlp); |
continue; |
} |
/branches/arm/kernel/generic/src/adt/btree.c |
---|
63,9 → 63,9 |
static void node_remove_key_and_rsubtree(btree_node_t *node, btree_key_t key); |
static btree_node_t *node_split(btree_node_t *node, btree_key_t key, void *value, btree_node_t *rsubtree, btree_key_t *median); |
static btree_node_t *node_combine(btree_node_t *node); |
static size_t find_key_by_subtree(btree_node_t *node, btree_node_t *subtree, bool right); |
static void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, size_t idx); |
static void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, size_t idx); |
static index_t find_key_by_subtree(btree_node_t *node, btree_node_t *subtree, bool right); |
static void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, index_t idx); |
static void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, index_t idx); |
static bool try_insert_by_rotation_to_left(btree_node_t *node, btree_key_t key, void *value, btree_node_t *rsubtree); |
static bool try_insert_by_rotation_to_right(btree_node_t *node, btree_key_t key, void *value, btree_node_t *rsubtree); |
static bool try_rotation_from_left(btree_node_t *rnode); |
124,7 → 124,7 |
lnode = leaf_node; |
if (!lnode) { |
if (btree_search(t, key, &lnode)) { |
panic("B-tree %p already contains key %" PRIu64 ".", t, key); |
panic("B-tree %p already contains key %" PRIu64 "\n", t, key); |
} |
} |
137,7 → 137,7 |
*/ |
void btree_destroy_subtree(btree_node_t *root) |
{ |
size_t i; |
count_t i; |
if (root->keys) { |
for (i = 0; i < root->keys + 1; i++) { |
224,7 → 224,7 |
lnode = leaf_node; |
if (!lnode) { |
if (!btree_search(t, key, &lnode)) { |
panic("B-tree %p does not contain key %" PRIu64 ".", t, key); |
panic("B-tree %p does not contain key %" PRIu64 "\n", t, key); |
} |
} |
269,7 → 269,7 |
} |
if (node->keys > FILL_FACTOR) { |
size_t i; |
count_t i; |
/* |
* The key can be immediatelly removed. |
285,7 → 285,7 |
} |
} else { |
size_t idx; |
index_t idx; |
btree_node_t *rnode, *parent; |
/* |
335,7 → 335,7 |
continue; |
} else { |
void *val; |
size_t i; |
count_t i; |
/* |
* Now if the key is smaller than cur->key[i] |
442,11 → 442,11 |
*/ |
void node_insert_key_and_lsubtree(btree_node_t *node, btree_key_t key, void *value, btree_node_t *lsubtree) |
{ |
size_t i; |
count_t i; |
for (i = 0; i < node->keys; i++) { |
if (key < node->key[i]) { |
size_t j; |
count_t j; |
for (j = node->keys; j > i; j--) { |
node->key[j] = node->key[j - 1]; |
478,11 → 478,11 |
*/ |
void node_insert_key_and_rsubtree(btree_node_t *node, btree_key_t key, void *value, btree_node_t *rsubtree) |
{ |
size_t i; |
count_t i; |
for (i = 0; i < node->keys; i++) { |
if (key < node->key[i]) { |
size_t j; |
count_t j; |
for (j = node->keys; j > i; j--) { |
node->key[j] = node->key[j - 1]; |
510,7 → 510,7 |
*/ |
void node_remove_key_and_lsubtree(btree_node_t *node, btree_key_t key) |
{ |
size_t i, j; |
count_t i, j; |
for (i = 0; i < node->keys; i++) { |
if (key == node->key[i]) { |
524,7 → 524,7 |
return; |
} |
} |
panic("Node %p does not contain key %" PRIu64 ".", node, key); |
panic("node %p does not contain key %" PRIu64 "\n", node, key); |
} |
/** Remove key and its right subtree pointer from B-tree node. |
538,7 → 538,7 |
*/ |
void node_remove_key_and_rsubtree(btree_node_t *node, btree_key_t key) |
{ |
size_t i, j; |
count_t i, j; |
for (i = 0; i < node->keys; i++) { |
if (key == node->key[i]) { |
551,7 → 551,7 |
return; |
} |
} |
panic("Node %p does not contain key %" PRIu64 ".", node, key); |
panic("node %p does not contain key %" PRIu64 "\n", node, key); |
} |
/** Split full B-tree node and insert new key-value-right-subtree triplet. |
576,7 → 576,7 |
btree_node_t *node_split(btree_node_t *node, btree_key_t key, void *value, btree_node_t *rsubtree, btree_key_t *median) |
{ |
btree_node_t *rnode; |
size_t i, j; |
count_t i, j; |
ASSERT(median); |
ASSERT(node->keys == BTREE_MAX_KEYS); |
603,7 → 603,7 |
* Copy big keys, values and subtree pointers to the new right sibling. |
* If this is an index node, do not copy the median. |
*/ |
i = (size_t) INDEX_NODE(node); |
i = (count_t) INDEX_NODE(node); |
for (i += MEDIAN_HIGH_INDEX(node), j = 0; i < node->keys; i++, j++) { |
rnode->key[j] = node->key[i]; |
rnode->value[j] = node->value[i]; |
636,9 → 636,9 |
*/ |
btree_node_t *node_combine(btree_node_t *node) |
{ |
size_t idx; |
index_t idx; |
btree_node_t *rnode; |
size_t i; |
count_t i; |
ASSERT(!ROOT_NODE(node)); |
685,15 → 685,15 |
* |
* @return Index of the key associated with the subtree. |
*/ |
size_t find_key_by_subtree(btree_node_t *node, btree_node_t *subtree, bool right) |
index_t find_key_by_subtree(btree_node_t *node, btree_node_t *subtree, bool right) |
{ |
size_t i; |
count_t i; |
for (i = 0; i < node->keys + 1; i++) { |
if (subtree == node->subtree[i]) |
return i - (int) (right != false); |
} |
panic("Node %p does not contain subtree %p.", node, subtree); |
panic("node %p does not contain subtree %p\n", node, subtree); |
} |
/** Rotate one key-value-rsubtree triplet from the left sibling to the right sibling. |
706,7 → 706,7 |
* @param rnode Right sibling. |
* @param idx Index of the parent node key that is taking part in the rotation. |
*/ |
void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, size_t idx) |
void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, index_t idx) |
{ |
btree_key_t key; |
743,7 → 743,7 |
* @param rnode Right sibling. |
* @param idx Index of the parent node key that is taking part in the rotation. |
*/ |
void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, size_t idx) |
void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, index_t idx) |
{ |
btree_key_t key; |
786,7 → 786,7 |
*/ |
bool try_insert_by_rotation_to_left(btree_node_t *node, btree_key_t inskey, void *insvalue, btree_node_t *rsubtree) |
{ |
size_t idx; |
index_t idx; |
btree_node_t *lnode; |
/* |
833,7 → 833,7 |
*/ |
bool try_insert_by_rotation_to_right(btree_node_t *node, btree_key_t inskey, void *insvalue, btree_node_t *rsubtree) |
{ |
size_t idx; |
index_t idx; |
btree_node_t *rnode; |
/* |
872,7 → 872,7 |
*/ |
bool try_rotation_from_left(btree_node_t *rnode) |
{ |
size_t idx; |
index_t idx; |
btree_node_t *lnode; |
/* |
907,7 → 907,7 |
*/ |
bool try_rotation_from_right(btree_node_t *lnode) |
{ |
size_t idx; |
index_t idx; |
btree_node_t *rnode; |
/* |
940,7 → 940,7 |
*/ |
void btree_print(btree_t *t) |
{ |
size_t i; |
count_t i; |
int depth = t->root->depth; |
link_t head, *cur; |
/branches/arm/kernel/generic/src/adt/avl.c |
---|
43,7 → 43,7 |
* |
* Every node has a pointer to its parent which allows insertion of multiple |
* identical keys into the tree. |
* |
* |
* Be careful when using this tree because of the base atribute which is added |
* to every inserted node key. There is no rule in which order nodes with the |
* same key are visited. |
/branches/arm/kernel/generic/src/adt/bitmap.c |
---|
54,7 → 54,7 |
* @param map Address of the memory used to hold the map. |
* @param bits Number of bits stored in bitmap. |
*/ |
void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, size_t bits) |
void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits) |
{ |
bitmap->map = map; |
bitmap->bits = bits; |
66,13 → 66,13 |
* @param start Starting bit. |
* @param bits Number of bits to set. |
*/ |
void bitmap_set_range(bitmap_t *bitmap, size_t start, size_t bits) |
void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits) |
{ |
size_t i = 0; |
size_t aligned_start; |
size_t lub; /* leading unaligned bits */ |
size_t amb; /* aligned middle bits */ |
size_t tab; /* trailing aligned bits */ |
index_t i=0; |
index_t aligned_start; |
count_t lub; /* leading unaligned bits */ |
count_t amb; /* aligned middle bits */ |
count_t tab; /* trailing aligned bits */ |
ASSERT(start + bits <= bitmap->bits); |
116,13 → 116,13 |
* @param start Starting bit. |
* @param bits Number of bits to clear. |
*/ |
void bitmap_clear_range(bitmap_t *bitmap, size_t start, size_t bits) |
void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits) |
{ |
size_t i = 0; |
size_t aligned_start; |
size_t lub; /* leading unaligned bits */ |
size_t amb; /* aligned middle bits */ |
size_t tab; /* trailing aligned bits */ |
index_t i=0; |
index_t aligned_start; |
count_t lub; /* leading unaligned bits */ |
count_t amb; /* aligned middle bits */ |
count_t tab; /* trailing aligned bits */ |
ASSERT(start + bits <= bitmap->bits); |
168,9 → 168,9 |
* @param src Source bitmap. |
* @param bits Number of bits to copy. |
*/ |
void bitmap_copy(bitmap_t *dst, bitmap_t *src, size_t bits) |
void bitmap_copy(bitmap_t *dst, bitmap_t *src, count_t bits) |
{ |
size_t i; |
index_t i; |
ASSERT(bits <= dst->bits); |
ASSERT(bits <= src->bits); |
/branches/arm/kernel/generic/src/debug/symtab.c |
---|
32,222 → 32,171 |
/** |
* @file |
* @brief Kernel symbol resolver. |
* @brief Kernel symbol resolver. |
*/ |
#include <symtab.h> |
#include <byteorder.h> |
#include <string.h> |
#include <func.h> |
#include <print.h> |
#include <arch/types.h> |
#include <typedefs.h> |
#include <errno.h> |
/** Get name of a symbol that seems most likely to correspond to address. |
/** Return entry that seems most likely to correspond to argument. |
* |
* Return entry that seems most likely to correspond |
* to address passed in the argument. |
* |
* @param addr Address. |
* @param name Place to store pointer to the symbol name. |
* |
* @return Zero on success or negative error code, ENOENT if not found, |
* ENOTSUP if symbol table not available. |
* |
* @return Pointer to respective symbol string on success, NULL otherwise. |
*/ |
int symtab_name_lookup(unative_t addr, char **name) |
char * get_symtab_entry(unative_t addr) |
{ |
#ifdef CONFIG_SYMTAB |
size_t i; |
for (i = 1; symbol_table[i].address_le; i++) { |
count_t i; |
for (i = 1; symbol_table[i].address_le; ++i) { |
if (addr < uint64_t_le2host(symbol_table[i].address_le)) |
break; |
} |
if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le)) { |
*name = symbol_table[i - 1].symbol_name; |
return EOK; |
} |
*name = NULL; |
return ENOENT; |
#else |
*name = NULL; |
return ENOTSUP; |
#endif |
if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le)) |
return symbol_table[i - 1].symbol_name; |
return NULL; |
} |
/** Lookup symbol by address and format for display. |
/** Find symbols that match the parameter forward and print them. |
* |
* Returns name of closest corresponding symbol, "Not found" if none exists |
* or "N/A" if no symbol information is available. |
* |
* @param addr Address. |
* @param name Place to store pointer to the symbol name. |
* |
* @return Pointer to a human-readable string. |
* |
* @param name - search string |
* @param startpos - starting position, changes to found position |
* @return Pointer to the part of string that should be completed or NULL |
*/ |
char *symtab_fmt_name_lookup(unative_t addr) |
static char * symtab_search_one(const char *name, int *startpos) |
{ |
char *name; |
int rc = symtab_name_lookup(addr, &name); |
switch (rc) { |
case EOK: |
return name; |
case ENOENT: |
return "Not found"; |
default: |
return "N/A"; |
} |
} |
unsigned int namelen = strlen(name); |
char *curname; |
int i, j; |
int colonoffset = -1; |
#ifdef CONFIG_SYMTAB |
for (i = 0; name[i]; i++) |
if (name[i] == ':') { |
colonoffset = i; |
break; |
} |
/** Find symbols that match the parameter forward and print them. |
* |
* @param name Search string |
* @param startpos Starting position, changes to found position |
* |
* @return Pointer to the part of string that should be completed or NULL. |
* |
*/ |
static const char *symtab_search_one(const char *name, size_t *startpos) |
{ |
size_t namelen = str_length(name); |
size_t pos; |
for (pos = *startpos; symbol_table[pos].address_le; pos++) { |
const char *curname = symbol_table[pos].symbol_name; |
/* Find a ':' in curname */ |
const char *colon = str_chr(curname, ':'); |
if (colon == NULL) |
for (i = *startpos; symbol_table[i].address_le; ++i) { |
/* Find a ':' in name */ |
curname = symbol_table[i].symbol_name; |
for (j = 0; curname[j] && curname[j] != ':'; j++) |
; |
if (!curname[j]) |
continue; |
if (str_length(curname) < namelen) |
j -= colonoffset; |
curname += j; |
if (strlen(curname) < namelen) |
continue; |
if (str_lcmp(name, curname, namelen) == 0) { |
*startpos = pos; |
return (curname + str_lsize(curname, namelen)); |
if (strncmp(curname, name, namelen) == 0) { |
*startpos = i; |
return curname + namelen; |
} |
} |
return NULL; |
} |
#endif |
/** Return address that corresponds to the entry. |
/** Return address that corresponds to the entry |
* |
* Search symbol table, and if there is one match, return it |
* |
* @param name Name of the symbol |
* @param addr Place to store symbol address |
* |
* @return Zero on success, ENOENT - not found, EOVERFLOW - duplicate |
* symbol, ENOTSUP - no symbol information available. |
* |
* @return 0 - Not found, -1 - Duplicate symbol, other - address of symbol |
*/ |
int symtab_addr_lookup(const char *name, uintptr_t *addr) |
uintptr_t get_symbol_addr(const char *name) |
{ |
#ifdef CONFIG_SYMTAB |
size_t found = 0; |
size_t pos = 0; |
const char *hint; |
while ((hint = symtab_search_one(name, &pos))) { |
if (str_length(hint) == 0) { |
*addr = uint64_t_le2host(symbol_table[pos].address_le); |
count_t found = 0; |
uintptr_t addr = NULL; |
char *hint; |
int i; |
i = 0; |
while ((hint = symtab_search_one(name, &i))) { |
if (!strlen(hint)) { |
addr = uint64_t_le2host(symbol_table[i].address_le); |
found++; |
} |
pos++; |
i++; |
} |
if (found > 1) |
return EOVERFLOW; |
if (found < 1) |
return ENOENT; |
return EOK; |
#else |
return ENOTSUP; |
#endif |
return ((uintptr_t) -1); |
return addr; |
} |
/** Find symbols that match parameter and print them */ |
/** Find symbols that match parameter and prints them */ |
void symtab_print_search(const char *name) |
{ |
#ifdef CONFIG_SYMTAB |
size_t pos = 0; |
while (symtab_search_one(name, &pos)) { |
uintptr_t addr = uint64_t_le2host(symbol_table[pos].address_le); |
char *realname = symbol_table[pos].symbol_name; |
int i; |
uintptr_t addr; |
char *realname; |
i = 0; |
while (symtab_search_one(name, &i)) { |
addr = uint64_t_le2host(symbol_table[i].address_le); |
realname = symbol_table[i].symbol_name; |
printf("%p: %s\n", addr, realname); |
pos++; |
i++; |
} |
#else |
printf("No symbol information available.\n"); |
#endif |
} |
/** Symtab completion |
* |
* @param input Search string, completes to symbol name |
* @param size Input buffer size |
* |
* @return 0 - nothing found, 1 - success, >1 print duplicates |
* |
* @param input - Search string, completes to symbol name |
* @returns - 0 - nothing found, 1 - success, >1 print duplicates |
*/ |
int symtab_compl(char *input, size_t size) |
int symtab_compl(char *input) |
{ |
#ifdef CONFIG_SYMTAB |
const char *name = input; |
/* Allow completion of pointers */ |
if ((name[0] == '*') || (name[0] == '&')) |
char output[MAX_SYMBOL_NAME + 1]; |
int startpos = 0; |
char *foundtxt; |
int found = 0; |
int i; |
char *name = input; |
/* Allow completion of pointers */ |
if (name[0] == '*' || name[0] == '&') |
name++; |
/* Do not print all symbols */ |
if (str_length(name) == 0) |
/* Do not print everything */ |
if (!strlen(name)) |
return 0; |
size_t found = 0; |
size_t pos = 0; |
const char *hint; |
char output[MAX_SYMBOL_NAME]; |
output[0] = 0; |
while ((hint = symtab_search_one(name, &pos))) { |
if ((found == 0) || (str_length(output) > str_length(hint))) |
str_cpy(output, MAX_SYMBOL_NAME, hint); |
pos++; |
output[0] = '\0'; |
while ((foundtxt = symtab_search_one(name, &startpos))) { |
startpos++; |
if (!found) |
strncpy(output, foundtxt, strlen(foundtxt) + 1); |
else { |
for (i = 0; output[i] && foundtxt[i] && |
output[i] == foundtxt[i]; i++) |
; |
output[i] = '\0'; |
} |
found++; |
} |
if ((found > 1) && (str_length(output) != 0)) { |
if (!found) |
return 0; |
if (found > 1 && !strlen(output)) { |
printf("\n"); |
pos = 0; |
while ((hint = symtab_search_one(name, &pos))) { |
printf("%s\n", symbol_table[pos].symbol_name); |
pos++; |
startpos = 0; |
while ((foundtxt = symtab_search_one(name, &startpos))) { |
printf("%s\n", symbol_table[startpos].symbol_name); |
startpos++; |
} |
} |
if (found > 0) |
str_cpy(input, size, output); |
strncpy(input, output, MAX_SYMBOL_NAME); |
return found; |
#else |
return 0; |
#endif |
} |
/** @} |
/branches/arm/kernel/generic/src/printf/vprintf.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
39,66 → 39,36 |
#include <arch/asm.h> |
#include <arch/types.h> |
#include <typedefs.h> |
#include <string.h> |
SPINLOCK_INITIALIZE(printf_lock); /**< vprintf spinlock */ |
SPINLOCK_INITIALIZE(printf_lock); /**< vprintf spinlock */ |
static int vprintf_str_write(const char *str, size_t size, void *data) |
static int vprintf_write(const char *str, size_t count, void *unused) |
{ |
size_t offset = 0; |
size_t chars = 0; |
while (offset < size) { |
putchar(str_decode(str, &offset, size)); |
chars++; |
} |
return chars; |
size_t i; |
for (i = 0; i < count; i++) |
putchar(str[i]); |
return i; |
} |
static int vprintf_wstr_write(const wchar_t *str, size_t size, void *data) |
int puts(const char *s) |
{ |
size_t offset = 0; |
size_t chars = 0; |
while (offset < size) { |
putchar(str[chars]); |
chars++; |
offset += sizeof(wchar_t); |
} |
return chars; |
size_t i; |
for (i = 0; s[i] != 0; i++) |
putchar(s[i]); |
return i; |
} |
int puts(const char *str) |
{ |
size_t offset = 0; |
size_t chars = 0; |
wchar_t uc; |
while ((uc = str_decode(str, &offset, STR_NO_LIMIT)) != 0) { |
putchar(uc); |
chars++; |
} |
return chars; |
} |
int vprintf(const char *fmt, va_list ap) |
{ |
printf_spec_t ps = { |
vprintf_str_write, |
vprintf_wstr_write, |
NULL |
}; |
struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL}; |
ipl_t ipl = interrupts_disable(); |
int irqpri = interrupts_disable(); |
spinlock_lock(&printf_lock); |
int ret = printf_core(fmt, &ps, ap); |
spinlock_unlock(&printf_lock); |
interrupts_restore(ipl); |
interrupts_restore(irqpri); |
return ret; |
} |
/branches/arm/kernel/generic/src/printf/printf_core.c |
---|
1,7 → 1,6 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2006 Josef Cejka |
* Copyright (c) 2009 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
28,37 → 27,38 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** |
* @file |
* @brief Printing functions. |
* @brief Printing functions. |
*/ |
#include <printf/printf_core.h> |
#include <putchar.h> |
#include <print.h> |
#include <arch/arg.h> |
#include <macros.h> |
#include <string.h> |
#include <func.h> |
#include <arch.h> |
/** show prefixes 0x or 0 */ |
#define __PRINTF_FLAG_PREFIX 0x00000001 |
#define __PRINTF_FLAG_PREFIX 0x00000001 |
/** signed / unsigned number */ |
#define __PRINTF_FLAG_SIGNED 0x00000002 |
#define __PRINTF_FLAG_SIGNED 0x00000002 |
/** print leading zeroes */ |
#define __PRINTF_FLAG_ZEROPADDED 0x00000004 |
#define __PRINTF_FLAG_ZEROPADDED 0x00000004 |
/** align to left */ |
#define __PRINTF_FLAG_LEFTALIGNED 0x00000010 |
#define __PRINTF_FLAG_LEFTALIGNED 0x00000010 |
/** always show + sign */ |
#define __PRINTF_FLAG_SHOWPLUS 0x00000020 |
#define __PRINTF_FLAG_SHOWPLUS 0x00000020 |
/** print space instead of plus */ |
#define __PRINTF_FLAG_SPACESIGN 0x00000040 |
#define __PRINTF_FLAG_SPACESIGN 0x00000040 |
/** show big characters */ |
#define __PRINTF_FLAG_BIGCHARS 0x00000080 |
#define __PRINTF_FLAG_BIGCHARS 0x00000080 |
/** number has - sign */ |
#define __PRINTF_FLAG_NEGATIVE 0x00000100 |
#define __PRINTF_FLAG_NEGATIVE 0x00000100 |
/** |
* Buffer big enough for 64-bit number printed in base 2, sign, prefix and 0 |
65,7 → 65,7 |
* to terminate string... (last one is only for better testing end of buffer by |
* zero-filling subroutine) |
*/ |
#define PRINT_NUMBER_BUFFER_SIZE (64 + 5) |
#define PRINT_NUMBER_BUFFER_SIZE (64 + 5) |
/** Enumeration of possible arguments types. |
*/ |
78,103 → 78,69 |
PrintfQualifierPointer |
} qualifier_t; |
static char nullstr[] = "(NULL)"; |
static char digits_small[] = "0123456789abcdef"; |
static char digits_big[] = "0123456789ABCDEF"; |
static char invalch = U_SPECIAL; |
/** Print one or more characters without adding newline. |
* |
* @param buf Buffer holding characters with size of |
* at least size bytes. NULL is not allowed! |
* @param size Size of the buffer in bytes. |
* @param ps Output method and its data. |
* |
* @return Number of characters printed. |
* |
* @param buf Buffer with size at least count bytes. NULL pointer is |
* not allowed! |
* @param count Number of characters to print. |
* @param ps Output method and its data. |
* @return Number of characters printed. |
*/ |
static int printf_putnchars(const char *buf, size_t size, |
printf_spec_t *ps) |
static int printf_putnchars(const char * buf, size_t count, |
struct printf_spec *ps) |
{ |
return ps->str_write((void *) buf, size, ps->data); |
return ps->write((void *) buf, count, ps->data); |
} |
/** Print one or more wide characters without adding newline. |
/** Print a string without adding a newline. |
* |
* @param buf Buffer holding wide characters with size of |
* at least size bytes. NULL is not allowed! |
* @param size Size of the buffer in bytes. |
* @param ps Output method and its data. |
* |
* @return Number of wide characters printed. |
* |
* @param str String to print. |
* @param ps Write function specification and support data. |
* @return Number of characters printed. |
*/ |
static int printf_wputnchars(const wchar_t *buf, size_t size, |
printf_spec_t *ps) |
static int printf_putstr(const char * str, struct printf_spec *ps) |
{ |
return ps->wstr_write((void *) buf, size, ps->data); |
} |
size_t count; |
if (str == NULL) { |
char *nullstr = "(NULL)"; |
return printf_putnchars(nullstr, strlen(nullstr), ps); |
} |
/** Print string without adding a newline. |
* |
* @param str String to print. |
* @param ps Write function specification and support data. |
* |
* @return Number of characters printed. |
* |
*/ |
static int printf_putstr(const char *str, printf_spec_t *ps) |
{ |
if (str == NULL) |
return printf_putnchars(nullstr, str_size(nullstr), ps); |
return ps->str_write((void *) str, str_size(str), ps->data); |
count = strlen(str); |
return ps->write((void *) str, count, ps->data); |
} |
/** Print one ASCII character. |
/** Print one character. |
* |
* @param c ASCII character to be printed. |
* @param ps Output method. |
* @param c Character to be printed. |
* @param ps Output method. |
* |
* @return Number of characters printed. |
* |
* @return Number of characters printed. |
*/ |
static int printf_putchar(const char ch, printf_spec_t *ps) |
static int printf_putchar(int c, struct printf_spec *ps) |
{ |
if (!ascii_check(ch)) |
return ps->str_write((void *) &invalch, 1, ps->data); |
unsigned char ch = c; |
return ps->str_write(&ch, 1, ps->data); |
return ps->write((void *) &ch, 1, ps->data); |
} |
/** Print one wide character. |
/** Print one formatted character. |
* |
* @param c Wide character to be printed. |
* @param ps Output method. |
* @param c Character to print. |
* @param width Width modifier. |
* @param flags Flags that change the way the character is printed. |
* |
* @return Number of characters printed. |
* |
* @return Number of characters printed, negative value on failure. |
*/ |
static int printf_putwchar(const wchar_t ch, printf_spec_t *ps) |
static int print_char(char c, int width, uint64_t flags, struct printf_spec *ps) |
{ |
if (!chr_check(ch)) |
return ps->str_write((void *) &invalch, 1, ps->data); |
int counter = 0; |
return ps->wstr_write(&ch, sizeof(wchar_t), ps->data); |
} |
/** Print one formatted ASCII character. |
* |
* @param ch Character to print. |
* @param width Width modifier. |
* @param flags Flags that change the way the character is printed. |
* |
* @return Number of characters printed, negative value on failure. |
* |
*/ |
static int print_char(const char ch, int width, uint32_t flags, printf_spec_t *ps) |
{ |
size_t counter = 0; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (--width > 0) { |
/* |
181,190 → 147,106 |
* One space is consumed by the character itself, hence |
* the predecrement. |
*/ |
if (printf_putchar(' ', ps) > 0) |
counter++; |
if (printf_putchar(' ', ps) > 0) |
++counter; |
} |
} |
if (printf_putchar(ch, ps) > 0) |
if (printf_putchar(c, ps) > 0) |
counter++; |
while (--width > 0) { |
/* |
* One space is consumed by the character itself, hence |
* the predecrement. |
*/ |
if (printf_putchar(' ', ps) > 0) |
counter++; |
} |
return (int) (counter + 1); |
} |
/** Print one formatted wide character. |
* |
* @param ch Character to print. |
* @param width Width modifier. |
* @param flags Flags that change the way the character is printed. |
* |
* @return Number of characters printed, negative value on failure. |
* |
*/ |
static int print_wchar(const wchar_t ch, int width, uint32_t flags, printf_spec_t *ps) |
{ |
size_t counter = 0; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (--width > 0) { |
/* |
* One space is consumed by the character itself, hence |
* the predecrement. |
*/ |
if (printf_putchar(' ', ps) > 0) |
counter++; |
} |
} |
if (printf_putwchar(ch, ps) > 0) |
counter++; |
while (--width > 0) { |
/* |
* One space is consumed by the character itself, hence |
* the predecrement. |
*/ |
if (printf_putchar(' ', ps) > 0) |
counter++; |
++counter; |
} |
return (int) (counter + 1); |
return ++counter; |
} |
/** Print string. |
* |
* @param str String to be printed. |
* @param width Width modifier. |
* @param precision Precision modifier. |
* @param flags Flags that modify the way the string is printed. |
* @param s String to be printed. |
* @param width Width modifier. |
* @param precision Precision modifier. |
* @param flags Flags that modify the way the string is printed. |
* |
* @return Number of characters printed, negative value on failure. |
*/ |
static int print_str(char *str, int width, unsigned int precision, |
uint32_t flags, printf_spec_t *ps) |
* @return Number of characters printed, negative value on failure. |
*/ |
static int print_string(char *s, int width, unsigned int precision, |
uint64_t flags, struct printf_spec *ps) |
{ |
if (str == NULL) |
return printf_putstr(nullstr, ps); |
/* Print leading spaces. */ |
size_t strw = str_length(str); |
if (precision == 0) |
precision = strw; |
/* Left padding */ |
size_t counter = 0; |
width -= precision; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
} |
/* Part of @a str fitting into the alloted space. */ |
int counter = 0; |
size_t size; |
int retval; |
size_t size = str_lsize(str, precision); |
if ((retval = printf_putnchars(str, size, ps)) < 0) |
return -counter; |
counter += retval; |
/* Right padding */ |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
if (s == NULL) { |
return printf_putstr("(NULL)", ps); |
} |
size = strlen(s); |
return ((int) counter); |
/* print leading spaces */ |
} |
if (precision == 0) |
precision = size; |
/** Print wide string. |
* |
* @param str Wide string to be printed. |
* @param width Width modifier. |
* @param precision Precision modifier. |
* @param flags Flags that modify the way the string is printed. |
* |
* @return Number of wide characters printed, negative value on failure. |
*/ |
static int print_wstr(wchar_t *str, int width, unsigned int precision, |
uint32_t flags, printf_spec_t *ps) |
{ |
if (str == NULL) |
return printf_putstr(nullstr, ps); |
width -= precision; |
/* Print leading spaces. */ |
size_t strw = wstr_length(str); |
if (precision == 0) |
precision = strw; |
/* Left padding */ |
size_t counter = 0; |
width -= precision; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
} |
/* Part of @a wstr fitting into the alloted space. */ |
int retval; |
size_t size = wstr_lsize(str, precision); |
if ((retval = printf_wputnchars(str, size, ps)) < 0) |
if ((retval = printf_putnchars(s, min(size, precision), ps)) < 0) { |
return -counter; |
counter += retval; |
/* Right padding */ |
} |
counter += retval; |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
if (printf_putchar(' ', ps) == 1) |
++counter; |
} |
return ((int) counter); |
return counter; |
} |
/** Print a number in a given base. |
* |
* Print significant digits of a number in given base. |
* |
* @param num Number to print. |
* @param width Width modifier. |
* @param precision Precision modifier. |
* @param base Base to print the number in (must be between 2 and 16). |
* @param flags Flags that modify the way the number is printed. |
* @param num Number to print. |
* @param widt Width modifier.h |
* @param precision Precision modifier. |
* @param base Base to print the number in (must be between 2 and 16). |
* @param flags Flags that modify the way the number is printed. |
* |
* @return Number of characters printed. |
* @return Number of characters printed. |
* |
*/ |
static int print_number(uint64_t num, int width, int precision, int base, |
uint32_t flags, printf_spec_t *ps) |
uint64_t flags, struct printf_spec *ps) |
{ |
char *digits; |
if (flags & __PRINTF_FLAG_BIGCHARS) |
digits = digits_big; |
else |
digits = digits_small; |
char *digits = digits_small; |
char d[PRINT_NUMBER_BUFFER_SIZE]; |
char *ptr = &d[PRINT_NUMBER_BUFFER_SIZE - 1]; |
int size = 0; /* size of number with all prefixes and signs */ |
int number_size; /* size of plain number */ |
char sgn; |
int retval; |
int counter = 0; |
char data[PRINT_NUMBER_BUFFER_SIZE]; |
char *ptr = &data[PRINT_NUMBER_BUFFER_SIZE - 1]; |
if (flags & __PRINTF_FLAG_BIGCHARS) |
digits = digits_big; |
/* Size of number with all prefixes and signs */ |
int size = 0; |
/* Put zero at end of string */ |
*ptr-- = 0; |
*ptr-- = 0; /* Put zero at end of string */ |
if (num == 0) { |
*ptr-- = '0'; |
size++; |
375,17 → 257,15 |
} while (num /= base); |
} |
/* Size of plain number */ |
int number_size = size; |
number_size = size; |
/* |
* Collect the sum of all prefixes/signs/etc. to calculate padding and |
* Collect the sum of all prefixes/signs/... to calculate padding and |
* leading zeroes. |
*/ |
if (flags & __PRINTF_FLAG_PREFIX) { |
switch(base) { |
case 2: |
/* Binary formating is not standard, but usefull */ |
case 2: /* Binary formating is not standard, but usefull */ |
size += 2; |
break; |
case 8: |
396,8 → 276,8 |
break; |
} |
} |
char sgn = 0; |
sgn = 0; |
if (flags & __PRINTF_FLAG_SIGNED) { |
if (flags & __PRINTF_FLAG_NEGATIVE) { |
sgn = '-'; |
410,46 → 290,48 |
size++; |
} |
} |
if (flags & __PRINTF_FLAG_LEFTALIGNED) |
if (flags & __PRINTF_FLAG_LEFTALIGNED) { |
flags &= ~__PRINTF_FLAG_ZEROPADDED; |
} |
/* |
* If the number is left-aligned or precision is specified then |
* padding with zeros is ignored. |
* If the number is leftaligned or precision is specified then |
* zeropadding is ignored. |
*/ |
if (flags & __PRINTF_FLAG_ZEROPADDED) { |
if ((precision == 0) && (width > size)) |
if ((precision == 0) && (width > size)) { |
precision = width - size + number_size; |
} |
} |
/* Print leading spaces */ |
/* print leading spaces */ |
if (number_size > precision) { |
/* Print the whole number, not only a part */ |
/* print the whole number not only a part */ |
precision = number_size; |
} |
width -= precision + size - number_size; |
size_t counter = 0; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
} |
/* Print sign */ |
/* print sign */ |
if (sgn) { |
if (printf_putchar(sgn, ps) == 1) |
counter++; |
} |
/* Print prefix */ |
/* print prefix */ |
if (flags & __PRINTF_FLAG_PREFIX) { |
switch(base) { |
case 2: |
/* Binary formating is not standard, but usefull */ |
case 2: /* Binary formating is not standard, but usefull */ |
if (printf_putchar('0', ps) == 1) |
counter++; |
if (flags & __PRINTF_FLAG_BIGCHARS) { |
477,154 → 359,150 |
break; |
} |
} |
/* Print leading zeroes */ |
/* print leading zeroes */ |
precision -= number_size; |
while (precision-- > 0) { |
while (precision-- > 0) { |
if (printf_putchar('0', ps) == 1) |
counter++; |
} |
/* Print the number itself */ |
int retval; |
if ((retval = printf_putstr(++ptr, ps)) > 0) |
/* print number itself */ |
if ((retval = printf_putstr(++ptr, ps)) > 0) { |
counter += retval; |
} |
/* Print tailing spaces */ |
/* print ending spaces */ |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
return ((int) counter); |
return counter; |
} |
/** Print formatted string. |
* |
* Print string formatted according to the fmt parameter and variadic arguments. |
* Each formatting directive must have the following form: |
* |
* \% [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION |
* |
* \% [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION |
* |
* FLAGS:@n |
* - "#" Force to print prefix. For \%o conversion, the prefix is 0, for |
* \%x and \%X prefixes are 0x and 0X and for conversion \%b the |
* prefix is 0b. |
* - "#" Force to print prefix.For \%o conversion, the prefix is 0, for |
* \%x and \%X prefixes are 0x and 0X and for conversion \%b the |
* prefix is 0b. |
* |
* - "-" Align to left. |
* - "-" Align to left. |
* |
* - "+" Print positive sign just as negative. |
* - "+" Print positive sign just as negative. |
* |
* - " " If the printed number is positive and "+" flag is not set, |
* print space in place of sign. |
* - " " If the printed number is positive and "+" flag is not set, |
* print space in place of sign. |
* |
* - "0" Print 0 as padding instead of spaces. Zeroes are placed between |
* sign and the rest of the number. This flag is ignored if "-" |
* flag is specified. |
* |
* - "0" Print 0 as padding instead of spaces. Zeroes are placed between |
* sign and the rest of the number. This flag is ignored if "-" |
* flag is specified. |
* |
* WIDTH:@n |
* - Specify the minimal width of a printed argument. If it is bigger, |
* width is ignored. If width is specified with a "*" character instead of |
* number, width is taken from parameter list. And integer parameter is |
* expected before parameter for processed conversion specification. If |
* this value is negative its absolute value is taken and the "-" flag is |
* set. |
* - Specify the minimal width of a printed argument. If it is bigger, |
* width is ignored. If width is specified with a "*" character instead of |
* number, width is taken from parameter list. And integer parameter is |
* expected before parameter for processed conversion specification. If |
* this value is negative its absolute value is taken and the "-" flag is |
* set. |
* |
* PRECISION:@n |
* - Value precision. For numbers it specifies minimum valid numbers. |
* Smaller numbers are printed with leading zeroes. Bigger numbers are not |
* affected. Strings with more than precision characters are cut off. Just |
* as with width, an "*" can be used used instead of a number. An integer |
* value is then expected in parameters. When both width and precision are |
* specified using "*", the first parameter is used for width and the |
* second one for precision. |
* |
* - Value precision. For numbers it specifies minimum valid numbers. |
* Smaller numbers are printed with leading zeroes. Bigger numbers are not |
* affected. Strings with more than precision characters are cut off. Just |
* as with width, an "*" can be used used instead of a number. An integer |
* value is then expected in parameters. When both width and precision are |
* specified using "*", the first parameter is used for width and the |
* second one for precision. |
* |
* TYPE:@n |
* - "hh" Signed or unsigned char.@n |
* - "h" Signed or unsigned short.@n |
* - "" Signed or unsigned int (default value).@n |
* - "l" Signed or unsigned long int.@n |
* If conversion is "c", the character is wchar_t (wide character).@n |
* If conversion is "s", the string is wchar_t * (wide string).@n |
* - "ll" Signed or unsigned long long int.@n |
* |
* - "hh" Signed or unsigned char.@n |
* - "h" Signed or unsigned short.@n |
* - "" Signed or unsigned int (default value).@n |
* - "l" Signed or unsigned long int.@n |
* - "ll" Signed or unsigned long long int.@n |
* |
* |
* CONVERSION:@n |
* - % Print percentile character itself. |
* - % Print percentile character itself. |
* |
* - c Print single character. The character is expected to be plain |
* ASCII (e.g. only values 0 .. 127 are valid).@n |
* If type is "l", then the character is expected to be wide character |
* (e.g. values 0 .. 0x10ffff are valid). |
* - c Print single character. |
* |
* - s Print zero terminated string. If a NULL value is passed as |
* value, "(NULL)" is printed instead.@n |
* If type is "l", then the string is expected to be wide string. |
* - s Print zero terminated string. If a NULL value is passed as |
* value, "(NULL)" is printed instead. |
* |
* - P, p Print value of a pointer. Void * value is expected and it is |
* printed in hexadecimal notation with prefix (as with \%#X / \%#x |
* for 32-bit or \%#X / \%#x for 64-bit long pointers). |
* |
* - P, p Print value of a pointer. Void * value is expected and it is |
* printed in hexadecimal notation with prefix (as with \%#X / \%#x |
* for 32-bit or \%#X / \%#x for 64-bit long pointers). |
* - b Print value as unsigned binary number. Prefix is not printed by |
* default. (Nonstandard extension.) |
* |
* - o Print value as unsigned octal number. Prefix is not printed by |
* default. |
* |
* - b Print value as unsigned binary number. Prefix is not printed by |
* default. (Nonstandard extension.) |
* - d, i Print signed decimal number. There is no difference between d |
* and i conversion. |
* |
* - o Print value as unsigned octal number. Prefix is not printed by |
* default. |
* - u Print unsigned decimal number. |
* |
* - d, i Print signed decimal number. There is no difference between d |
* and i conversion. |
* |
* - u Print unsigned decimal number. |
* |
* - X, x Print hexadecimal number with upper- or lower-case. Prefix is |
* not printed by default. |
* |
* All other characters from fmt except the formatting directives are printed |
* - X, x Print hexadecimal number with upper- or lower-case. Prefix is |
* not printed by default. |
* |
* All other characters from fmt except the formatting directives are printed in |
* verbatim. |
* |
* @param fmt Format NULL-terminated string. |
* |
* @return Number of characters printed, negative value on failure. |
* |
* @param fmt Formatting NULL terminated string. |
* @return Number of characters printed, negative value on failure. |
*/ |
int printf_core(const char *fmt, printf_spec_t *ps, va_list ap) |
int printf_core(const char *fmt, struct printf_spec *ps, va_list ap) |
{ |
size_t i; /* Index of the currently processed character from fmt */ |
size_t nxt = 0; /* Index of the next character from fmt */ |
size_t j = 0; /* Index to the first not printed nonformating character */ |
int i = 0; /* index of the currently processed char from fmt */ |
int j = 0; /* index to the first not printed nonformating character */ |
int end; |
int counter; /* counter of printed characters */ |
int retval; /* used to store return values from called functions */ |
char c; |
qualifier_t qualifier; /* type of argument */ |
int base; /* base in which a numeric parameter will be printed */ |
uint64_t number; /* argument value */ |
size_t size; /* byte size of integer parameter */ |
int width, precision; |
uint64_t flags; |
size_t counter = 0; /* Number of characters printed */ |
int retval; /* Return values from nested functions */ |
while (true) { |
i = nxt; |
wchar_t uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
counter = 0; |
if (uc == 0) |
break; |
/* Control character */ |
if (uc == '%') { |
/* Print common characters if any processed */ |
while ((c = fmt[i])) { |
/* control character */ |
if (c == '%') { |
/* print common characters if any processed */ |
if (i > j) { |
if ((retval = printf_putnchars(&fmt[j], i - j, ps)) < 0) { |
/* Error */ |
if ((retval = printf_putnchars(&fmt[j], |
(size_t)(i - j), ps)) < 0) { /* error */ |
counter = -counter; |
goto out; |
} |
counter += retval; |
} |
j = i; |
/* parse modifiers */ |
flags = 0; |
end = 0; |
/* Parse modifiers */ |
uint32_t flags = 0; |
bool end = false; |
do { |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
switch (uc) { |
++i; |
switch (c = fmt[i]) { |
case '#': |
flags |= __PRINTF_FLAG_PREFIX; |
break; |
641,145 → 519,116 |
flags |= __PRINTF_FLAG_ZEROPADDED; |
break; |
default: |
end = true; |
}; |
} while (!end); |
end = 1; |
}; |
} while (end == 0); |
/* Width & '*' operator */ |
int width = 0; |
if (isdigit(uc)) { |
while (true) { |
/* width & '*' operator */ |
width = 0; |
if (isdigit(fmt[i])) { |
while (isdigit(fmt[i])) { |
width *= 10; |
width += uc - '0'; |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 0) |
break; |
if (!isdigit(uc)) |
break; |
width += fmt[i++] - '0'; |
} |
} else if (uc == '*') { |
/* Get width value from argument list */ |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
} else if (fmt[i] == '*') { |
/* get width value from argument list */ |
i++; |
width = (int) va_arg(ap, int); |
if (width < 0) { |
/* Negative width sets '-' flag */ |
/* negative width sets '-' flag */ |
width *= -1; |
flags |= __PRINTF_FLAG_LEFTALIGNED; |
} |
} |
/* Precision and '*' operator */ |
int precision = 0; |
if (uc == '.') { |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (isdigit(uc)) { |
while (true) { |
/* precision and '*' operator */ |
precision = 0; |
if (fmt[i] == '.') { |
++i; |
if (isdigit(fmt[i])) { |
while (isdigit(fmt[i])) { |
precision *= 10; |
precision += uc - '0'; |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 0) |
break; |
if (!isdigit(uc)) |
break; |
precision += fmt[i++] - '0'; |
} |
} else if (uc == '*') { |
/* Get precision value from the argument list */ |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
} else if (fmt[i] == '*') { |
/* |
* Get precision value from the argument |
* list. |
*/ |
i++; |
precision = (int) va_arg(ap, int); |
if (precision < 0) { |
/* Ignore negative precision */ |
/* ignore negative precision */ |
precision = 0; |
} |
} |
} |
qualifier_t qualifier; |
switch (uc) { |
/** @todo Unimplemented qualifiers: |
* t ptrdiff_t - ISO C 99 |
switch (fmt[i++]) { |
/** @todo unimplemented qualifiers: |
* t ptrdiff_t - ISO C 99 |
*/ |
case 'h': |
/* Char or short */ |
case 'h': /* char or short */ |
qualifier = PrintfQualifierShort; |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 'h') { |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (fmt[i] == 'h') { |
i++; |
qualifier = PrintfQualifierByte; |
} |
break; |
case 'l': |
/* Long or long long */ |
case 'l': /* long or long long*/ |
qualifier = PrintfQualifierLong; |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 'l') { |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (fmt[i] == 'l') { |
i++; |
qualifier = PrintfQualifierLongLong; |
} |
break; |
default: |
/* Default type */ |
qualifier = PrintfQualifierInt; |
} |
/* default type */ |
qualifier = PrintfQualifierInt; |
--i; |
} |
unsigned int base = 10; |
switch (uc) { |
base = 10; |
switch (c = fmt[i]) { |
/* |
* String and character conversions. |
*/ |
* String and character conversions. |
*/ |
case 's': |
if (qualifier == PrintfQualifierLong) |
retval = print_wstr(va_arg(ap, wchar_t *), width, precision, flags, ps); |
else |
retval = print_str(va_arg(ap, char *), width, precision, flags, ps); |
if (retval < 0) { |
if ((retval = print_string(va_arg(ap, char *), |
width, precision, flags, ps)) < 0) { |
counter = -counter; |
goto out; |
} |
}; |
counter += retval; |
j = nxt; |
j = i + 1; |
goto next_char; |
case 'c': |
if (qualifier == PrintfQualifierLong) |
retval = print_wchar(va_arg(ap, wchar_t), width, flags, ps); |
else |
retval = print_char(va_arg(ap, unsigned int), width, flags, ps); |
c = va_arg(ap, unsigned int); |
retval = print_char(c, width, flags, ps); |
if (retval < 0) { |
counter = -counter; |
goto out; |
}; |
counter += retval; |
j = nxt; |
j = i + 1; |
goto next_char; |
/* |
/* |
* Integer values |
*/ |
case 'P': |
/* Pointer */ |
case 'P': /* pointer */ |
flags |= __PRINTF_FLAG_BIGCHARS; |
case 'p': |
flags |= __PRINTF_FLAG_PREFIX; |
base = 16; |
qualifier = PrintfQualifierPointer; |
break; |
case 'b': |
break; |
case 'b': |
base = 2; |
break; |
case 'o': |
787,7 → 636,7 |
break; |
case 'd': |
case 'i': |
flags |= __PRINTF_FLAG_SIGNED; |
flags |= __PRINTF_FLAG_SIGNED; |
case 'u': |
break; |
case 'X': |
795,12 → 644,10 |
case 'x': |
base = 16; |
break; |
/* Percentile itself */ |
case '%': |
/* percentile itself */ |
case '%': |
j = i; |
goto next_char; |
/* |
* Bad formatting. |
*/ |
809,12 → 656,12 |
* Unknown format. Now, j is the index of '%' |
* so we will print whole bad format sequence. |
*/ |
goto next_char; |
goto next_char; |
} |
/* Print integers */ |
size_t size; |
uint64_t number; |
/* Print integers */ |
/* print number */ |
switch (qualifier) { |
case PrintfQualifierByte: |
size = sizeof(unsigned char); |
840,8 → 687,7 |
size = sizeof(void *); |
number = (uint64_t) (unsigned long) va_arg(ap, void *); |
break; |
default: |
/* Unknown qualifier */ |
default: /* Unknown qualifier */ |
counter = -counter; |
goto out; |
} |
849,7 → 695,7 |
if (flags & __PRINTF_FLAG_SIGNED) { |
if (number & (0x1 << (size * 8 - 1))) { |
flags |= __PRINTF_FLAG_NEGATIVE; |
if (size == sizeof(uint64_t)) { |
number = -((int64_t) number); |
} else { |
861,31 → 707,33 |
} |
} |
} |
if ((retval = print_number(number, width, precision, |
base, flags, ps)) < 0) { |
counter = -counter; |
goto out; |
} |
counter += retval; |
j = nxt; |
} |
j = i + 1; |
} |
next_char: |
; |
++i; |
} |
if (i > j) { |
if ((retval = printf_putnchars(&fmt[j], i - j, ps)) < 0) { |
/* Error */ |
if ((retval = printf_putnchars(&fmt[j], (unative_t) (i - j), |
ps)) < 0) { /* error */ |
counter = -counter; |
goto out; |
} |
counter += retval; |
} |
out: |
return ((int) counter); |
return counter; |
} |
/** @} |
/branches/arm/kernel/generic/src/printf/printf.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
33,18 → 33,19 |
*/ |
#include <print.h> |
int printf(const char *fmt, ...); |
int printf(const char *fmt, ...) |
{ |
int ret; |
va_list args; |
va_start(args, fmt); |
ret = vprintf(fmt, args); |
va_end(args); |
return ret; |
} |
/branches/arm/kernel/generic/src/printf/snprintf.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
42,9 → 42,9 |
va_start(args, fmt); |
ret = vsnprintf(str, size, fmt, args); |
va_end(args); |
return ret; |
} |
/branches/arm/kernel/generic/src/printf/vsnprintf.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
34,146 → 34,62 |
#include <print.h> |
#include <printf/printf_core.h> |
#include <string.h> |
#include <memstr.h> |
#include <errno.h> |
typedef struct { |
size_t size; /* Total size of the buffer (in bytes) */ |
size_t len; /* Number of already used bytes */ |
char *dst; /* Destination */ |
} vsnprintf_data_t; |
struct vsnprintf_data { |
size_t size; /* total space for string */ |
size_t len; /* count of currently used characters */ |
char *string; /* destination string */ |
}; |
/** Write string to given buffer. |
* |
* Write at most data->size plain characters including trailing zero. |
* According to C99, snprintf() has to return number of characters that |
* would have been written if enough space had been available. Hence |
* the return value is not the number of actually printed characters |
* but size of the input string. |
* |
* @param str Source string to print. |
* @param size Number of plain characters in str. |
* @param data Structure describing destination string, counter |
* of used space and total string size. |
* |
* @return Number of characters to print (not characters actually |
* printed). |
* |
* Write at most data->size characters including trailing zero. According to C99, snprintf() has to return number |
* of characters that would have been written if enough space had been available. Hence the return value is not |
* number of really printed characters but size of the input string. Number of really used characters |
* is stored in data->len. |
* @param str source string to print |
* @param count size of source string |
* @param data structure with destination string, counter of used space and total string size. |
* @return number of characters to print (not characters really printed!) |
*/ |
static int vsnprintf_str_write(const char *str, size_t size, vsnprintf_data_t *data) |
static int vsnprintf_write(const char *str, size_t count, struct vsnprintf_data *data) |
{ |
size_t left = data->size - data->len; |
size_t i; |
i = data->size - data->len; |
if (i == 0) { |
return count; |
} |
if (left == 0) |
return ((int) size); |
if (left == 1) { |
/* We have only one free byte left in buffer |
* -> store trailing zero |
*/ |
data->dst[data->size - 1] = 0; |
if (i == 1) { |
/* We have only one free byte left in buffer => write there trailing zero */ |
data->string[data->size - 1] = 0; |
data->len = data->size; |
return ((int) size); |
return count; |
} |
if (left <= size) { |
/* We do not have enough space for the whole string |
* with the trailing zero => print only a part |
* of string |
*/ |
size_t index = 0; |
while (index < size) { |
wchar_t uc = str_decode(str, &index, size); |
if (chr_encode(uc, data->dst, &data->len, data->size - 1) != EOK) |
break; |
} |
/* Put trailing zero at end, but not count it |
* into data->len so it could be rewritten next time |
*/ |
data->dst[data->len] = 0; |
return ((int) size); |
if (i <= count) { |
/* We have not enought space for whole string with the trailing zero => print only a part of string */ |
memcpy((void *)(data->string + data->len), (void *)str, i - 1); |
data->string[data->size - 1] = 0; |
data->len = data->size; |
return count; |
} |
/* Buffer is big enought to print the whole string */ |
memcpy((void *)(data->dst + data->len), (void *) str, size); |
data->len += size; |
/* Put trailing zero at end, but not count it |
* into data->len so it could be rewritten next time |
*/ |
data->dst[data->len] = 0; |
return ((int) size); |
} |
/* Buffer is big enought to print whole string */ |
memcpy((void *)(data->string + data->len), (void *)str, count); |
data->len += count; |
/* Put trailing zero at end, but not count it into data->len so it could be rewritten next time */ |
data->string[data->len] = 0; |
/** Write wide string to given buffer. |
* |
* Write at most data->size plain characters including trailing zero. |
* According to C99, snprintf() has to return number of characters that |
* would have been written if enough space had been available. Hence |
* the return value is not the number of actually printed characters |
* but size of the input string. |
* |
* @param str Source wide string to print. |
* @param size Number of bytes in str. |
* @param data Structure describing destination string, counter |
* of used space and total string size. |
* |
* @return Number of wide characters to print (not characters actually |
* printed). |
* |
*/ |
static int vsnprintf_wstr_write(const wchar_t *str, size_t size, vsnprintf_data_t *data) |
{ |
size_t index = 0; |
while (index < (size / sizeof(wchar_t))) { |
size_t left = data->size - data->len; |
if (left == 0) |
return ((int) size); |
if (left == 1) { |
/* We have only one free byte left in buffer |
* -> store trailing zero |
*/ |
data->dst[data->size - 1] = 0; |
data->len = data->size; |
return ((int) size); |
} |
if (chr_encode(str[index], data->dst, &data->len, data->size - 1) != EOK) |
break; |
index++; |
} |
/* Put trailing zero at end, but not count it |
* into data->len so it could be rewritten next time |
*/ |
data->dst[data->len] = 0; |
return ((int) size); |
return count; |
} |
int vsnprintf(char *str, size_t size, const char *fmt, va_list ap) |
{ |
vsnprintf_data_t data = { |
size, |
0, |
str |
}; |
printf_spec_t ps = { |
(int(*) (const char *, size_t, void *)) vsnprintf_str_write, |
(int(*) (const wchar_t *, size_t, void *)) vsnprintf_wstr_write, |
&data |
}; |
struct vsnprintf_data data = {size, 0, str}; |
struct printf_spec ps = {(int(*)(void *, size_t, void *))vsnprintf_write, &data}; |
/* Print 0 at end of string - fix the case that nothing will be printed */ |
if (size > 0) |
str[0] = 0; |
/branches/arm/kernel/generic/src/printf/vsprintf.c |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
*/ |
#include <print.h> |
int vsprintf(char *str, const char *fmt, va_list ap) |
{ |
return vsnprintf(str, (size_t) - 1, fmt, ap); |
} |
/** @} |
*/ |
/branches/arm/kernel/generic/src/printf/sprintf.c |
---|
0,0 → 1,51 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
*/ |
#include <print.h> |
int sprintf(char *str, const char *fmt, ...) |
{ |
int ret; |
va_list args; |
va_start(args, fmt); |
ret = vsprintf(str, fmt, args); |
va_end(args); |
return ret; |
} |
/** @} |
*/ |
/branches/arm/kernel/generic/src/interrupt/interrupt.c |
---|
42,6 → 42,7 |
#include <debug.h> |
#include <console/kconsole.h> |
#include <console/console.h> |
#include <console/chardev.h> |
#include <console/cmd.h> |
#include <panic.h> |
#include <print.h> |
67,13 → 68,13 |
iroutine old; |
spinlock_lock(&exctbl_lock); |
old = exc_table[n].f; |
exc_table[n].f = f; |
exc_table[n].name = name; |
spinlock_unlock(&exctbl_lock); |
spinlock_unlock(&exctbl_lock); |
return old; |
} |
85,17 → 86,8 |
void exc_dispatch(int n, istate_t *istate) |
{ |
ASSERT(n < IVT_ITEMS); |
#ifdef CONFIG_UDEBUG |
if (THREAD) THREAD->udebug.uspace_state = istate; |
#endif |
exc_table[n].f(n + IVT_FIRST, istate); |
#ifdef CONFIG_UDEBUG |
if (THREAD) THREAD->udebug.uspace_state = NULL; |
#endif |
/* This is a safe place to exit exiting thread */ |
if (THREAD && THREAD->interrupted && istate_from_uspace(istate)) |
thread_exit(); |
108,10 → 100,8 |
panic("Unhandled exception %d.", n); |
} |
#ifdef CONFIG_KCONSOLE |
/** kconsole cmd - print all exceptions */ |
static int cmd_exc_print(cmd_arg_t *argv) |
static int exc_print_cmd(cmd_arg_t *argv) |
{ |
#if (IVT_ITEMS > 0) |
unsigned int i; |
130,7 → 120,9 |
#endif |
for (i = 0; i < IVT_ITEMS; i++) { |
symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f); |
symbol = get_symtab_entry((unative_t) exc_table[i].f); |
if (!symbol) |
symbol = "not found"; |
#ifdef __32_BITS__ |
printf("%-3u %-20s %10p %s\n", i + IVT_FIRST, exc_table[i].name, |
145,7 → 137,7 |
if (((i + 1) % 20) == 0) { |
printf(" -- Press any key to continue -- "); |
spinlock_unlock(&exctbl_lock); |
indev_pop_character(stdin); |
getc(stdin); |
spinlock_lock(&exctbl_lock); |
printf("\n"); |
} |
157,18 → 149,15 |
return 1; |
} |
static cmd_info_t exc_info = { |
.name = "exc", |
.description = "Print exception table.", |
.func = cmd_exc_print, |
.func = exc_print_cmd, |
.help = NULL, |
.argc = 0, |
.argv = NULL |
}; |
#endif |
/** Initialize generic exception handling support */ |
void exc_init(void) |
{ |
177,11 → 166,9 |
for (i = 0; i < IVT_ITEMS; i++) |
exc_register(i, "undef", (iroutine) exc_undef); |
#ifdef CONFIG_KCONSOLE |
cmd_initialize(&exc_info); |
if (!cmd_register(&exc_info)) |
printf("Cannot register command %s\n", exc_info.name); |
#endif |
panic("could not register command %s\n", exc_info.name); |
} |
/** @} |
/branches/arm/kernel/generic/src/time/timeout.c |
---|
113,7 → 113,7 |
spinlock_lock(&t->lock); |
if (t->cpu) |
panic("Unexpected: t->cpu != 0."); |
panic("t->cpu != 0"); |
t->cpu = CPU; |
t->ticks = us2ticks(time); |
/branches/arm/kernel/generic/src/time/clock.c |
---|
79,7 → 79,7 |
faddr = frame_alloc(ONE_FRAME, FRAME_ATOMIC); |
if (!faddr) |
panic("Cannot allocate page for clock."); |
panic("Cannot allocate page for clock"); |
uptime = (uptime_t *) PA2KA(faddr); |
88,7 → 88,9 |
uptime->useconds = 0; |
clock_parea.pbase = (uintptr_t) faddr; |
clock_parea.vbase = (uintptr_t) uptime; |
clock_parea.frames = 1; |
clock_parea.cacheable = true; |
ddi_parea_register(&clock_parea); |
/* |
134,7 → 136,7 |
timeout_t *h; |
timeout_handler_t f; |
void *arg; |
size_t missed_clock_ticks = CPU->missed_clock_ticks; |
count_t missed_clock_ticks = CPU->missed_clock_ticks; |
unsigned int i; |
/* |
187,19 → 189,7 |
spinlock_unlock(&THREAD->lock); |
if (!ticks && !PREEMPTION_DISABLED) { |
#ifdef CONFIG_UDEBUG |
istate_t *istate; |
#endif |
scheduler(); |
#ifdef CONFIG_UDEBUG |
/* |
* Give udebug chance to stop the thread |
* before it begins executing userspace code. |
*/ |
istate = THREAD->udebug.uspace_state; |
if (istate && istate_from_uspace(istate)) |
udebug_before_thread_runs(); |
#endif |
} |
} |
/branches/arm/kernel/generic/src/ddi/irq.c |
---|
39,8 → 39,7 |
* |
* This code is designed to support: |
* - multiple devices sharing single IRQ |
* - multiple IRQs per single device |
* - multiple instances of the same device |
* - multiple IRQs per signle device |
* |
* |
* Note about architectures. |
69,11 → 68,8 |
#include <ddi/irq.h> |
#include <adt/hash_table.h> |
#include <mm/slab.h> |
#include <arch/types.h> |
#include <synch/spinlock.h> |
#include <console/console.h> |
#include <memstr.h> |
#include <arch.h> |
#define KEY_INR 0 |
80,33 → 76,23 |
#define KEY_DEVNO 1 |
/** |
* Spinlock protecting the kernel IRQ hash table. |
* Spinlock protecting the hash table. |
* This lock must be taken only when interrupts are disabled. |
*/ |
SPINLOCK_INITIALIZE(irq_kernel_hash_table_lock); |
/** The kernel IRQ hash table. */ |
static hash_table_t irq_kernel_hash_table; |
SPINLOCK_INITIALIZE(irq_hash_table_lock); |
static hash_table_t irq_hash_table; |
/** |
* Spinlock protecting the uspace IRQ hash table. |
* This lock must be taken only when interrupts are disabled. |
*/ |
SPINLOCK_INITIALIZE(irq_uspace_hash_table_lock); |
/** The uspace IRQ hash table. */ |
hash_table_t irq_uspace_hash_table; |
/** |
* Hash table operations for cases when we know that |
* there will be collisions between different keys. |
*/ |
static size_t irq_ht_hash(unative_t *key); |
static bool irq_ht_compare(unative_t *key, size_t keys, link_t *item); |
static void irq_ht_remove(link_t *item); |
static index_t irq_ht_hash(unative_t *key); |
static bool irq_ht_compare(unative_t *key, count_t keys, link_t *item); |
static hash_table_operations_t irq_ht_ops = { |
.hash = irq_ht_hash, |
.compare = irq_ht_compare, |
.remove_callback = irq_ht_remove, |
.remove_callback = NULL /* not used */ |
}; |
/** |
115,27 → 101,22 |
* However, there might be still collisions among |
* elements with single key (sharing of one IRQ). |
*/ |
static size_t irq_lin_hash(unative_t *key); |
static bool irq_lin_compare(unative_t *key, size_t keys, link_t *item); |
static void irq_lin_remove(link_t *item); |
static index_t irq_lin_hash(unative_t *key); |
static bool irq_lin_compare(unative_t *key, count_t keys, link_t *item); |
static hash_table_operations_t irq_lin_ops = { |
.hash = irq_lin_hash, |
.compare = irq_lin_compare, |
.remove_callback = irq_lin_remove, |
.remove_callback = NULL /* not used */ |
}; |
/** Number of buckets in either of the hash tables. */ |
static size_t buckets; |
/** Initialize IRQ subsystem. |
* |
* @param inrs Numbers of unique IRQ numbers or INRs. |
* @param chains Number of chains in the hash table. |
*/ |
void irq_init(size_t inrs, size_t chains) |
void irq_init(count_t inrs, count_t chains) |
{ |
buckets = chains; |
/* |
* Be smart about the choice of the hash table operations. |
* In cases in which inrs equals the requested number of |
142,17 → 123,10 |
* chains (i.e. where there is no collision between |
* different keys), we can use optimized set of operations. |
*/ |
if (inrs == chains) { |
hash_table_create(&irq_uspace_hash_table, chains, 2, |
&irq_lin_ops); |
hash_table_create(&irq_kernel_hash_table, chains, 2, |
&irq_lin_ops); |
} else { |
hash_table_create(&irq_uspace_hash_table, chains, 2, |
&irq_ht_ops); |
hash_table_create(&irq_kernel_hash_table, chains, 2, |
&irq_ht_ops); |
} |
if (inrs == chains) |
hash_table_create(&irq_hash_table, chains, 2, &irq_lin_ops); |
else |
hash_table_create(&irq_hash_table, chains, 2, &irq_ht_ops); |
} |
/** Initialize one IRQ structure. |
162,12 → 136,21 |
*/ |
void irq_initialize(irq_t *irq) |
{ |
memsetb(irq, sizeof(irq_t), 0); |
link_initialize(&irq->link); |
spinlock_initialize(&irq->lock, "irq.lock"); |
link_initialize(&irq->notif_cfg.link); |
irq->preack = false; |
irq->inr = -1; |
irq->devno = -1; |
irq->trigger = (irq_trigger_t) 0; |
irq->claim = NULL; |
irq->handler = NULL; |
irq->arg = NULL; |
irq->notif_cfg.notify = false; |
irq->notif_cfg.answerbox = NULL; |
irq->notif_cfg.code = NULL; |
irq->notif_cfg.method = 0; |
irq->notif_cfg.counter = 0; |
link_initialize(&irq->notif_cfg.link); |
} |
/** Register IRQ for device. |
174,10 → 157,9 |
* |
* The irq structure must be filled with information |
* about the interrupt source and with the claim() |
* function pointer and handler() function pointer. |
* function pointer and irq_handler() function pointer. |
* |
* @param irq IRQ structure belonging to a device. |
* @return True on success, false on failure. |
* @param irq IRQ structure belonging to a device. |
*/ |
void irq_register(irq_t *irq) |
{ |
188,101 → 170,88 |
}; |
ipl = interrupts_disable(); |
spinlock_lock(&irq_kernel_hash_table_lock); |
spinlock_lock(&irq->lock); |
hash_table_insert(&irq_kernel_hash_table, key, &irq->link); |
spinlock_unlock(&irq->lock); |
spinlock_unlock(&irq_kernel_hash_table_lock); |
spinlock_lock(&irq_hash_table_lock); |
hash_table_insert(&irq_hash_table, key, &irq->link); |
spinlock_unlock(&irq_hash_table_lock); |
interrupts_restore(ipl); |
} |
/** Search and lock the uspace IRQ hash table. |
/** Dispatch the IRQ. |
* |
* We assume this function is only called from interrupt |
* context (i.e. that interrupts are disabled prior to |
* this call). |
* |
* This function attempts to lookup a fitting IRQ |
* structure. In case of success, return with interrupts |
* disabled and holding the respective structure. |
* |
* @param inr Interrupt number (aka inr or irq). |
* |
* @return IRQ structure of the respective device or NULL. |
*/ |
static irq_t *irq_dispatch_and_lock_uspace(inr_t inr) |
irq_t *irq_dispatch_and_lock(inr_t inr) |
{ |
link_t *lnk; |
unative_t key[] = { |
(unative_t) inr, |
(unative_t) -1 /* search will use claim() instead of devno */ |
(unative_t) -1 /* search will use claim() instead of devno */ |
}; |
spinlock_lock(&irq_uspace_hash_table_lock); |
lnk = hash_table_find(&irq_uspace_hash_table, key); |
spinlock_lock(&irq_hash_table_lock); |
lnk = hash_table_find(&irq_hash_table, key); |
if (lnk) { |
irq_t *irq; |
irq = hash_table_get_instance(lnk, irq_t, link); |
spinlock_unlock(&irq_uspace_hash_table_lock); |
spinlock_unlock(&irq_hash_table_lock); |
return irq; |
} |
spinlock_unlock(&irq_uspace_hash_table_lock); |
return NULL; |
spinlock_unlock(&irq_hash_table_lock); |
return NULL; |
} |
/** Search and lock the kernel IRQ hash table. |
/** Find the IRQ structure corresponding to inr and devno. |
* |
* This functions attempts to lookup the IRQ structure |
* corresponding to its arguments. On success, this |
* function returns with interrups disabled, holding |
* the lock of the respective IRQ structure. |
* |
* This function assumes interrupts are already disabled. |
* |
* @param inr INR being looked up. |
* @param devno Devno being looked up. |
* |
* @return Locked IRQ structure on success or NULL on failure. |
*/ |
static irq_t *irq_dispatch_and_lock_kernel(inr_t inr) |
irq_t *irq_find_and_lock(inr_t inr, devno_t devno) |
{ |
link_t *lnk; |
unative_t key[] = { |
unative_t keys[] = { |
(unative_t) inr, |
(unative_t) -1 /* search will use claim() instead of devno */ |
(unative_t) devno |
}; |
spinlock_lock(&irq_kernel_hash_table_lock); |
lnk = hash_table_find(&irq_kernel_hash_table, key); |
spinlock_lock(&irq_hash_table_lock); |
lnk = hash_table_find(&irq_hash_table, keys); |
if (lnk) { |
irq_t *irq; |
irq = hash_table_get_instance(lnk, irq_t, link); |
spinlock_unlock(&irq_kernel_hash_table_lock); |
spinlock_unlock(&irq_hash_table_lock); |
return irq; |
} |
spinlock_unlock(&irq_kernel_hash_table_lock); |
return NULL; |
} |
spinlock_unlock(&irq_hash_table_lock); |
/** Dispatch the IRQ. |
* |
* We assume this function is only called from interrupt |
* context (i.e. that interrupts are disabled prior to |
* this call). |
* |
* This function attempts to lookup a fitting IRQ |
* structure. In case of success, return with interrupts |
* disabled and holding the respective structure. |
* |
* @param inr Interrupt number (aka inr or irq). |
* |
* @return IRQ structure of the respective device or NULL. |
*/ |
irq_t *irq_dispatch_and_lock(inr_t inr) |
{ |
irq_t *irq; |
/* |
* If the kernel console is silenced, |
* then try first the uspace handlers, |
* eventually fall back to kernel handlers. |
* |
* If the kernel console is active, |
* then do it the other way around. |
*/ |
if (silent) { |
irq = irq_dispatch_and_lock_uspace(inr); |
if (irq) |
return irq; |
return irq_dispatch_and_lock_kernel(inr); |
} |
irq = irq_dispatch_and_lock_kernel(inr); |
if (irq) |
return irq; |
return irq_dispatch_and_lock_uspace(inr); |
return NULL; |
} |
/** Compute hash index for the key. |
298,10 → 267,10 |
* |
* @return Index into the hash table. |
*/ |
size_t irq_ht_hash(unative_t key[]) |
index_t irq_ht_hash(unative_t key[]) |
{ |
inr_t inr = (inr_t) key[KEY_INR]; |
return inr % buckets; |
return inr % irq_hash_table.entries; |
} |
/** Compare hash table element with a key. |
324,7 → 293,7 |
* |
* @return True on match or false otherwise. |
*/ |
bool irq_ht_compare(unative_t key[], size_t keys, link_t *item) |
bool irq_ht_compare(unative_t key[], count_t keys, link_t *item) |
{ |
irq_t *irq = hash_table_get_instance(item, irq_t, link); |
inr_t inr = (inr_t) key[KEY_INR]; |
335,8 → 304,7 |
spinlock_lock(&irq->lock); |
if (devno == -1) { |
/* Invoked by irq_dispatch_and_lock(). */ |
rv = ((irq->inr == inr) && |
(irq->claim(irq) == IRQ_ACCEPT)); |
rv = ((irq->inr == inr) && (irq->claim() == IRQ_ACCEPT)); |
} else { |
/* Invoked by irq_find_and_lock(). */ |
rv = ((irq->inr == inr) && (irq->devno == devno)); |
349,17 → 317,6 |
return rv; |
} |
/** Unlock IRQ structure after hash_table_remove(). |
* |
* @param lnk Link in the removed and locked IRQ structure. |
*/ |
void irq_ht_remove(link_t *lnk) |
{ |
irq_t *irq __attribute__((unused)) |
= hash_table_get_instance(lnk, irq_t, link); |
spinlock_unlock(&irq->lock); |
} |
/** Compute hash index for the key. |
* |
* This function computes hash index into |
371,7 → 328,7 |
* |
* @return Index into the hash table. |
*/ |
size_t irq_lin_hash(unative_t key[]) |
index_t irq_lin_hash(unative_t key[]) |
{ |
inr_t inr = (inr_t) key[KEY_INR]; |
return inr; |
397,7 → 354,7 |
* |
* @return True on match or false otherwise. |
*/ |
bool irq_lin_compare(unative_t key[], size_t keys, link_t *item) |
bool irq_lin_compare(unative_t key[], count_t keys, link_t *item) |
{ |
irq_t *irq = list_get_instance(item, irq_t, link); |
devno_t devno = (devno_t) key[KEY_DEVNO]; |
406,7 → 363,7 |
spinlock_lock(&irq->lock); |
if (devno == -1) { |
/* Invoked by irq_dispatch_and_lock() */ |
rv = (irq->claim(irq) == IRQ_ACCEPT); |
rv = (irq->claim() == IRQ_ACCEPT); |
} else { |
/* Invoked by irq_find_and_lock() */ |
rv = (irq->devno == devno); |
419,16 → 376,5 |
return rv; |
} |
/** Unlock IRQ structure after hash_table_remove(). |
* |
* @param lnk Link in the removed and locked IRQ structure. |
*/ |
void irq_lin_remove(link_t *lnk) |
{ |
irq_t *irq __attribute__((unused)) |
= hash_table_get_instance(lnk, irq_t, link); |
spinlock_unlock(&irq->lock); |
} |
/** @} |
*/ |
/branches/arm/kernel/generic/src/ddi/ddi.c |
---|
29,10 → 29,10 |
/** @addtogroup genericddi |
* @{ |
*/ |
/** |
* @file |
* @brief Device Driver Interface functions. |
* @brief Device Driver Interface functions. |
* |
* This file contains functions that comprise the Device Driver Interface. |
* These are the functions for mapping physical memory and enabling I/O |
68,100 → 68,82 |
* |
* @param parea Pointer to physical area structure. |
* |
* @todo This function doesn't check for overlaps. It depends on the kernel to |
* create disjunct physical memory areas. |
*/ |
void ddi_parea_register(parea_t *parea) |
{ |
ipl_t ipl = interrupts_disable(); |
ipl_t ipl; |
ipl = interrupts_disable(); |
spinlock_lock(&parea_lock); |
/* |
* We don't check for overlaps here as the kernel is pretty sane. |
* TODO: we should really check for overlaps here. |
* However, we should be safe because the kernel is pretty sane and |
* memory of different devices doesn't overlap. |
*/ |
btree_insert(&parea_btree, (btree_key_t) parea->pbase, parea, NULL); |
spinlock_unlock(&parea_lock); |
interrupts_restore(ipl); |
interrupts_restore(ipl); |
} |
/** Map piece of physical memory into virtual address space of current task. |
* |
* @param pf Physical address of the starting frame. |
* @param vp Virtual address of the starting page. |
* @param pf Physical address of the starting frame. |
* @param vp Virtual address of the starting page. |
* @param pages Number of pages to map. |
* @param flags Address space area flags for the mapping. |
* |
* @return 0 on success, EPERM if the caller lacks capabilities to use this |
* syscall, EBADMEM if pf or vf is not page aligned, ENOENT if there |
* is no task matching the specified ID or the physical address space |
* is not enabled for mapping and ENOMEM if there was a problem in |
* creating address space area. |
* |
* syscall, ENOENT if there is no task matching the specified ID or the |
* physical address space is not enabled for mapping and ENOMEM if there |
* was a problem in creating address space area. |
*/ |
static int ddi_physmem_map(uintptr_t pf, uintptr_t vp, size_t pages, int flags) |
static int ddi_physmem_map(uintptr_t pf, uintptr_t vp, count_t pages, int flags) |
{ |
ASSERT(TASK); |
ASSERT((pf % FRAME_SIZE) == 0); |
ASSERT((vp % PAGE_SIZE) == 0); |
ipl_t ipl; |
cap_t caps; |
mem_backend_data_t backend_data; |
backend_data.base = pf; |
backend_data.frames = pages; |
/* |
* Make sure the caller is authorised to make this syscall. |
*/ |
cap_t caps = cap_get(TASK); |
caps = cap_get(TASK); |
if (!(caps & CAP_MEM_MANAGER)) |
return EPERM; |
mem_backend_data_t backend_data; |
backend_data.base = pf; |
backend_data.frames = pages; |
ipl_t ipl = interrupts_disable(); |
/* Find the zone of the physical memory */ |
spinlock_lock(&zones.lock); |
size_t znum = find_zone(ADDR2PFN(pf), pages, 0); |
if (znum == (size_t) -1) { |
/* Frames not found in any zones |
* -> assume it is hardware device and allow mapping |
ipl = interrupts_disable(); |
/* |
* Check if the physical memory area is enabled for mapping. |
* If the architecture supports virtually indexed caches, intercept |
* attempts to create an illegal address alias. |
*/ |
spinlock_lock(&parea_lock); |
parea_t *parea; |
btree_node_t *nodep; |
parea = (parea_t *) btree_search(&parea_btree, (btree_key_t) pf, &nodep); |
if (!parea || parea->frames < pages || ((flags & AS_AREA_CACHEABLE) && |
!parea->cacheable) || (!(flags & AS_AREA_CACHEABLE) && |
parea->cacheable)) { |
/* |
* This physical memory area cannot be mapped. |
*/ |
spinlock_unlock(&zones.lock); |
goto map; |
} |
if (zones.info[znum].flags & ZONE_FIRMWARE) { |
/* Frames are part of firmware */ |
spinlock_unlock(&zones.lock); |
goto map; |
} |
if (zone_flags_available(zones.info[znum].flags)) { |
/* Frames are part of physical memory, check if the memory |
* region is enabled for mapping. |
*/ |
spinlock_unlock(&zones.lock); |
spinlock_lock(&parea_lock); |
btree_node_t *nodep; |
parea_t *parea = (parea_t *) btree_search(&parea_btree, |
(btree_key_t) pf, &nodep); |
if ((!parea) || (parea->frames < pages)) |
goto err; |
spinlock_unlock(&parea_lock); |
goto map; |
interrupts_restore(ipl); |
return ENOENT; |
} |
err: |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
return ENOENT; |
map: |
spinlock_unlock(&parea_lock); |
spinlock_lock(&TASK->lock); |
if (!as_area_create(TASK->as, flags, pages * PAGE_SIZE, vp, |
AS_AREA_ATTR_NONE, &phys_backend, &backend_data)) { |
if (!as_area_create(TASK->as, flags, pages * PAGE_SIZE, vp, AS_AREA_ATTR_NONE, |
&phys_backend, &backend_data)) { |
/* |
* The address space area could not have been created. |
* We report it using ENOMEM. |
187,24 → 169,28 |
* @param size Size of the enabled I/O space.. |
* |
* @return 0 on success, EPERM if the caller lacks capabilities to use this |
* syscall, ENOENT if there is no task matching the specified ID. |
* |
* syscall, ENOENT if there is no task matching the specified ID. |
*/ |
static int ddi_iospace_enable(task_id_t id, uintptr_t ioaddr, size_t size) |
{ |
ipl_t ipl; |
cap_t caps; |
task_t *t; |
int rc; |
/* |
* Make sure the caller is authorised to make this syscall. |
*/ |
cap_t caps = cap_get(TASK); |
caps = cap_get(TASK); |
if (!(caps & CAP_IO_MANAGER)) |
return EPERM; |
ipl_t ipl = interrupts_disable(); |
ipl = interrupts_disable(); |
spinlock_lock(&tasks_lock); |
task_t *task = task_find_by_id(id); |
t = task_find_by_id(id); |
if ((!task) || (!context_check(CONTEXT, task->context))) { |
if ((!t) || (!context_check(CONTEXT, t->context))) { |
/* |
* There is no task with the specified ID |
* or the task belongs to a different security |
214,16 → 200,15 |
interrupts_restore(ipl); |
return ENOENT; |
} |
/* Lock the task and release the lock protecting tasks_btree. */ |
spinlock_lock(&task->lock); |
spinlock_lock(&t->lock); |
spinlock_unlock(&tasks_lock); |
rc = ddi_iospace_enable_arch(t, ioaddr, size); |
int rc = ddi_iospace_enable_arch(task, ioaddr, size); |
spinlock_unlock(&task->lock); |
spinlock_unlock(&t->lock); |
interrupts_restore(ipl); |
return rc; |
} |
235,14 → 220,13 |
* @param flags Flags of newly mapped pages |
* |
* @return 0 on success, otherwise it returns error code found in errno.h |
* |
*/ |
*/ |
unative_t sys_physmem_map(unative_t phys_base, unative_t virt_base, |
unative_t pages, unative_t flags) |
{ |
return (unative_t) ddi_physmem_map(ALIGN_DOWN((uintptr_t) phys_base, |
FRAME_SIZE), ALIGN_DOWN((uintptr_t) virt_base, PAGE_SIZE), |
(size_t) pages, (int) flags); |
(count_t) pages, (int) flags); |
} |
/** Wrapper for SYS_ENABLE_IOSPACE syscall. |
250,15 → 234,16 |
* @param uspace_io_arg User space address of DDI argument structure. |
* |
* @return 0 on success, otherwise it returns error code found in errno.h |
* |
*/ |
*/ |
unative_t sys_iospace_enable(ddi_ioarg_t *uspace_io_arg) |
{ |
ddi_ioarg_t arg; |
int rc = copy_from_uspace(&arg, uspace_io_arg, sizeof(ddi_ioarg_t)); |
int rc; |
rc = copy_from_uspace(&arg, uspace_io_arg, sizeof(ddi_ioarg_t)); |
if (rc != 0) |
return (unative_t) rc; |
return (unative_t) ddi_iospace_enable((task_id_t) arg.task_id, |
(uintptr_t) arg.ioaddr, (size_t) arg.size); |
} |
266,24 → 251,20 |
/** Disable or enable preemption. |
* |
* @param enable If non-zero, the preemption counter will be decremented, |
* leading to potential enabling of preemption. Otherwise |
* the preemption counter will be incremented, preventing |
* preemption from occurring. |
* leading to potential enabling of preemption. Otherwise the preemption |
* counter will be incremented, preventing preemption from occurring. |
* |
* @return Zero on success or EPERM if callers capabilities are not sufficient. |
* |
*/ |
*/ |
unative_t sys_preempt_control(int enable) |
{ |
if (!cap_get(TASK) & CAP_PREEMPT_CONTROL) |
return EPERM; |
if (enable) |
preemption_enable(); |
else |
preemption_disable(); |
return 0; |
if (!cap_get(TASK) & CAP_PREEMPT_CONTROL) |
return EPERM; |
if (enable) |
preemption_enable(); |
else |
preemption_disable(); |
return 0; |
} |
/** @} |
/branches/arm/kernel/generic/src/ddi/device.c |
---|
31,7 → 31,7 |
*/ |
/** |
* @file |
* @brief Device numbers. |
* @brief Device numbers. |
*/ |
#include <arch/types.h> |
47,16 → 47,13 |
*/ |
devno_t device_assign_devno(void) |
{ |
devno_t devno = (devno_t) atomic_postinc(&last); |
devno_t devno; |
devno = (devno_t) atomic_postinc(&last); |
ASSERT(devno >= 0); |
return devno; |
} |
unative_t sys_device_assign_devno(void) |
{ |
return (unative_t) device_assign_devno(); |
} |
/** @} |
*/ |
/branches/arm/kernel/generic/include/string.h |
---|
File deleted |
/branches/arm/kernel/generic/include/ipc/event.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/generic/include/ipc/event_types.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/kernel/generic/include/ipc/kbox.h |
---|
37,18 → 37,6 |
#include <typedefs.h> |
/** Kernel answerbox structure. */ |
typedef struct kbox { |
/** The answerbox itself. */ |
answerbox_t box; |
/** Thread used to service the answerbox. */ |
struct thread *thread; |
/** Kbox thread creation vs. begin of cleanup mutual exclusion. */ |
mutex_t cleanup_lock; |
/** True if cleanup of kbox has already started. */ |
bool finished; |
} kbox_t; |
extern int ipc_connect_kbox(task_id_t); |
extern void ipc_kbox_cleanup(void); |
/branches/arm/kernel/generic/include/ipc/sysipc.h |
---|
53,8 → 53,6 |
int nonblocking); |
unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid, |
unative_t method, unative_t arg1, unative_t arg2, int mode); |
unative_t sys_ipc_forward_slow(unative_t callid, unative_t phoneid, |
ipc_data_t *data, int mode); |
unative_t sys_ipc_hangup(int phoneid); |
unative_t sys_ipc_register_irq(inr_t inr, devno_t devno, unative_t method, |
irq_code_t *ucode); |
/branches/arm/kernel/generic/include/ipc/ipc.h |
---|
111,25 → 111,6 |
/* System-specific methods - only through special syscalls |
* These methods have special behaviour |
*/ |
/** Clone connection. |
* |
* The calling task clones one of its phones for the callee. |
* |
* - ARG1 - The caller sets ARG1 to the phone of the cloned connection. |
* - The callee gets the new phone from ARG1. |
* - on answer, the callee acknowledges the new connection by sending EOK back |
* or the kernel closes it |
*/ |
#define IPC_M_CONNECTION_CLONE 1 |
/** Protocol for CONNECT - ME |
* |
* Through this call, the recipient learns about the new cloned connection. |
* |
* - ARG5 - the kernel sets ARG5 to contain the hash of the used phone |
* - on asnwer, the callee acknowledges the new connection by sending EOK back |
* or the kernel closes it |
*/ |
#define IPC_M_CONNECT_ME 2 |
/** Protocol for CONNECT - TO - ME |
* |
* Calling process asks the callee to create a callback connection, |
146,7 → 127,7 |
* - the allocated phoneid is passed to userspace |
* (on the receiving side) as ARG5 of the call. |
*/ |
#define IPC_M_CONNECT_TO_ME 3 |
#define IPC_M_CONNECT_TO_ME 1 |
/** Protocol for CONNECT - ME - TO |
* |
* Calling process asks the callee to create for him a new connection. |
164,11 → 145,11 |
* - recepient may forward message. |
* |
*/ |
#define IPC_M_CONNECT_ME_TO 4 |
#define IPC_M_CONNECT_ME_TO 2 |
/** This message is sent to answerbox when the phone |
* is hung up |
*/ |
#define IPC_M_PHONE_HUNGUP 5 |
#define IPC_M_PHONE_HUNGUP 3 |
/** Send as_area over IPC. |
* - ARG1 - source as_area base address |
178,7 → 159,7 |
* on answer, the recipient must set: |
* - ARG1 - dst as_area base adress |
*/ |
#define IPC_M_SHARE_OUT 6 |
#define IPC_M_SHARE_OUT 4 |
/** Receive as_area over IPC. |
* - ARG1 - destination as_area base address |
190,7 → 171,7 |
* - ARG1 - source as_area base address |
* - ARG2 - flags that will be used for sharing |
*/ |
#define IPC_M_SHARE_IN 7 |
#define IPC_M_SHARE_IN 5 |
/** Send data to another address space over IPC. |
* - ARG1 - source address space virtual address |
201,7 → 182,7 |
* - ARG1 - final destination address space virtual address |
* - ARG2 - final size of data to be copied |
*/ |
#define IPC_M_DATA_WRITE 8 |
#define IPC_M_DATA_WRITE 6 |
/** Receive data from another address space over IPC. |
* - ARG1 - destination virtual address in the source address space |
212,13 → 193,13 |
* - ARG1 - source virtual address in the destination address space |
* - ARG2 - final size of data to be copied |
*/ |
#define IPC_M_DATA_READ 9 |
#define IPC_M_DATA_READ 7 |
/** Debug the recipient. |
* - ARG1 - specifies the debug method (from udebug_method_t) |
* - other arguments are specific to the debug method |
*/ |
#define IPC_M_DEBUG_ALL 10 |
#define IPC_M_DEBUG_ALL 8 |
/* Well-known methods */ |
#define IPC_M_LAST_SYSTEM 511 |
/branches/arm/kernel/generic/include/ipc/irq.h |
---|
36,7 → 36,7 |
#define KERN_IPC_IRQ_H_ |
/** Maximum length of IPC IRQ program */ |
#define IRQ_MAX_PROG_SIZE 20 |
#define IRQ_MAX_PROG_SIZE 10 |
#include <ipc/ipc.h> |
#include <ddi/irq.h> |
43,21 → 43,16 |
#include <arch/types.h> |
#include <adt/list.h> |
extern int ipc_irq_register(answerbox_t *, inr_t, devno_t, unative_t, |
irq_code_t *); |
extern int ipc_irq_register(answerbox_t *box, inr_t inr, devno_t devno, |
unative_t method, irq_code_t *ucode); |
extern void ipc_irq_send_notif(irq_t *irq); |
extern void ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno); |
extern void ipc_irq_cleanup(answerbox_t *box); |
extern irq_ownership_t ipc_irq_top_half_claim(irq_t *); |
extern void ipc_irq_top_half_handler(irq_t *); |
extern int ipc_irq_unregister(answerbox_t *, inr_t, devno_t); |
extern void ipc_irq_cleanup(answerbox_t *); |
/* |
* User friendly wrappers for ipc_irq_send_msg(). They are in the form |
* ipc_irq_send_msg_m(), where m is the number of payload arguments. |
*/ |
#define ipc_irq_send_msg_0(irq) \ |
ipc_irq_send_msg((irq), 0, 0, 0, 0, 0) |
#define ipc_irq_send_msg_1(irq, a1) \ |
ipc_irq_send_msg((irq), (a1), 0, 0, 0, 0) |
#define ipc_irq_send_msg_2(irq, a1, a2) \ |
69,8 → 64,8 |
#define ipc_irq_send_msg_5(irq, a1, a2, a3, a4, a5) \ |
ipc_irq_send_msg((irq), (a1), (a2), (a3), (a4), (a5)) |
extern void ipc_irq_send_msg(irq_t *, unative_t, unative_t, unative_t, unative_t, |
unative_t); |
extern void ipc_irq_send_msg(irq_t *irq, unative_t a1, unative_t a2, |
unative_t a3, unative_t a4, unative_t a5); |
#endif |
/branches/arm/kernel/generic/include/ipc/ipcrsc.h |
---|
35,11 → 35,8 |
#ifndef KERN_IPCRSC_H_ |
#define KERN_IPCRSC_H_ |
#include <proc/task.h> |
#include <ipc/ipc.h> |
extern call_t * get_call(unative_t callid); |
extern int phone_alloc(task_t *t); |
extern int phone_alloc(void); |
extern void phone_connect(int phoneid, answerbox_t *box); |
extern void phone_dealloc(int phoneid); |
/branches/arm/kernel/generic/include/proc/task.h |
---|
53,10 → 53,7 |
#include <mm/tlb.h> |
#include <proc/scheduler.h> |
#include <udebug/udebug.h> |
#include <ipc/kbox.h> |
#define TASK_NAME_BUFLEN 20 |
struct thread; |
/** Task structure. */ |
70,8 → 67,8 |
* threads. |
*/ |
SPINLOCK_DECLARE(lock); |
char name[TASK_NAME_BUFLEN]; |
char *name; |
/** List of threads contained in this task. */ |
link_t th_head; |
/** Address space. */ |
99,13 → 96,19 |
atomic_t active_calls; |
#ifdef CONFIG_UDEBUG |
/** Debugging stuff. */ |
/** Debugging stuff */ |
udebug_task_t udebug; |
/** Kernel answerbox. */ |
kbox_t kb; |
/** Kernel answerbox */ |
answerbox_t kernel_box; |
/** Thread used to service kernel answerbox */ |
struct thread *kb_thread; |
/** Kbox thread creation vs. begin of cleanup mutual exclusion */ |
mutex_t kb_cleanup_lock; |
/** True if cleanup of kbox has already started */ |
bool kb_finished; |
#endif |
/** Architecture specific task data. */ |
task_arch_t arch; |
144,7 → 147,6 |
#endif |
extern unative_t sys_task_get_id(task_id_t *uspace_task_id); |
extern unative_t sys_task_set_name(const char *uspace_name, size_t name_len); |
#endif |
/branches/arm/kernel/generic/include/proc/thread.h |
---|
259,8 → 259,7 |
extern slab_cache_t *fpu_context_slab; |
/* Thread syscall prototypes. */ |
extern unative_t sys_thread_create(uspace_arg_t *uspace_uarg, |
char *uspace_name, size_t name_len, thread_id_t *uspace_thread_id); |
extern unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, thread_id_t *uspace_thread_id); |
extern unative_t sys_thread_exit(int uspace_status); |
extern unative_t sys_thread_get_id(thread_id_t *uspace_thread_id); |
/branches/arm/kernel/generic/include/proc/program.h |
---|
52,14 → 52,12 |
extern void *program_loader; |
extern void program_create(as_t *as, uintptr_t entry_addr, char *name, |
program_t *p); |
extern int program_create_from_image(void *image_addr, char *name, |
program_t *p); |
extern int program_create_loader(program_t *p, char *name); |
extern void program_create(as_t *as, uintptr_t entry_addr, program_t *p); |
extern int program_create_from_image(void *image_addr, program_t *p); |
extern int program_create_loader(program_t *p); |
extern void program_ready(program_t *p); |
extern unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len); |
extern unative_t sys_program_spawn_loader(int *uspace_phone_id); |
#endif |
/branches/arm/kernel/generic/include/proc/scheduler.h |
---|
47,7 → 47,7 |
typedef struct { |
SPINLOCK_DECLARE(lock); |
link_t rq_head; /**< List of ready threads. */ |
size_t n; /**< Number of threads in rq_ready. */ |
count_t n; /**< Number of threads in rq_ready. */ |
} runq_t; |
extern atomic_t nrdy; |
/branches/arm/kernel/generic/include/udebug/udebug.h |
---|
147,7 → 147,9 |
/** BEGIN operation in progress (waiting for threads to stop) */ |
UDEBUG_TS_BEGINNING, |
/** Debugger fully connected */ |
UDEBUG_TS_ACTIVE |
UDEBUG_TS_ACTIVE, |
/** Task is shutting down, no more debug activities allowed */ |
UDEBUG_TS_SHUTDOWN |
} udebug_task_state_t; |
/** Debugging part of task_t structure. |
167,19 → 169,25 |
/** Debugging part of thread_t structure. |
*/ |
typedef struct { |
/** Synchronize debug ops on this thread / access to this structure. */ |
/** |
* Prevent deadlock with udebug_before_thread_runs() in interrupt |
* handler, without actually disabling interrupts. |
* ==0 means "unlocked", >0 means "locked" |
*/ |
atomic_t int_lock; |
/** Synchronize debug ops on this thread / access to this structure */ |
mutex_t lock; |
waitq_t go_wq; |
call_t *go_call; |
unative_t syscall_args[6]; |
istate_t *uspace_state; |
/** What type of event are we stopped in or 0 if none. */ |
udebug_event_t cur_event; |
bool go; /**< thread is GO */ |
bool stoppable; /**< thread is stoppable */ |
bool active; /**< thread is in a debugging session */ |
/** What type of event are we stopped in or 0 if none */ |
udebug_event_t cur_event; |
bool stop; |
bool stoppable; |
bool debug_active; /**< In a debugging session */ |
} udebug_thread_t; |
struct task; |
192,7 → 200,7 |
unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc, |
bool end_variant); |
void udebug_thread_b_event_attach(struct thread *t, struct task *ta); |
void udebug_thread_b_event(struct thread *t); |
void udebug_thread_e_event(void); |
void udebug_stoppable_begin(void); |
/branches/arm/kernel/generic/include/syscall/syscall.h |
---|
44,7 → 44,6 |
SYS_THREAD_GET_ID, |
SYS_TASK_GET_ID, |
SYS_TASK_SET_NAME, |
SYS_PROGRAM_SPAWN_LOADER, |
SYS_FUTEX_SLEEP, |
63,18 → 62,14 |
SYS_IPC_ANSWER_FAST, |
SYS_IPC_ANSWER_SLOW, |
SYS_IPC_FORWARD_FAST, |
SYS_IPC_FORWARD_SLOW, |
SYS_IPC_WAIT, |
SYS_IPC_HANGUP, |
SYS_IPC_REGISTER_IRQ, |
SYS_IPC_UNREGISTER_IRQ, |
SYS_EVENT_SUBSCRIBE, |
SYS_CAP_GRANT, |
SYS_CAP_REVOKE, |
SYS_DEVICE_ASSIGN_DEVNO, |
SYS_PHYSMEM_MAP, |
SYS_IOSPACE_ENABLE, |
SYS_PREEMPT_CONTROL, |
83,7 → 78,6 |
SYS_SYSINFO_VALUE, |
SYS_DEBUG_ENABLE_CONSOLE, |
SYS_DEBUG_DISABLE_CONSOLE, |
SYS_IPC_CONNECT_KBOX, |
SYSCALL_END |
} syscall_t; |
/branches/arm/kernel/generic/include/errno.h |
---|
48,18 → 48,15 |
* sys_ipc_hangup() to close the connection. |
* Used by answerbox to close the connection. |
*/ |
#define EPARTY -8 /* The other party encountered an error when |
* receiving the call. |
*/ |
#define EEXISTS -9 /* Entry already exists */ |
#define EBADMEM -10 /* Bad memory pointer */ |
#define ENOTSUP -11 /* Not supported */ |
#define EADDRNOTAVAIL -12 /* Address not available. */ |
#define ETIMEOUT -13 /* Timeout expired */ |
#define EINVAL -14 /* Invalid value */ |
#define EBUSY -15 /* Resource is busy */ |
#define EOVERFLOW -16 /* The result does not fit its size. */ |
#define EINTR -17 /* Operation was interrupted. */ |
#define EEXISTS -8 /* Entry already exists */ |
#define EBADMEM -9 /* Bad memory pointer */ |
#define ENOTSUP -10 /* Not supported */ |
#define EADDRNOTAVAIL -11 /* Address not available. */ |
#define ETIMEOUT -12 /* Timeout expired */ |
#define EINVAL -13 /* Invalid value */ |
#define EBUSY -14 /* Resource is busy */ |
#define EOVERFLOW -15 /* The result does not fit its size. */ |
#define EINTR -16 /* Operation was interrupted. */ |
#endif |
/branches/arm/kernel/generic/include/mm/as.h |
---|
94,7 → 94,7 |
* Number of processors on wich is this address space active. |
* Protected by asidlock. |
*/ |
size_t cpu_refcount; |
count_t cpu_refcount; |
/** |
* Address space identifier. |
* Constant on architectures that do not support ASIDs. |
132,7 → 132,7 |
/** This lock must be acquired only when the as_area lock is held. */ |
mutex_t lock; |
/** This structure can be deallocated if refcount drops to 0. */ |
size_t refcount; |
count_t refcount; |
/** |
* B+tree containing complete map of anonymous pages of the shared area. |
*/ |
156,7 → 156,7 |
}; |
struct { /**< phys_backend members */ |
uintptr_t base; |
size_t frames; |
count_t frames; |
}; |
} mem_backend_data_t; |
175,7 → 175,7 |
/** Attributes related to the address space area itself. */ |
int attributes; |
/** Size of this area in multiples of PAGE_SIZE. */ |
size_t pages; |
count_t pages; |
/** Base address of this area. */ |
uintptr_t base; |
/** Map of used space. */ |
225,8 → 225,8 |
extern int as_area_get_flags(as_area_t *area); |
extern bool as_area_check_access(as_area_t *area, pf_access_t access); |
extern size_t as_area_get_size(uintptr_t base); |
extern int used_space_insert(as_area_t *a, uintptr_t page, size_t count); |
extern int used_space_remove(as_area_t *a, uintptr_t page, size_t count); |
extern int used_space_insert(as_area_t *a, uintptr_t page, count_t count); |
extern int used_space_remove(as_area_t *a, uintptr_t page, count_t count); |
/* Interface to be implemented by architectures. */ |
/branches/arm/kernel/generic/include/mm/page.h |
---|
42,7 → 42,7 |
/** Operations to manipulate page mappings. */ |
typedef struct { |
void (* mapping_insert)(as_t *as, uintptr_t page, uintptr_t frame, |
int flags); |
int flags); |
void (* mapping_remove)(as_t *as, uintptr_t page); |
pte_t *(* mapping_find)(as_t *as, uintptr_t page); |
} page_mapping_operations_t; |
59,7 → 59,6 |
extern pte_t *page_table_create(int flags); |
extern void page_table_destroy(pte_t *page_table); |
extern void map_structure(uintptr_t s, size_t size); |
extern uintptr_t hw_map(uintptr_t physaddr, size_t size); |
#endif |
/branches/arm/kernel/generic/include/mm/frame.h |
---|
38,82 → 38,34 |
#include <arch/types.h> |
#include <adt/list.h> |
#include <synch/spinlock.h> |
#include <mm/buddy.h> |
#include <synch/spinlock.h> |
#include <arch/mm/page.h> |
#include <arch/mm/frame.h> |
#define ONE_FRAME 0 |
#define TWO_FRAMES 1 |
#define FOUR_FRAMES 2 |
#define ONE_FRAME 0 |
#define TWO_FRAMES 1 |
#define FOUR_FRAMES 2 |
#ifdef ARCH_STACK_FRAMES |
#define STACK_FRAMES ARCH_STACK_FRAMES |
#define STACK_FRAMES ARCH_STACK_FRAMES |
#else |
#define STACK_FRAMES ONE_FRAME |
#define STACK_FRAMES ONE_FRAME |
#endif |
/** Maximum number of zones in the system. */ |
#define ZONES_MAX 32 |
/** Maximum number of zones in system. */ |
#define ZONES_MAX 16 |
typedef uint8_t frame_flags_t; |
/** Convert the frame address to kernel VA. */ |
#define FRAME_KA 0x01 |
/** Convert the frame address to kernel va. */ |
#define FRAME_KA 0x1 |
/** Do not panic and do not sleep on failure. */ |
#define FRAME_ATOMIC 0x02 |
#define FRAME_ATOMIC 0x2 |
/** Do not start reclaiming when no free memory. */ |
#define FRAME_NO_RECLAIM 0x04 |
#define FRAME_NO_RECLAIM 0x4 |
/** Do not allocate above 4 GiB. */ |
#define FRAME_LOW_4_GiB 0x8 |
typedef uint8_t zone_flags_t; |
/** Available zone (free for allocation) */ |
#define ZONE_AVAILABLE 0x00 |
/** Zone is reserved (not available for allocation) */ |
#define ZONE_RESERVED 0x08 |
/** Zone is used by firmware (not available for allocation) */ |
#define ZONE_FIRMWARE 0x10 |
/** Currently there is no equivalent zone flags |
for frame flags */ |
#define FRAME_TO_ZONE_FLAGS(frame_flags) 0 |
typedef struct { |
size_t refcount; /**< Tracking of shared frames */ |
uint8_t buddy_order; /**< Buddy system block order */ |
link_t buddy_link; /**< Link to the next free block inside |
one order */ |
void *parent; /**< If allocated by slab, this points there */ |
} frame_t; |
typedef struct { |
pfn_t base; /**< Frame_no of the first frame |
in the frames array */ |
size_t count; /**< Size of zone */ |
size_t free_count; /**< Number of free frame_t |
structures */ |
size_t busy_count; /**< Number of busy frame_t |
structures */ |
zone_flags_t flags; /**< Type of the zone */ |
frame_t *frames; /**< Array of frame_t structures |
in this zone */ |
buddy_system_t *buddy_system; /**< Buddy system for the zone */ |
} zone_t; |
/* |
* The zoneinfo.lock must be locked when accessing zoneinfo structure. |
* Some of the attributes in zone_t structures are 'read-only' |
*/ |
typedef struct { |
SPINLOCK_DECLARE(lock); |
size_t count; |
zone_t info[ZONES_MAX]; |
} zones_t; |
extern zones_t zones; |
static inline uintptr_t PFN2ADDR(pfn_t frame) |
{ |
return (uintptr_t) (frame << FRAME_WIDTH); |
124,49 → 76,43 |
return (pfn_t) (addr >> FRAME_WIDTH); |
} |
static inline size_t SIZE2FRAMES(size_t size) |
static inline count_t SIZE2FRAMES(size_t size) |
{ |
if (!size) |
return 0; |
return (size_t) ((size - 1) >> FRAME_WIDTH) + 1; |
return (count_t) ((size - 1) >> FRAME_WIDTH) + 1; |
} |
static inline size_t FRAMES2SIZE(size_t frames) |
static inline size_t FRAMES2SIZE(count_t frames) |
{ |
return (size_t) (frames << FRAME_WIDTH); |
} |
static inline bool zone_flags_available(zone_flags_t flags) |
{ |
return ((flags & (ZONE_RESERVED | ZONE_FIRMWARE)) == 0); |
} |
#define IS_BUDDY_ORDER_OK(index, order) \ |
#define IS_BUDDY_ORDER_OK(index, order) \ |
((~(((unative_t) -1) << (order)) & (index)) == 0) |
#define IS_BUDDY_LEFT_BLOCK(zone, frame) \ |
(((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x01) == 0) |
#define IS_BUDDY_RIGHT_BLOCK(zone, frame) \ |
(((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x01) == 1) |
#define IS_BUDDY_LEFT_BLOCK_ABS(zone, frame) \ |
(((frame_index_abs((zone), (frame)) >> (frame)->buddy_order) & 0x01) == 0) |
#define IS_BUDDY_RIGHT_BLOCK_ABS(zone, frame) \ |
(((frame_index_abs((zone), (frame)) >> (frame)->buddy_order) & 0x01) == 1) |
#define IS_BUDDY_LEFT_BLOCK(zone, frame) \ |
(((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0) |
#define IS_BUDDY_RIGHT_BLOCK(zone, frame) \ |
(((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1) |
#define IS_BUDDY_LEFT_BLOCK_ABS(zone, frame) \ |
(((frame_index_abs((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0) |
#define IS_BUDDY_RIGHT_BLOCK_ABS(zone, frame) \ |
(((frame_index_abs((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1) |
#define frame_alloc(order, flags) \ |
#define frame_alloc(order, flags) \ |
frame_alloc_generic(order, flags, NULL) |
extern void frame_init(void); |
extern void *frame_alloc_generic(uint8_t, frame_flags_t, size_t *); |
extern void *frame_alloc_generic(uint8_t, int, unsigned int *); |
extern void frame_free(uintptr_t); |
extern void frame_reference_add(pfn_t); |
extern size_t find_zone(pfn_t frame, size_t count, size_t hint); |
extern size_t zone_create(pfn_t, size_t, pfn_t, zone_flags_t); |
extern void *frame_get_parent(pfn_t, size_t); |
extern void frame_set_parent(pfn_t, void *, size_t); |
extern void frame_mark_unavailable(pfn_t, size_t); |
extern uintptr_t zone_conf_size(size_t); |
extern bool zone_merge(size_t, size_t); |
extern int zone_create(pfn_t, count_t, pfn_t, int); |
extern void *frame_get_parent(pfn_t, unsigned int); |
extern void frame_set_parent(pfn_t, void *, unsigned int); |
extern void frame_mark_unavailable(pfn_t, count_t); |
extern uintptr_t zone_conf_size(count_t); |
extern void zone_merge(unsigned int, unsigned int); |
extern void zone_merge_all(void); |
extern uint64_t zone_total_size(void); |
174,7 → 120,7 |
* Console functions |
*/ |
extern void zone_print_list(void); |
extern void zone_print_one(size_t); |
extern void zone_print_one(unsigned int); |
#endif |
/branches/arm/kernel/generic/include/mm/buddy.h |
---|
82,7 → 82,7 |
extern link_t *buddy_system_alloc(buddy_system_t *, uint8_t); |
extern bool buddy_system_can_alloc(buddy_system_t *, uint8_t); |
extern void buddy_system_free(buddy_system_t *, link_t *); |
extern size_t buddy_conf_size(size_t); |
extern size_t buddy_conf_size(int); |
extern link_t *buddy_system_alloc_block(buddy_system_t *, link_t *); |
#endif |
/branches/arm/kernel/generic/include/mm/slab.h |
---|
41,40 → 41,40 |
#include <mm/frame.h> |
/** Minimum size to be allocated by malloc */ |
#define SLAB_MIN_MALLOC_W 4 |
#define SLAB_MIN_MALLOC_W 4 |
/** Maximum size to be allocated by malloc */ |
#define SLAB_MAX_MALLOC_W 22 |
#define SLAB_MAX_MALLOC_W 18 |
/** Initial Magazine size (TODO: dynamically growing magazines) */ |
#define SLAB_MAG_SIZE 4 |
/** If object size is less, store control structure inside SLAB */ |
#define SLAB_INSIDE_SIZE (PAGE_SIZE >> 3) |
#define SLAB_INSIDE_SIZE (PAGE_SIZE >> 3) |
/** Maximum wasted space we allow for cache */ |
#define SLAB_MAX_BADNESS(cache) \ |
#define SLAB_MAX_BADNESS(cache) \ |
(((unsigned int) PAGE_SIZE << (cache)->order) >> 2) |
/* slab_reclaim constants */ |
/** Reclaim all possible memory, because we are in memory stress */ |
#define SLAB_RECLAIM_ALL 0x01 |
#define SLAB_RECLAIM_ALL 0x1 |
/* cache_create flags */ |
/** Do not use per-cpu cache */ |
#define SLAB_CACHE_NOMAGAZINE 0x01 |
#define SLAB_CACHE_NOMAGAZINE 0x1 |
/** Have control structure inside SLAB */ |
#define SLAB_CACHE_SLINSIDE 0x02 |
#define SLAB_CACHE_SLINSIDE 0x2 |
/** We add magazine cache later, if we have this flag */ |
#define SLAB_CACHE_MAGDEFERRED (0x04 | SLAB_CACHE_NOMAGAZINE) |
#define SLAB_CACHE_MAGDEFERRED (0x4 | SLAB_CACHE_NOMAGAZINE) |
typedef struct { |
link_t link; |
size_t busy; /**< Count of full slots in magazine */ |
size_t size; /**< Number of slots in magazine */ |
void *objs[]; /**< Slots in magazine */ |
count_t busy; /**< Count of full slots in magazine */ |
count_t size; /**< Number of slots in magazine */ |
void *objs[]; /**< Slots in magazine */ |
} slab_magazine_t; |
typedef struct { |
86,23 → 86,23 |
typedef struct { |
char *name; |
link_t link; |
/* Configuration */ |
/** Size of slab position - align_up(sizeof(obj)) */ |
size_t size; |
int (*constructor)(void *obj, int kmflag); |
int (*destructor)(void *obj); |
/** Flags changing behaviour of cache */ |
int flags; |
/* Computed values */ |
uint8_t order; /**< Order of frames to be allocated */ |
unsigned int objects; /**< Number of objects that fit in */ |
uint8_t order; /**< Order of frames to be allocated */ |
unsigned int objects; /**< Number of objects that fit in */ |
/* Statistics */ |
atomic_t allocated_slabs; |
atomic_t allocated_objs; |
109,15 → 109,15 |
atomic_t cached_objs; |
/** How many magazines in magazines list */ |
atomic_t magazine_counter; |
/* Slabs */ |
link_t full_slabs; /**< List of full slabs */ |
link_t partial_slabs; /**< List of partial slabs */ |
link_t full_slabs; /**< List of full slabs */ |
link_t partial_slabs; /**< List of partial slabs */ |
SPINLOCK_DECLARE(slablock); |
/* Magazines */ |
link_t magazines; /**< List o full magazines */ |
/* Magazines */ |
link_t magazines; /**< List o full magazines */ |
SPINLOCK_DECLARE(maglock); |
/** CPU cache */ |
slab_mag_cache_t *mag_cache; |
} slab_cache_t; |
128,7 → 128,7 |
extern void * slab_alloc(slab_cache_t *, int); |
extern void slab_free(slab_cache_t *, void *); |
extern size_t slab_reclaim(int); |
extern count_t slab_reclaim(int); |
/* slab subsytem initialization */ |
extern void slab_cache_init(void); |
141,7 → 141,6 |
extern void *malloc(unsigned int, int); |
extern void *realloc(void *, unsigned int, int); |
extern void free(void *); |
#endif |
/** @} |
/branches/arm/kernel/generic/include/mm/tlb.h |
---|
61,7 → 61,7 |
tlb_invalidate_type_t type; /**< Message type. */ |
asid_t asid; /**< Address space identifier. */ |
uintptr_t page; /**< Page address. */ |
size_t count; /**< Number of pages to invalidate. */ |
count_t count; /**< Number of pages to invalidate. */ |
} tlb_shootdown_msg_t; |
extern void tlb_init(void); |
68,7 → 68,7 |
#ifdef CONFIG_SMP |
extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, |
uintptr_t page, size_t count); |
uintptr_t page, count_t count); |
extern void tlb_shootdown_finalize(void); |
extern void tlb_shootdown_ipi_recv(void); |
#else |
84,7 → 84,7 |
extern void tlb_invalidate_all(void); |
extern void tlb_invalidate_asid(asid_t asid); |
extern void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt); |
extern void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt); |
#endif |
/** @} |
/branches/arm/kernel/generic/include/macros.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
35,73 → 35,47 |
#ifndef KERN_MACROS_H_ |
#define KERN_MACROS_H_ |
#ifndef __ASM__ |
#include <arch/types.h> |
#define isdigit(d) (((d) >= '0') && ((d) <= '9')) |
#define islower(c) (((c) >= 'a') && ((c) <= 'z')) |
#define isupper(c) (((c) >= 'A') && ((c) <= 'Z')) |
#define isalpha(c) (is_lower((c)) || is_upper((c))) |
#define isalphanum(c) (is_alpha((c)) || is_digit((c))) |
#define isspace(c) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || \ |
((c) == '\r')) |
#define min(a,b) ((a) < (b) ? (a) : (b)) |
#define max(a,b) ((a) > (b) ? (a) : (b)) |
/** Return true if the intervals overlap. |
* |
* @param s1 Start address of the first interval. |
* @param sz1 Size of the first interval. |
* @param s2 Start address of the second interval. |
* @param sz2 Size of the second interval. |
* @param s1 Start address of the first interval. |
* @param sz1 Size of the first interval. |
* @param s2 Start address of the second interval. |
* @param sz2 Size of the second interval. |
*/ |
static inline int overlaps(uintptr_t s1, size_t sz1, uintptr_t s2, size_t sz2) |
{ |
uintptr_t e1 = s1 + sz1; |
uintptr_t e2 = s2 + sz2; |
return ((s1 < e2) && (s2 < e1)); |
return (s1 < e2) && (s2 < e1); |
} |
#endif /* __ASM__ */ |
#define isdigit(d) (((d) >= '0') && ((d) <= '9')) |
#define islower(c) (((c) >= 'a') && ((c) <= 'z')) |
#define isupper(c) (((c) >= 'A') && ((c) <= 'Z')) |
#define isalpha(c) (is_lower((c)) || is_upper((c))) |
#define isalphanum(c) (is_alpha((c)) || is_digit((c))) |
#define isspace(c) \ |
(((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r')) |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
#define min3(a, b, c) ((a) < (b) ? (min(a, c)) : (min(b, c))) |
#define max3(a, b, c) ((a) > (b) ? (max(a, c)) : (max(b, c))) |
/* Compute overlapping of physical addresses */ |
#define PA_overlaps(x, szx, y, szy) \ |
#define PA_overlaps(x, szx, y, szy) \ |
overlaps(KA2PA((x)), (szx), KA2PA((y)), (szy)) |
#define SIZE2KB(size) ((size) >> 10) |
#define SIZE2MB(size) ((size) >> 20) |
#define SIZE2KB(size) ((size) >> 10) |
#define SIZE2MB(size) ((size) >> 20) |
#define KB2SIZE(kb) ((kb) << 10) |
#define MB2SIZE(mb) ((mb) << 20) |
#define KB2SIZE(kb) ((kb) << 10) |
#define MB2SIZE(mb) ((mb) << 20) |
#define STRING(arg) STRING_ARG(arg) |
#define STRING_ARG(arg) #arg |
#define STRING(arg) STRING_ARG(arg) |
#define STRING_ARG(arg) #arg |
#define LOWER32(arg) ((arg) & 0xffffffff) |
#define UPPER32(arg) (((arg) >> 32) & 0xffffffff) |
#define MERGE_LOUP32(lo, up) \ |
((((uint64_t) (lo)) & 0xffffffff) \ |
| ((((uint64_t) (up)) & 0xffffffff) << 32)) |
/** Pseudorandom generator |
* |
* A pretty standard linear congruential pseudorandom |
* number generator (m = 2^32 or 2^64 depending on architecture). |
* |
*/ |
#define RANDI(seed) \ |
({ \ |
(seed) = 1103515245 * (seed) + 12345; \ |
(seed); \ |
}) |
#endif |
/** @} |
/branches/arm/kernel/generic/include/config.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
38,19 → 38,17 |
#include <arch/types.h> |
#include <arch/mm/page.h> |
#define STACK_SIZE PAGE_SIZE |
#define STACK_SIZE PAGE_SIZE |
#define CONFIG_INIT_TASKS 32 |
#define CONFIG_TASK_NAME_BUFLEN 32 |
#define CONFIG_INIT_TASKS 32 |
typedef struct { |
uintptr_t addr; |
size_t size; |
char name[CONFIG_TASK_NAME_BUFLEN]; |
} init_task_t; |
typedef struct { |
size_t cnt; |
count_t cnt; |
init_task_t tasks[CONFIG_INIT_TASKS]; |
} init_t; |
65,14 → 63,14 |
} ballocs_t; |
typedef struct { |
size_t cpu_count; /**< Number of processors detected. */ |
volatile size_t cpu_active; /**< Number of processors that are up and running. */ |
count_t cpu_count; /**< Number of processors detected. */ |
volatile count_t cpu_active; /**< Number of processors that are up and running. */ |
uintptr_t base; |
size_t kernel_size; /**< Size of memory in bytes taken by kernel and stack */ |
size_t kernel_size; /**< Size of memory in bytes taken by kernel and stack */ |
uintptr_t stack_base; /**< Base adddress of initial stack */ |
size_t stack_size; /**< Size of initial stack */ |
uintptr_t stack_base; /**< Base adddress of initial stack */ |
size_t stack_size; /**< Size of initial stack */ |
} config_t; |
extern config_t config; |
/branches/arm/kernel/generic/include/synch/spinlock.h |
---|
36,7 → 36,6 |
#define KERN_SPINLOCK_H_ |
#include <arch/types.h> |
#include <arch/barrier.h> |
#include <preemption.h> |
#include <atomic.h> |
#include <debug.h> |
107,7 → 106,7 |
extern int printf(const char *, ...); |
#define DEADLOCK_THRESHOLD 100000000 |
#define DEADLOCK_PROBE_INIT(pname) size_t pname = 0 |
#define DEADLOCK_PROBE_INIT(pname) count_t pname = 0 |
#define DEADLOCK_PROBE(pname, value) \ |
if ((pname)++ > (value)) { \ |
(pname) = 0; \ |
/branches/arm/kernel/generic/include/synch/futex.h |
---|
49,7 → 49,7 |
/** Futex hash table link. */ |
link_t ht_link; |
/** Number of tasks that reference this futex. */ |
size_t refcount; |
count_t refcount; |
} futex_t; |
extern void futex_init(void); |
/branches/arm/kernel/generic/include/synch/rwlock.h |
---|
53,7 → 53,7 |
*/ |
mutex_t exclusive; |
/** Number of readers in critical section. */ |
size_t readers_in; |
count_t readers_in; |
} rwlock_t; |
#define rwlock_write_lock(rwl) \ |
/branches/arm/kernel/generic/include/memstr.h |
---|
44,7 → 44,7 |
extern void *_memcpy(void *dst, const void *src, size_t cnt); |
extern void _memsetb(void *dst, size_t cnt, uint8_t x); |
extern void _memsetw(void *dst, size_t cnt, uint16_t x); |
extern void *memmove(void *dst, const void *src, size_t cnt); |
extern char *strcpy(char *dest, const char *src); |
#endif |
/branches/arm/kernel/generic/include/typedefs.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
51,12 → 51,6 |
typedef int32_t inr_t; |
typedef int32_t devno_t; |
typedef int32_t wchar_t; |
typedef volatile uint8_t ioport8_t; |
typedef volatile uint16_t ioport16_t; |
typedef volatile uint32_t ioport32_t; |
#endif |
/** @} |
/branches/arm/kernel/generic/include/console/console.h |
---|
38,26 → 38,17 |
#include <arch/types.h> |
#include <console/chardev.h> |
extern indev_t *stdin; |
extern outdev_t *stdout; |
extern bool silent; |
extern chardev_t *stdin; |
extern chardev_t *stdout; |
extern indev_t *stdin_wire(void); |
extern void console_init(void); |
extern void klog_init(void); |
extern void klog_update(void); |
extern wchar_t getc(indev_t *indev); |
extern size_t gets(indev_t *indev, char *buf, size_t buflen); |
extern unative_t sys_klog(int fd, const void *buf, size_t size); |
extern uint8_t getc(chardev_t *chardev); |
uint8_t _getc(chardev_t *chardev); |
extern count_t gets(chardev_t *chardev, char *buf, size_t buflen); |
extern void putchar(char c); |
extern void grab_console(void); |
extern void release_console(void); |
extern unative_t sys_debug_enable_console(void); |
extern unative_t sys_debug_disable_console(void); |
extern void arch_grab_console(void); |
extern void arch_release_console(void); |
/branches/arm/kernel/generic/include/console/chardev.h |
---|
39,63 → 39,41 |
#include <synch/waitq.h> |
#include <synch/spinlock.h> |
#define INDEV_BUFLEN 512 |
#define CHARDEV_BUFLEN 512 |
struct indev; |
struct chardev; |
/* Input character device operations interface. */ |
/* Character device operations interface. */ |
typedef struct { |
/** Suspend pushing characters. */ |
void (* suspend)(struct chardev *); |
/** Resume pushing characters. */ |
void (* resume)(struct chardev *); |
/** Write character to stream. */ |
void (* write)(struct chardev *, char c); |
/** Read character directly from device, assume interrupts disabled. */ |
wchar_t (* poll)(struct indev *); |
} indev_operations_t; |
char (* read)(struct chardev *); |
} chardev_operations_t; |
/** Character input device. */ |
typedef struct indev { |
typedef struct chardev { |
char *name; |
waitq_t wq; |
/** Protects everything below. */ |
SPINLOCK_DECLARE(lock); |
wchar_t buffer[INDEV_BUFLEN]; |
size_t counter; |
/** Implementation of indev operations. */ |
indev_operations_t *op; |
size_t index; |
SPINLOCK_DECLARE(lock); |
uint8_t buffer[CHARDEV_BUFLEN]; |
count_t counter; |
/** Implementation of chardev operations. */ |
chardev_operations_t *op; |
index_t index; |
void *data; |
} indev_t; |
} chardev_t; |
extern void chardev_initialize(char *name, chardev_t *chardev, |
chardev_operations_t *op); |
extern void chardev_push_character(chardev_t *chardev, uint8_t ch); |
struct outdev; |
/* Output character device operations interface. */ |
typedef struct { |
/** Write character to output. */ |
void (* write)(struct outdev *, wchar_t, bool); |
} outdev_operations_t; |
/** Character input device. */ |
typedef struct outdev { |
char *name; |
/** Protects everything below. */ |
SPINLOCK_DECLARE(lock); |
/** Implementation of outdev operations. */ |
outdev_operations_t *op; |
void *data; |
} outdev_t; |
extern void indev_initialize(char *name, indev_t *indev, |
indev_operations_t *op); |
extern void indev_push_character(indev_t *indev, wchar_t ch); |
extern wchar_t indev_pop_character(indev_t *indev); |
extern void outdev_initialize(char *name, outdev_t *outdev, |
outdev_operations_t *op); |
extern bool check_poll(indev_t *indev); |
#endif /* KERN_CHARDEV_H_ */ |
/** @} |
/branches/arm/kernel/generic/include/console/kconsole.h |
---|
37,10 → 37,9 |
#include <adt/list.h> |
#include <synch/spinlock.h> |
#include <ipc/irq.h> |
#define MAX_CMDLINE 256 |
#define KCONSOLE_HISTORY 10 |
#define MAX_CMDLINE 256 |
#define KCONSOLE_HISTORY 10 |
typedef enum { |
ARG_TYPE_INVALID = 0, |
47,7 → 46,7 |
ARG_TYPE_INT, |
ARG_TYPE_STRING, |
/** Variable type - either symbol or string. */ |
ARG_TYPE_VAR |
ARG_TYPE_VAR |
} cmd_arg_type_t; |
/** Structure representing one argument of kconsole command line. */ |
77,7 → 76,7 |
/** Function implementing the command. */ |
int (* func)(cmd_arg_t *); |
/** Number of arguments. */ |
size_t argc; |
count_t argc; |
/** Argument vector. */ |
cmd_arg_t *argv; |
/** Function for printing detailed help. */ |
84,19 → 83,13 |
void (* help)(void); |
} cmd_info_t; |
extern bool kconsole_notify; |
extern irq_t kconsole_irq; |
SPINLOCK_EXTERN(cmd_lock); |
extern link_t cmd_head; |
extern void kconsole_init(void); |
extern void kconsole_notify_init(void); |
extern bool kconsole_check_poll(void); |
extern void kconsole(char *prompt, char *msg, bool kcon); |
extern void kconsole_thread(void *data); |
extern void kconsole(void *prompt); |
extern bool cmd_register(cmd_info_t *cmd); |
extern int cmd_register(cmd_info_t *cmd); |
#endif |
/branches/arm/kernel/generic/include/interrupt.h |
---|
44,12 → 44,12 |
typedef void (* iroutine)(int n, istate_t *istate); |
#define fault_if_from_uspace(istate, fmt, ...) \ |
#define fault_if_from_uspace(istate, cmd, ...) \ |
{ \ |
if (istate_from_uspace(istate)) { \ |
task_t *task = TASK; \ |
printf("Task %s (%" PRIu64 ") killed due to an exception at %p: ", task->name, task->taskid, istate_get_pc(istate)); \ |
printf(fmt "\n", ##__VA_ARGS__); \ |
printf("Task %" PRIu64 " killed due to an exception at %p.", task->taskid, istate_get_pc(istate)); \ |
printf(" " cmd, ##__VA_ARGS__); \ |
task_kill(task->taskid); \ |
thread_exit(); \ |
} \ |
/branches/arm/kernel/generic/include/ddi/device.h |
---|
39,7 → 39,6 |
#include <typedefs.h> |
extern devno_t device_assign_devno(void); |
extern unative_t sys_device_assign_devno(void); |
#endif |
/branches/arm/kernel/generic/include/ddi/irq.h |
---|
36,16 → 36,18 |
#define KERN_IRQ_H_ |
typedef enum { |
CMD_PIO_READ_8 = 1, |
CMD_PIO_READ_16, |
CMD_PIO_READ_32, |
CMD_PIO_WRITE_8, |
CMD_PIO_WRITE_16, |
CMD_PIO_WRITE_32, |
CMD_BTEST, |
CMD_PREDICATE, |
CMD_ACCEPT, |
CMD_DECLINE, |
CMD_MEM_READ_1 = 0, |
CMD_MEM_READ_2, |
CMD_MEM_READ_4, |
CMD_MEM_READ_8, |
CMD_MEM_WRITE_1, |
CMD_MEM_WRITE_2, |
CMD_MEM_WRITE_4, |
CMD_MEM_WRITE_8, |
CMD_PORT_READ_1, |
CMD_PORT_WRITE_1, |
CMD_IA64_GETCHAR, |
CMD_PPC32_GETCHAR, |
CMD_LAST |
} irq_cmd_type; |
52,9 → 54,8 |
typedef struct { |
irq_cmd_type cmd; |
void *addr; |
unsigned long long value; |
unsigned int srcarg; |
unsigned int dstarg; |
unsigned long long value; |
int dstarg; |
} irq_cmd_t; |
typedef struct { |
66,10 → 67,8 |
#include <arch/types.h> |
#include <adt/list.h> |
#include <adt/hash_table.h> |
#include <synch/spinlock.h> |
#include <proc/task.h> |
#include <ipc/ipc.h> |
typedef enum { |
IRQ_DECLINE, /**< Decline to service. */ |
82,11 → 81,8 |
} irq_trigger_t; |
struct irq; |
typedef void (* irq_handler_t)(struct irq *); |
typedef void (* irq_handler_t)(struct irq *irq, void *arg, ...); |
/** Type for function used to clear the interrupt. */ |
typedef void (* cir_t)(void *, inr_t); |
/** IPC notification config structure. |
* |
* Primarily, this structure is encapsulated in the irq_t structure. |
99,12 → 95,10 |
answerbox_t *answerbox; |
/** Method to be used for the notification. */ |
unative_t method; |
/** Arguments that will be sent if the IRQ is claimed. */ |
unative_t scratch[IPC_CALL_LEN]; |
/** Top-half pseudocode. */ |
irq_code_t *code; |
/** Counter. */ |
size_t counter; |
count_t counter; |
/** |
* Link between IRQs that are notifying the same answerbox. The list is |
* protected by the answerbox irq_lock. |
144,29 → 138,22 |
/** Trigger level of the IRQ. */ |
irq_trigger_t trigger; |
/** Claim ownership of the IRQ. */ |
irq_ownership_t (* claim)(struct irq *); |
irq_ownership_t (* claim)(void); |
/** Handler for this IRQ and device. */ |
irq_handler_t handler; |
/** Instance argument for the handler and the claim function. */ |
void *instance; |
/** Argument for the handler. */ |
void *arg; |
/** Clear interrupt routine. */ |
cir_t cir; |
/** First argument to the clear interrupt routine. */ |
void *cir_arg; |
/** Notification configuration structure. */ |
ipc_notif_cfg_t notif_cfg; |
} irq_t; |
SPINLOCK_EXTERN(irq_uspace_hash_table_lock); |
extern hash_table_t irq_uspace_hash_table; |
extern void irq_init(count_t inrs, count_t chains); |
extern void irq_initialize(irq_t *irq); |
extern void irq_register(irq_t *irq); |
extern irq_t *irq_dispatch_and_lock(inr_t inr); |
extern irq_t *irq_find_and_lock(inr_t inr, devno_t devno); |
extern void irq_init(size_t, size_t); |
extern void irq_initialize(irq_t *); |
extern void irq_register(irq_t *); |
extern irq_t *irq_dispatch_and_lock(inr_t); |
#endif |
#endif |
/branches/arm/kernel/generic/include/ddi/ddi.h |
---|
38,14 → 38,13 |
#include <ddi/ddi_arg.h> |
#include <arch/types.h> |
#include <proc/task.h> |
#include <adt/list.h> |
/** Structure representing contiguous physical memory area. */ |
typedef struct { |
uintptr_t pbase; /**< Physical base of the area. */ |
pfn_t frames; /**< Number of frames in the area. */ |
link_t link; /**< Linked list link */ |
uintptr_t pbase; /**< Physical base of the area. */ |
uintptr_t vbase; /**< Virtual base of the area. */ |
count_t frames; /**< Number of frames in the area. */ |
bool cacheable; /**< Cacheability. */ |
} parea_t; |
extern void ddi_init(void); |
/branches/arm/kernel/generic/include/adt/hash_table.h |
---|
47,7 → 47,7 |
* |
* @return Index into hash table. |
*/ |
size_t (* hash)(unative_t key[]); |
index_t (* hash)(unative_t key[]); |
/** Hash table item comparison function. |
* |
56,7 → 56,7 |
* |
* @return true if the keys match, false otherwise. |
*/ |
bool (*compare)(unative_t key[], size_t keys, link_t *item); |
bool (*compare)(unative_t key[], count_t keys, link_t *item); |
/** Hash table item removal callback. |
* |
68,8 → 68,8 |
/** Hash table structure. */ |
typedef struct { |
link_t *entry; |
size_t entries; |
size_t max_keys; |
count_t entries; |
count_t max_keys; |
hash_table_operations_t *op; |
} hash_table_t; |
76,11 → 76,11 |
#define hash_table_get_instance(item, type, member) \ |
list_get_instance((item), type, member) |
extern void hash_table_create(hash_table_t *h, size_t m, size_t max_keys, |
extern void hash_table_create(hash_table_t *h, count_t m, count_t max_keys, |
hash_table_operations_t *op); |
extern void hash_table_insert(hash_table_t *h, unative_t key[], link_t *item); |
extern link_t *hash_table_find(hash_table_t *h, unative_t key[]); |
extern void hash_table_remove(hash_table_t *h, unative_t key[], size_t keys); |
extern void hash_table_remove(hash_table_t *h, unative_t key[], count_t keys); |
#endif |
/branches/arm/kernel/generic/include/adt/btree.h |
---|
46,7 → 46,7 |
/** B-tree node structure. */ |
typedef struct btree_node { |
/** Number of keys. */ |
size_t keys; |
count_t keys; |
/** |
* Keys. We currently support only single keys. Additional room for one |
/branches/arm/kernel/generic/include/adt/fifo.h |
---|
59,9 → 59,9 |
#define FIFO_INITIALIZE_STATIC(name, t, itms) \ |
struct { \ |
t fifo[(itms)]; \ |
size_t items; \ |
size_t head; \ |
size_t tail; \ |
count_t items; \ |
index_t head; \ |
index_t tail; \ |
} name = { \ |
.items = (itms), \ |
.head = 0, \ |
80,9 → 80,9 |
#define FIFO_INITIALIZE_DYNAMIC(name, t, itms) \ |
struct { \ |
t *fifo; \ |
size_t items; \ |
size_t head; \ |
size_t tail; \ |
count_t items; \ |
index_t head; \ |
index_t tail; \ |
} name = { \ |
.fifo = NULL, \ |
.items = (itms), \ |
/branches/arm/kernel/generic/include/adt/bitmap.h |
---|
41,23 → 41,14 |
typedef struct { |
uint8_t *map; |
size_t bits; |
count_t bits; |
} bitmap_t; |
extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, size_t bits); |
extern void bitmap_set_range(bitmap_t *bitmap, size_t start, size_t bits); |
extern void bitmap_clear_range(bitmap_t *bitmap, size_t start, size_t bits); |
extern void bitmap_copy(bitmap_t *dst, bitmap_t *src, size_t bits); |
extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits); |
extern void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits); |
extern void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits); |
extern void bitmap_copy(bitmap_t *dst, bitmap_t *src, count_t bits); |
static inline int bitmap_get(bitmap_t *bitmap, size_t bit) |
{ |
if(bit >= bitmap->bits) |
return 0; |
return !! ((bitmap->map)[bit/8] & (1 << (bit & 7))); |
} |
#endif |
/** @} |
/branches/arm/kernel/generic/include/debug.h |
---|
57,21 → 57,21 |
#ifdef CONFIG_DEBUG |
# define ASSERT(expr) \ |
if (!(expr)) { \ |
panic("Assertion failed (%s), caller=%p.", #expr, CALLER); \ |
panic("assertion failed (%s), caller=%p\n", #expr, CALLER); \ |
} |
#else |
# define ASSERT(expr) |
#endif |
/** Extensive logging output macro |
/** Extensive debugging output macro |
* |
* If CONFIG_LOG is set, the LOG() macro |
* If CONFIG_EDEBUG is set, the LOG() macro |
* will print whatever message is indicated plus |
* an information about the location. |
* |
*/ |
#ifdef CONFIG_LOG |
#ifdef CONFIG_EDEBUG |
# define LOG(format, ...) \ |
printf("%s() at %s:%u: " format "\n", __func__, __FILE__, \ |
__LINE__, ##__VA_ARGS__); |
79,15 → 79,15 |
# define LOG(format, ...) |
#endif |
/** Extensive logging execute macro |
/** Extensive debugging execute macro |
* |
* If CONFIG_LOG is set, the LOG_EXEC() macro |
* If CONFIG_EDEBUG is set, the LOG_EXEC() macro |
* will print an information about calling a given |
* function and call it. |
* |
*/ |
#ifdef CONFIG_LOG |
#ifdef CONFIG_EDEBUG |
# define LOG_EXEC(fnc) \ |
{ \ |
printf("%s() at %s:%u: " #fnc "\n", __func__, __FILE__, \ |
/branches/arm/kernel/generic/include/panic.h |
---|
37,11 → 37,11 |
#ifdef CONFIG_DEBUG |
# define panic(format, ...) \ |
panic_printf("Kernel panic in %s() at %s:%u: " format "\n", \ |
__func__, __FILE__, __LINE__, ##__VA_ARGS__); |
panic_printf("Kernel panic in %s() at %s:%u: " format, __func__, \ |
__FILE__, __LINE__, ##__VA_ARGS__); |
#else |
# define panic(format, ...) \ |
panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); |
panic_printf("Kernel panic: " format, ##__VA_ARGS__); |
#endif |
extern void panic_printf(char *fmt, ...) __attribute__((noreturn)); |
/branches/arm/kernel/generic/include/byteorder.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
35,48 → 35,32 |
#ifndef KERN_BYTEORDER_H_ |
#define KERN_BYTEORDER_H_ |
#include <arch/types.h> |
#include <arch/byteorder.h> |
#if !(defined(__BE__) ^ defined(__LE__)) |
#error The architecture must be either big-endian or little-endian. |
#if !(defined(ARCH_IS_BIG_ENDIAN) ^ defined(ARCH_IS_LITTLE_ENDIAN)) |
#error The architecture must be either big-endian or little-endian. |
#endif |
#ifdef __BE__ |
#ifdef ARCH_IS_BIG_ENDIAN |
#define uint16_t_le2host(n) (uint16_t_byteorder_swap(n)) |
#define uint32_t_le2host(n) (uint32_t_byteorder_swap(n)) |
#define uint64_t_le2host(n) (uint64_t_byteorder_swap(n)) |
#define uint16_t_le2host(n) uint16_t_byteorder_swap(n) |
#define uint32_t_le2host(n) uint32_t_byteorder_swap(n) |
#define uint64_t_le2host(n) uint64_t_byteorder_swap(n) |
#define uint16_t_be2host(n) (n) |
#define uint32_t_be2host(n) (n) |
#define uint64_t_be2host(n) (n) |
#define uint16_t_be2host(n) (n) |
#define uint32_t_be2host(n) (n) |
#define uint64_t_be2host(n) (n) |
#define host2uint16_t_le(n) (uint16_t_byteorder_swap(n)) |
#define host2uint32_t_le(n) (uint32_t_byteorder_swap(n)) |
#define host2uint64_t_le(n) (uint64_t_byteorder_swap(n)) |
#define host2uint16_t_be(n) (n) |
#define host2uint32_t_be(n) (n) |
#define host2uint64_t_be(n) (n) |
#else |
#define uint16_t_le2host(n) (n) |
#define uint32_t_le2host(n) (n) |
#define uint64_t_le2host(n) (n) |
#define uint16_t_le2host(n) (n) |
#define uint32_t_le2host(n) (n) |
#define uint64_t_le2host(n) (n) |
#define uint16_t_be2host(n) (uint16_t_byteorder_swap(n)) |
#define uint32_t_be2host(n) (uint32_t_byteorder_swap(n)) |
#define uint64_t_be2host(n) (uint64_t_byteorder_swap(n)) |
#define uint16_t_be2host(n) uint16_t_byteorder_swap(n) |
#define uint32_t_be2host(n) uint32_t_byteorder_swap(n) |
#define uint64_t_be2host(n) uint64_t_byteorder_swap(n) |
#define host2uint16_t_le(n) (n) |
#define host2uint32_t_le(n) (n) |
#define host2uint64_t_le(n) (n) |
#define host2uint16_t_be(n) (uint16_t_byteorder_swap(n)) |
#define host2uint32_t_be(n) (uint32_t_byteorder_swap(n)) |
#define host2uint64_t_be(n) (uint64_t_byteorder_swap(n)) |
#endif |
static inline uint64_t uint64_t_byteorder_swap(uint64_t n) |
/branches/arm/kernel/generic/include/arch.h |
---|
56,7 → 56,7 |
* the base address of the stack. |
*/ |
typedef struct { |
size_t preemption_disabled; /**< Preemption disabled counter. */ |
count_t preemption_disabled; /**< Preemption disabled counter. */ |
thread_t *thread; /**< Current thread. */ |
task_t *task; /**< Current task. */ |
cpu_t *cpu; /**< Executing cpu. */ |
63,11 → 63,12 |
as_t *as; /**< Current address space. */ |
} the_t; |
#define THE ((the_t * )(get_stack_base())) |
#define THE ((the_t *)(get_stack_base())) |
extern void the_initialize(the_t *the); |
extern void the_copy(the_t *src, the_t *dst); |
extern void arch_pre_main(void); |
extern void arch_pre_mm_init(void); |
extern void arch_post_mm_init(void); |
extern void arch_post_cpu_init(void); |
78,7 → 79,6 |
extern void reboot(void); |
extern void arch_reboot(void); |
extern void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller); |
#endif |
/branches/arm/kernel/generic/include/print.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
46,9 → 46,11 |
extern int puts(const char *s); |
extern int printf(const char *fmt, ...); |
extern int sprintf(char *str, const char *fmt, ...); |
extern int snprintf(char *str, size_t size, const char *fmt, ...); |
extern int vprintf(const char *fmt, va_list ap); |
extern int vsprintf(char *str, const char *fmt, va_list ap); |
extern int vsnprintf(char *str, size_t size, const char *fmt, va_list ap); |
#endif |
/branches/arm/kernel/generic/include/printf/printf_core.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
35,23 → 35,20 |
#ifndef KERN_PRINTF_CORE_H_ |
#define KERN_PRINTF_CORE_H_ |
#include <typedefs.h> |
#include <arch/types.h> |
#include <arch/arg.h> |
/** Structure for specifying output methods for different printf clones. */ |
typedef struct { |
/* String output function, returns number of printed characters or EOF */ |
int (*str_write)(const char *, size_t, void *); |
/* Wide string output function, returns number of printed characters or EOF */ |
int (*wstr_write)(const wchar_t *, size_t, void *); |
/* User data - output stream specification, state, locks, etc. */ |
struct printf_spec { |
/* Output function, returns count of printed characters or EOF */ |
int (*write)(void *, size_t, void *); |
/* Support data - output stream specification, its state, locks,... */ |
void *data; |
} printf_spec_t; |
int printf_core(const char *fmt, printf_spec_t *ps, va_list ap); |
}; |
int printf_core(const char *fmt, struct printf_spec *ps, va_list ap); |
#endif |
/** @} |
/branches/arm/kernel/generic/include/cpu.h |
---|
51,18 → 51,18 |
SPINLOCK_DECLARE(lock); |
tlb_shootdown_msg_t tlb_messages[TLB_MESSAGE_QUEUE_LEN]; |
size_t tlb_messages_count; |
count_t tlb_messages_count; |
context_t saved_context; |
atomic_t nrdy; |
runq_t rq[RQ_COUNT]; |
volatile size_t needs_relink; |
volatile count_t needs_relink; |
SPINLOCK_DECLARE(timeoutlock); |
link_t timeout_active_head; |
size_t missed_clock_ticks; /**< When system clock loses a tick, it is recorded here |
count_t missed_clock_ticks; /**< When system clock loses a tick, it is recorded here |
so that clock() can react. This variable is |
CPU-local and can be only accessed when interrupts |
are disabled. */ |
/branches/arm/kernel/generic/include/func.h |
---|
41,6 → 41,11 |
extern atomic_t haltstate; |
extern void halt(void); |
extern size_t strlen(const char *str); |
extern int strcmp(const char *src, const char *dst); |
extern int strncmp(const char *src, const char *dst, size_t len); |
extern void strncpy(char *dest, const char *src, size_t len); |
extern unative_t atoi(const char *text); |
extern void order(const uint64_t val, uint64_t *rv, char *suffix); |
/branches/arm/kernel/generic/include/fpu_context.h |
---|
37,6 → 37,10 |
#include <arch/fpu_context.h> |
#if defined(CONFIG_FPU_LAZY) && !defined(ARCH_HAS_FPU) |
# error "CONFIG_FPU_LAZY defined, but no ARCH_HAS_FPU" |
#endif |
extern void fpu_context_save(fpu_context_t *); |
extern void fpu_context_restore(fpu_context_t *); |
extern void fpu_init(void); |
/branches/arm/kernel/generic/include/main/main.h |
---|
35,13 → 35,8 |
#ifndef KERN_MAIN_H_ |
#define KERN_MAIN_H_ |
#include <arch/types.h> |
extern uintptr_t stack_safe; |
extern void main_bsp(void); |
extern void main_ap(void); |
#endif |
/** @} |
/branches/arm/kernel/generic/include/context.h |
---|
45,7 → 45,7 |
(c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; |
#endif /* context_set */ |
extern int context_save_arch(context_t *c) __attribute__ ((returns_twice)); |
extern int context_save_arch(context_t *c); |
extern void context_restore_arch(context_t *c) __attribute__ ((noreturn)); |
/** Save register context. |
76,6 → 76,10 |
* corresponding call to context_save(), the only |
* difference being return value. |
* |
* Note that content of any local variable defined by |
* the caller of context_save() is undefined after |
* context_restore(). |
* |
* @param c Context structure. |
*/ |
static inline void context_restore(context_t *c) |
/branches/arm/kernel/generic/include/align.h |
---|
26,13 → 26,13 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @ingroup others |
* @{ |
*/ |
/** |
* @file |
* @brief Macros for making values and addresses aligned. |
* @brief Macros for making values and addresses aligned. |
*/ |
#ifndef KERN_ALIGN_H_ |
43,7 → 43,7 |
* @param s Address or size to be aligned. |
* @param a Size of alignment, must be power of 2. |
*/ |
#define ALIGN_DOWN(s, a) ((s) & ~((a) - 1)) |
#define ALIGN_DOWN(s, a) ((s) & ~((a) - 1)) |
/** Align to the nearest higher address. |
51,7 → 51,7 |
* @param s Address or size to be aligned. |
* @param a Size of alignment, must be power of 2. |
*/ |
#define ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1)) |
#define ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1)) |
#endif |
/branches/arm/kernel/generic/include/symtab.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
44,20 → 44,15 |
char symbol_name[MAX_SYMBOL_NAME]; |
}; |
extern int symtab_name_lookup(unative_t addr, char **name); |
extern char *symtab_fmt_name_lookup(unative_t addr); |
extern int symtab_addr_lookup(const char *name, uintptr_t *addr); |
extern char * get_symtab_entry(unative_t addr); |
extern uintptr_t get_symbol_addr(const char *name); |
extern void symtab_print_search(const char *name); |
extern int symtab_compl(char *input, size_t size); |
extern int symtab_compl(char *name); |
#ifdef CONFIG_SYMTAB |
/* Symtable linked together by build process */ |
extern struct symtab_entry symbol_table[]; |
#endif |
#endif |
/** @} |
*/ |
/branches/arm/kernel/generic/include/sysinfo/sysinfo.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
36,7 → 36,6 |
#define KERN_SYSINFO_H_ |
#include <arch/types.h> |
#include <string.h> |
typedef union sysinfo_item_val { |
unative_t val; |
60,13 → 59,13 |
int subinfo_type; |
} sysinfo_item_t; |
#define SYSINFO_VAL_VAL 0 |
#define SYSINFO_VAL_FUNCTION 1 |
#define SYSINFO_VAL_UNDEFINED U_SPECIAL |
#define SYSINFO_VAL_VAL 0 |
#define SYSINFO_VAL_FUNCTION 1 |
#define SYSINFO_VAL_UNDEFINED '?' |
#define SYSINFO_SUBINFO_NONE 0 |
#define SYSINFO_SUBINFO_TABLE 1 |
#define SYSINFO_SUBINFO_FUNCTION 2 |
#define SYSINFO_SUBINFO_NONE 0 |
#define SYSINFO_SUBINFO_TABLE 1 |
#define SYSINFO_SUBINFO_FUNCTION 2 |
typedef unative_t (*sysinfo_val_fn_t)(sysinfo_item_t *root); |
typedef unative_t (*sysinfo_subinfo_fn_t)(const char *subname); |
/branches/arm/kernel/generic/include/putchar.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
35,7 → 35,7 |
#ifndef KERN_PUTCHAR_H_ |
#define KERN_PUTCHAR_H_ |
extern void putchar(const wchar_t ch); |
extern void putchar(const char ch); |
#endif |
/branches/arm/kernel/generic/include/stdarg.h |
---|
45,7 → 45,7 |
#define va_start(ap, last) __builtin_va_start(ap, last) |
#define va_arg(ap, type) __builtin_va_arg(ap, type) |
#define va_end(ap) __builtin_va_end(ap) |
#define va_copy(dst, src) __builtin_va_copy(dst, src) |
#define va_copy(dst,src) __builtin_va_copy(dst,src) |
#endif |
/branches/arm/kernel/generic/include/sort.h |
---|
40,8 → 40,8 |
/* |
* sorting routines |
*/ |
extern void bubblesort(void * data, size_t n, size_t e_size, int (* cmp) (void * a, void * b)); |
extern void qsort(void * data, size_t n, size_t e_size, int (* cmp) (void * a, void * b)); |
extern void bubblesort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b)); |
extern void qsort(void * data, count_t n, size_t e_size, int (* cmp) (void * a, void * b)); |
/* |
* default sorting comparators |
/branches/arm/kernel/Makefile |
---|
30,28 → 30,23 |
## Include configuration |
# |
include ../version |
-include ../Makefile.config |
-include ../config.defs |
-include ../version |
-include Makefile.config |
INCLUDES = generic/include |
OPTIMIZATION = 3 |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
## Common compiler flags |
# |
DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__ |
DEFS = -D$(ARCH) -DARCH=\"$(ARCH)\" -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\"" \ |
-DKERNEL |
GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ |
-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \ |
-finput-charset=UTF-8 -fno-builtin -Wall -Wextra -Wno-unused-parameter \ |
-Wmissing-prototypes -Werror -nostdlib -nostdinc -pipe |
GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) \ |
-fno-builtin -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -Werror \ |
-nostdlib -nostdinc |
ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ |
ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) \ |
-fno-builtin -Wall -Wmissing-prototypes -Werror \ |
-nostdlib -nostdinc \ |
-wd170 |
63,7 → 58,15 |
LFLAGS = -M |
AFLAGS = |
-include arch/$(KARCH)/Makefile.inc |
ifdef REVISION |
DEFS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
DEFS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
-include arch/$(ARCH)/Makefile.inc |
-include genarch/Makefile.inc |
## The at-sign |
81,6 → 84,76 |
# |
SYMTAB_SECTION=".section symtab.data, \"a\", $(ATSIGN)progbits;" |
## Setup kernel configuration |
# |
ifeq ($(CONFIG_DEBUG),y) |
DEFS += -DCONFIG_DEBUG |
endif |
ifeq ($(CONFIG_EDEBUG),y) |
DEFS += -DCONFIG_EDEBUG |
endif |
ifeq ($(CONFIG_DEBUG_SPINLOCK),y) |
DEFS += -DCONFIG_DEBUG_SPINLOCK |
endif |
ifeq ($(CONFIG_DEBUG_AS_WATCHPOINT),y) |
DEFS += -DCONFIG_DEBUG_AS_WATCHPOINT |
endif |
ifeq ($(CONFIG_FPU_LAZY),y) |
DEFS += -DCONFIG_FPU_LAZY |
endif |
ifeq ($(CONFIG_DEBUG_ALLREGS),y) |
DEFS += -DCONFIG_DEBUG_ALLREGS |
endif |
ifeq ($(CONFIG_VHPT),y) |
DEFS += -DCONFIG_VHPT |
endif |
ifeq ($(CONFIG_TSB),y) |
DEFS += -DCONFIG_TSB |
endif |
ifeq ($(CONFIG_Z8530),y) |
DEFS += -DCONFIG_Z8530 |
endif |
ifeq ($(CONFIG_NS16550),y) |
DEFS += -DCONFIG_NS16550 |
endif |
ifeq ($(CONFIG_VIRT_IDX_DCACHE),y) |
DEFS += -DCONFIG_VIRT_IDX_DCACHE |
endif |
ifeq ($(CONFIG_FB),y) |
ifeq ($(ARCH),ia32) |
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH) |
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT) |
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP) |
endif |
ifeq ($(ARCH),amd64) |
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH) |
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT) |
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP) |
endif |
ifeq ($(ARCH),ia32xen) |
DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH) |
DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT) |
DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP) |
endif |
endif |
ifeq ($(CONFIG_UDEBUG),y) |
DEFS += -DCONFIG_UDEBUG |
endif |
## Simple detection for the type of the host system |
# |
HOST = $(shell uname) |
105,7 → 178,6 |
OBJDUMP = $(BINUTILS_PREFIX)objdump |
LIBDIR = /usr/lib |
CFLAGS = $(GCC_CFLAGS) |
DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
endif |
ifeq ($(COMPILER),icc_native) |
117,7 → 189,6 |
OBJDUMP = objdump |
LIBDIR = /usr/lib |
CFLAGS = $(ICC_CFLAGS) |
DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
endif |
ifeq ($(COMPILER),suncc_native) |
129,8 → 200,6 |
OBJDUMP = $(BINUTILS_PREFIX)objdump |
LIBDIR = /usr/lib |
CFLAGS = $(SUNCC_CFLAGS) |
DEFS += $(CONFIG_DEFS) |
DEPEND_DEFS = $(DEFS) |
endif |
ifeq ($(COMPILER),gcc_cross) |
142,7 → 211,6 |
OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump |
LIBDIR = $(TOOLCHAIN_DIR)/lib |
CFLAGS = $(GCC_CFLAGS) |
DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
endif |
## Generic kernel sources |
156,11 → 224,12 |
generic/src/adt/list.c \ |
generic/src/console/chardev.c \ |
generic/src/console/console.c \ |
generic/src/console/kconsole.c \ |
generic/src/console/cmd.c \ |
generic/src/cpu/cpu.c \ |
generic/src/ddi/ddi.c \ |
generic/src/ddi/irq.c \ |
generic/src/ddi/device.c \ |
generic/src/debug/symtab.c \ |
generic/src/interrupt/interrupt.c \ |
generic/src/main/main.c \ |
generic/src/main/kinit.c \ |
187,14 → 256,16 |
generic/src/lib/func.c \ |
generic/src/lib/memstr.c \ |
generic/src/lib/sort.c \ |
generic/src/lib/string.c \ |
generic/src/lib/elf.c \ |
generic/src/lib/rd.c \ |
generic/src/printf/printf_core.c \ |
generic/src/printf/printf.c \ |
generic/src/printf/sprintf.c \ |
generic/src/printf/snprintf.c \ |
generic/src/printf/vprintf.c \ |
generic/src/printf/vsprintf.c \ |
generic/src/printf/vsnprintf.c \ |
generic/src/debug/symtab.c \ |
generic/src/time/clock.c \ |
generic/src/time/timeout.c \ |
generic/src/time/delay.c \ |
213,19 → 284,9 |
generic/src/ipc/sysipc.c \ |
generic/src/ipc/ipcrsc.c \ |
generic/src/ipc/irq.c \ |
generic/src/ipc/event.c \ |
generic/src/security/cap.c \ |
generic/src/sysinfo/sysinfo.c |
## Kernel console support |
# |
ifeq ($(CONFIG_KCONSOLE),y) |
GENERIC_SOURCES += \ |
generic/src/console/kconsole.c \ |
generic/src/console/cmd.c |
endif |
## Udebug interface sources |
# |
241,6 → 302,7 |
# |
ifeq ($(CONFIG_TEST),y) |
DEFS += -DCONFIG_TEST |
CFLAGS += -Itest/ |
GENERIC_SOURCES += \ |
test/test.c \ |
247,12 → 309,17 |
test/atomic/atomic1.c \ |
test/btree/btree1.c \ |
test/avltree/avltree1.c \ |
test/debug/mips1.c \ |
test/fault/fault1.c \ |
test/fpu/fpu1.c \ |
test/fpu/sse1.c \ |
test/fpu/mips2.c \ |
test/mm/falloc1.c \ |
test/mm/falloc2.c \ |
test/mm/mapping1.c \ |
test/mm/slab1.c \ |
test/mm/slab2.c \ |
test/mm/purge1.c \ |
test/synch/rwlock1.c \ |
test/synch/rwlock2.c \ |
test/synch/rwlock3.c \ |
261,63 → 328,8 |
test/synch/semaphore1.c \ |
test/synch/semaphore2.c \ |
test/print/print1.c \ |
test/print/print2.c \ |
test/print/print3.c \ |
test/print/print4.c \ |
test/thread/thread1.c \ |
test/sysinfo/sysinfo1.c |
ifeq ($(KARCH),mips32) |
GENERIC_SOURCES += test/debug/mips1.c |
else |
GENERIC_SOURCES += test/debug/mips1_skip.c |
endif |
ifeq ($(KARCH),ia64) |
GENERIC_SOURCES += test/mm/purge1.c |
else |
GENERIC_SOURCES += test/mm/purge1_skip.c |
endif |
ifeq ($(CONFIG_FPU),y) |
ifeq ($(KARCH),ia32) |
TEST_FPU1 = y |
TEST_SSE1 = y |
GENERIC_SOURCES += test/fpu/fpu1_x86.c |
endif |
ifeq ($(KARCH),amd64) |
TEST_FPU1 = y |
TEST_SSE1 = y |
GENERIC_SOURCES += test/fpu/fpu1_x86.c |
endif |
ifeq ($(KARCH),ia64) |
TEST_FPU1 = y |
GENERIC_SOURCES += test/fpu/fpu1_ia64.c |
endif |
ifeq ($(KARCH),mips32) |
TEST_MIPS2 = y |
endif |
endif |
ifneq ($(TEST_FPU1),y) |
GENERIC_SOURCES += test/fpu/fpu1_skip.c |
endif |
ifeq ($(TEST_SSE1),y) |
GENERIC_SOURCES += test/fpu/sse1.c |
else |
GENERIC_SOURCES += test/fpu/sse1_skip.c |
endif |
ifeq ($(TEST_MIPS2),y) |
GENERIC_SOURCES += test/fpu/mips2.c |
else |
GENERIC_SOURCES += test/fpu/mips2_skip.c |
endif |
endif |
GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
324,54 → 336,49 |
ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) |
ifeq ($(CONFIG_SYMTAB),y) |
SYMTAB_OBJECTS := generic/src/debug/real_map.o |
else |
SYMTAB_OBJECTS := |
endif |
.PHONY: all build config distclean clean archlinks depend disasm |
.PHONY: all build clean archlinks depend disasm |
all: ../Makefile.config ../config.h ../config.defs |
-rm Makefile.depend |
all: |
../tools/config.py kernel.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG) $(MACHINE) |
$(MAKE) -C . build |
build: kernel.bin disasm |
config: |
-rm Makefile.depend |
../tools/config.py kernel.config |
-include Makefile.depend |
distclean: clean |
-rm Makefile.config |
clean: |
-rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend* generic/include/arch generic/include/genarch arch/$(KARCH)/_link.ld |
-rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend* generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld |
find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \; |
ifeq ($(PLATFORM),arm32) |
rm -rf arch/$(KARCH)/include/machine.h |
endif |
for arch in arch/* ; do \ |
[ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null ; \ |
done ; exit 0 |
archlinks: |
ln -sfn ../../arch/$(KARCH)/include/ generic/include/arch |
ln -sfn ../../arch/$(ARCH)/include/ generic/include/arch |
ln -sfn ../../genarch/include/ generic/include/genarch |
ifeq ($(PLATFORM),arm32) |
ln -sfn mach/$(MACHINE)/$(MACHINE).h arch/$(KARCH)/include/machine.h |
endif |
depend: archlinks |
-makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
arch/$(KARCH)/_link.ld: arch/$(KARCH)/_link.ld.in |
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
$(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@ |
generic/src/debug/real_map.bin: depend arch/$(KARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) |
generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) |
echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o generic/src/debug/empty_map.o |
$(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre |
$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre |
$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump |
tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin |
# Do it once again, this time to get correct even the symbols |
# on architectures, that have bss after symtab |
echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o generic/src/debug/sizeok_map.o |
$(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre |
$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre |
$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump |
tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin |
378,8 → 385,8 |
generic/src/debug/real_map.o: generic/src/debug/real_map.bin |
echo $(SYMTAB_SECTION)" .incbin \"$<\"" | $(AS) $(AFLAGS) -o $@ |
kernel.raw: depend arch/$(KARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(SYMTAB_OBJECTS) |
$(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) -o $@ -Map kernel.map |
kernel.raw: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o |
$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/real_map.o -o $@ -Map kernel.map |
kernel.bin: kernel.raw |
$(OBJCOPY) -O $(BFD) kernel.raw kernel.bin |
/branches/arm/kernel/kernel.config |
---|
0,0 → 1,171 |
# |
# Copyright (c) 2006 Ondrej Palkovsky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## General configuration directives |
# Architecture |
@ "amd64" AMD64/Intel EM64T |
@ "arm32" ARM 32-bit |
@ "ia32" Intel IA-32 |
@ "ia32xen" Intel IA-32 on Xen hypervisor |
@ "ia64" Intel IA-64 |
@ "mips32" MIPS 32-bit |
@ "ppc32" PowerPC 32-bit |
@ "ppc64" PowerPC 64-bit |
@ "sparc64" Sun UltraSPARC 64-bit |
! ARCH (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "icc_native" ICC Native |
@ "suncc_native" Sun Studio C Compiler |
! [ARCH=amd64|ARCH=ia32|ARCH=ia32xen] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "icc_native" ICC Native |
! [ARCH=ia64] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "suncc_native" Sun Studio C Compiler |
! [ARCH=sparc64] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
! [ARCH=arm32|ARCH=mips32|ARCH=ppc32|ARCH=ppc64] COMPILER (choice) |
# CPU type |
@ "pentium4" Pentium 4 |
@ "pentium3" Pentium 3 |
@ "core" Core Solo/Duo |
@ "athlon-xp" Athlon XP |
@ "athlon-mp" Athlon MP |
! [ARCH=ia32|ARCH=ia32xen] MACHINE (choice) |
# CPU type |
@ "opteron" Opteron |
! [ARCH=amd64] MACHINE (choice) |
# Machine type |
@ "msim" MSIM Simulator |
@ "simics" Virtutech Simics simulator |
@ "lgxemul" GXEmul Little Endian |
@ "bgxemul" GXEmul Big Endian |
! [ARCH=mips32] MACHINE (choice) |
# Framebuffer support |
! [(ARCH=mips32&MACHINE=lgxemul)|(ARCH=mips32&MACHINE=bgxemul)|(ARCH=ia32)|(ARCH=amd64)|(ARCH=arm32)] CONFIG_FB (y/n) |
# Framebuffer width |
@ "640" |
@ "800" |
@ "1024" |
@ "1152" |
@ "1280" |
@ "1400" |
@ "1440" |
@ "1600" |
@ "2048" |
! [(ARCH=ia32|ARCH=amd64)&CONFIG_FB=y] CONFIG_VESA_WIDTH (choice) |
# Framebuffer height |
@ "480" |
@ "600" |
@ "768" |
@ "852" |
@ "900" |
@ "960" |
@ "1024" |
@ "1050" |
@ "1200" |
@ "1536" |
! [(ARCH=ia32|ARCH=amd64)&CONFIG_FB=y] CONFIG_VESA_HEIGHT (choice) |
# Framebuffer depth |
@ "8" |
@ "16" |
@ "24" |
! [(ARCH=ia32|ARCH=amd64)&CONFIG_FB=y] CONFIG_VESA_BPP (choice) |
# Support for SMP |
! [ARCH=ia32|ARCH=amd64|ARCH=ia32xen|ARCH=sparc64] CONFIG_SMP (y/n) |
# Improved support for hyperthreading |
! [(ARCH=ia32|ARCH=amd64|ARCH=ia32xen)&CONFIG_SMP=y] CONFIG_HT (y/n) |
# Simics BIOS AP boot fix |
! [(ARCH=ia32|ARCH=amd64)&CONFIG_SMP=y] CONFIG_SIMICS_FIX (y/n) |
# Lazy FPU context switching |
! [(ARCH=mips32&MACHINE!=msim&MACHINE!=simics)|ARCH=amd64|ARCH=ia32|ARCH=ia64|ARCH=sparc64|ARCH=ia32xen] CONFIG_FPU_LAZY (y/n) |
# Use VHPT |
! [ARCH=ia64] CONFIG_VHPT (n/y) |
# Use TSB |
! [ARCH=sparc64] CONFIG_TSB (y/n) |
# Support for Z8530 serial port |
! [ARCH=sparc64] CONFIG_Z8530 (y/n) |
# Support for NS16550 serial port |
! [ARCH=sparc64] CONFIG_NS16550 (y/n) |
# Virtually indexed D-cache support |
! [ARCH=sparc64] CONFIG_VIRT_IDX_DCACHE (y/n) |
# Support for userspace debuggers |
! CONFIG_UDEBUG (n/y) |
## Debugging configuration directives |
# General debuging and assert checking |
! CONFIG_DEBUG (y/n) |
# Extensive debugging output |
! [CONFIG_DEBUG=y] CONFIG_EDEBUG (n/y) |
# Deadlock detection support for spinlocks |
! [CONFIG_DEBUG=y&CONFIG_SMP=y] CONFIG_DEBUG_SPINLOCK (y/n) |
# Watchpoint on rewriting AS with zero |
! [CONFIG_DEBUG=y&(ARCH=amd64|ARCH=ia32|ARCH=ia32xen)] CONFIG_DEBUG_AS_WATCHPOINT (y/n) |
# Save all interrupt registers |
! [CONFIG_DEBUG=y&(ARCH=amd64|ARCH=mips32|ARCH=ia32|ARCH=ia32xen)] CONFIG_DEBUG_ALLREGS (y/n) |
## Run-time configuration directives |
# Compile kernel tests |
! CONFIG_TEST (y/n) |
/branches/arm/kernel/doc/mm |
---|
5,10 → 5,10 |
1.1 Hierarchical 4-level per address space page tables |
SPARTAN kernel deploys generic interface for 4-level page tables for these |
architectures: amd64, arm32, ia32, mips32 and ppc32. In this setting, page |
tables are hierarchical and are not shared by address spaces (i.e. one set of |
page tables per address space). |
SPARTAN kernel deploys generic interface for 4-level page tables |
for these architectures: amd64, ia32, mips32 and ppc32. In this |
setting, page tables are hierarchical and are not shared by |
address spaces (i.e. one set of page tables per address space). |
VADDR |
/branches/arm/kernel/test/mm/purge1_skip.c |
---|
File deleted |
/branches/arm/kernel/test/mm/slab2.c |
---|
36,18 → 36,18 |
#include <synch/condvar.h> |
#include <synch/mutex.h> |
#define ITEM_SIZE 256 |
#define ITEM_SIZE 256 |
/** Fill memory with 2 caches, when allocation fails, |
* free one of the caches. We should have everything in magazines, |
* now allocation should clean magazines and allow for full allocation. |
*/ |
static void totalmemtest(void) |
static void totalmemtest(bool quiet) |
{ |
slab_cache_t *cache1; |
slab_cache_t *cache2; |
int i; |
void *data1, *data2; |
void *olddata1 = NULL, *olddata2 = NULL; |
54,7 → 54,8 |
cache1 = slab_cache_create("cache1_tst", ITEM_SIZE, 0, NULL, NULL, 0); |
cache2 = slab_cache_create("cache2_tst", ITEM_SIZE, 0, NULL, NULL, 0); |
TPRINTF("Allocating..."); |
if (!quiet) |
printf("Allocating..."); |
/* Use atomic alloc, so that we find end of memory */ |
do { |
73,12 → 74,13 |
*((void **) data2) = olddata2; |
olddata1 = data1; |
olddata2 = data2; |
} while (true); |
} while (1); |
TPRINTF("done.\n"); |
if (!quiet) { |
printf("done.\n"); |
printf("Deallocating cache2..."); |
} |
TPRINTF("Deallocating cache2..."); |
/* We do not have memory - now deallocate cache2 */ |
while (olddata2) { |
data2 = *((void **) olddata2); |
86,14 → 88,16 |
olddata2 = data2; |
} |
TPRINTF("done.\n"); |
if (!quiet) { |
printf("done.\n"); |
printf("Allocating to cache1...\n"); |
} |
TPRINTF("Allocating to cache1...\n"); |
for (i = 0; i < 30; i++) { |
data1 = slab_alloc(cache1, FRAME_ATOMIC); |
if (!data1) { |
TPRINTF("Incorrect memory size - use another test."); |
if (!quiet) |
printf("Incorrect memory size - use another test."); |
return; |
} |
memsetb(data1, ITEM_SIZE, 0); |
100,7 → 104,7 |
*((void **) data1) = olddata1; |
olddata1 = data1; |
} |
while (true) { |
while (1) { |
data1 = slab_alloc(cache1, FRAME_ATOMIC); |
if (!data1) |
break; |
109,7 → 113,8 |
olddata1 = data1; |
} |
TPRINTF("Deallocating cache1..."); |
if (!quiet) |
printf("Deallocating cache1..."); |
while (olddata1) { |
data1 = *((void **) olddata1); |
117,10 → 122,10 |
olddata1 = data1; |
} |
TPRINTF("done.\n"); |
if (!test_quiet) |
if (!quiet) { |
printf("done.\n"); |
slab_print_list(); |
} |
slab_cache_destroy(cache1); |
slab_cache_destroy(cache2); |
130,8 → 135,9 |
static semaphore_t thr_sem; |
static condvar_t thread_starter; |
static mutex_t starter_mutex; |
static bool sh_quiet; |
#define THREADS 8 |
#define THREADS 8 |
static void slabtest(void *priv) |
{ |
143,12 → 149,14 |
condvar_wait(&thread_starter,&starter_mutex); |
mutex_unlock(&starter_mutex); |
TPRINTF("Starting thread #%" PRIu64 "...\n", THREAD->tid); |
if (!sh_quiet) |
printf("Starting thread #%" PRIu64 "...\n", THREAD->tid); |
/* Alloc all */ |
TPRINTF("Thread #%" PRIu64 " allocating...\n", THREAD->tid); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " allocating...\n", THREAD->tid); |
while (true) { |
while (1) { |
/* Call with atomic to detect end of memory */ |
new = slab_alloc(thr_cache, FRAME_ATOMIC); |
if (!new) |
157,7 → 165,8 |
data = new; |
} |
TPRINTF("Thread #%" PRIu64 " releasing...\n", THREAD->tid); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " releasing...\n", THREAD->tid); |
while (data) { |
new = *((void **)data); |
166,9 → 175,10 |
data = new; |
} |
TPRINTF("Thread #%" PRIu64 " allocating...\n", THREAD->tid); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " allocating...\n", THREAD->tid); |
while (true) { |
while (1) { |
/* Call with atomic to detect end of memory */ |
new = slab_alloc(thr_cache, FRAME_ATOMIC); |
if (!new) |
177,7 → 187,8 |
data = new; |
} |
TPRINTF("Thread #%" PRIu64 " releasing...\n", THREAD->tid); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " releasing...\n", THREAD->tid); |
while (data) { |
new = *((void **)data); |
186,15 → 197,14 |
data = new; |
} |
TPRINTF("Thread #%" PRIu64 " finished\n", THREAD->tid); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " finished\n", THREAD->tid); |
if (!test_quiet) |
slab_print_list(); |
slab_print_list(); |
semaphore_up(&thr_sem); |
} |
static void multitest(int size) |
static void multitest(int size, bool quiet) |
{ |
/* Start 8 threads that just allocate as much as possible, |
* then release everything, then again allocate, then release |
202,42 → 212,48 |
thread_t *t; |
int i; |
TPRINTF("Running stress test with size %d\n", size); |
if (!quiet) |
printf("Running stress test with size %d\n", size); |
condvar_initialize(&thread_starter); |
mutex_initialize(&starter_mutex, MUTEX_PASSIVE); |
thr_cache = slab_cache_create("thread_cache", size, 0, NULL, NULL, 0); |
semaphore_initialize(&thr_sem,0); |
for (i = 0; i < THREADS; i++) { |
if (!(t = thread_create(slabtest, NULL, TASK, 0, "slabtest", false))) { |
TPRINTF("Could not create thread %d\n", i); |
if (!quiet) |
printf("Could not create thread %d\n", i); |
} else |
thread_ready(t); |
} |
thread_sleep(1); |
condvar_broadcast(&thread_starter); |
for (i = 0; i < THREADS; i++) |
semaphore_down(&thr_sem); |
slab_cache_destroy(thr_cache); |
TPRINTF("Stress test complete.\n"); |
if (!quiet) |
printf("Stress test complete.\n"); |
} |
char *test_slab2(void) |
char * test_slab2(bool quiet) |
{ |
TPRINTF("Running reclaim single-thread test .. pass 1\n"); |
totalmemtest(); |
sh_quiet = quiet; |
TPRINTF("Running reclaim single-thread test .. pass 2\n"); |
totalmemtest(); |
if (!quiet) |
printf("Running reclaim single-thread test .. pass 1\n"); |
totalmemtest(quiet); |
if (!quiet) |
printf("Running reclaim single-thread test .. pass 2\n"); |
totalmemtest(quiet); |
if (!quiet) |
printf("Reclaim test OK.\n"); |
TPRINTF("Reclaim test OK.\n"); |
multitest(128, quiet); |
multitest(2048, quiet); |
multitest(8192, quiet); |
multitest(128); |
multitest(2048); |
multitest(8192); |
return NULL; |
} |
/branches/arm/kernel/test/mm/slab1.c |
---|
33,21 → 33,23 |
#include <arch.h> |
#include <memstr.h> |
#define VAL_COUNT 1024 |
#define VAL_COUNT 1024 |
static void *data[VAL_COUNT]; |
static void * data[VAL_COUNT]; |
static void testit(int size, int count) |
static void testit(int size, int count, bool quiet) |
{ |
slab_cache_t *cache; |
int i; |
TPRINTF("Creating cache, object size: %d.\n", size); |
if (!quiet) |
printf("Creating cache, object size: %d.\n", size); |
cache = slab_cache_create("test_cache", size, 0, NULL, NULL, |
SLAB_CACHE_NOMAGAZINE); |
SLAB_CACHE_NOMAGAZINE); |
TPRINTF("Allocating %d items...", count); |
if (!quiet) |
printf("Allocating %d items...", count); |
for (i = 0; i < count; i++) { |
data[i] = slab_alloc(cache, 0); |
54,71 → 56,78 |
memsetb(data[i], size, 0); |
} |
TPRINTF("done.\n"); |
if (!quiet) { |
printf("done.\n"); |
printf("Freeing %d items...", count); |
} |
TPRINTF("Freeing %d items...", count); |
for (i = 0; i < count; i++) |
slab_free(cache, data[i]); |
TPRINTF("done.\n"); |
if (!quiet) { |
printf("done.\n"); |
printf("Allocating %d items...", count); |
} |
TPRINTF("Allocating %d items...", count); |
for (i = 0; i < count; i++) { |
data[i] = slab_alloc(cache, 0); |
memsetb(data[i], size, 0); |
} |
TPRINTF("done.\n"); |
if (!quiet) { |
printf("done.\n"); |
printf("Freeing %d items...", count / 2); |
} |
TPRINTF("Freeing %d items...", count / 2); |
for (i = count - 1; i >= count / 2; i--) |
slab_free(cache, data[i]); |
TPRINTF("done.\n"); |
if (!quiet) { |
printf("done.\n"); |
printf("Allocating %d items...", count / 2); |
} |
TPRINTF("Allocating %d items...", count / 2); |
for (i = count / 2; i < count; i++) { |
data[i] = slab_alloc(cache, 0); |
memsetb(data[i], size, 0); |
} |
TPRINTF("done.\n"); |
if (!quiet) { |
printf("done.\n"); |
printf("Freeing %d items...", count); |
} |
TPRINTF("Freeing %d items...", count); |
for (i = 0; i < count; i++) |
slab_free(cache, data[i]); |
TPRINTF("done.\n"); |
if (!quiet) |
printf("done.\n"); |
slab_cache_destroy(cache); |
TPRINTF("Test complete.\n"); |
if (!quiet) |
printf("Test complete.\n"); |
} |
static void testsimple(void) |
static void testsimple(bool quiet) |
{ |
testit(100, VAL_COUNT); |
testit(200, VAL_COUNT); |
testit(1024, VAL_COUNT); |
testit(2048, 512); |
testit(4000, 128); |
testit(8192, 128); |
testit(16384, 128); |
testit(16385, 128); |
testit(100, VAL_COUNT, quiet); |
testit(200, VAL_COUNT, quiet); |
testit(1024, VAL_COUNT, quiet); |
testit(2048, 512, quiet); |
testit(4000, 128, quiet); |
testit(8192, 128, quiet); |
testit(16384, 128, quiet); |
testit(16385, 128, quiet); |
} |
#define THREADS 6 |
#define THR_MEM_COUNT 1024 |
#define THR_MEM_SIZE 128 |
#define THREADS 6 |
#define THR_MEM_COUNT 1024 |
#define THR_MEM_SIZE 128 |
static void *thr_data[THREADS][THR_MEM_COUNT]; |
static void * thr_data[THREADS][THR_MEM_COUNT]; |
static slab_cache_t *thr_cache; |
static semaphore_t thr_sem; |
static bool sh_quiet; |
static void slabtest(void *data) |
{ |
127,7 → 136,8 |
thread_detach(THREAD); |
TPRINTF("Starting thread #%" PRIu64 "...\n", THREAD->tid); |
if (!sh_quiet) |
printf("Starting thread #%" PRIu64 "...\n", THREAD->tid); |
for (j = 0; j < 10; j++) { |
for (i = 0; i < THR_MEM_COUNT; i++) |
140,23 → 150,24 |
slab_free(thr_cache, thr_data[offs][i]); |
} |
TPRINTF("Thread #%" PRIu64 " finished\n", THREAD->tid); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " finished\n", THREAD->tid); |
semaphore_up(&thr_sem); |
} |
static void testthreads(void) |
static void testthreads(bool quiet) |
{ |
thread_t *t; |
int i; |
thr_cache = slab_cache_create("thread_cache", THR_MEM_SIZE, 0, NULL, NULL, |
SLAB_CACHE_NOMAGAZINE); |
SLAB_CACHE_NOMAGAZINE); |
semaphore_initialize(&thr_sem, 0); |
for (i = 0; i < THREADS; i++) { |
if (!(t = thread_create(slabtest, (void *) (unative_t) i, TASK, 0, "slabtest", false))) { |
TPRINTF("Could not create thread %d\n", i); |
if (!quiet) |
printf("Could not create thread %d\n", i); |
} else |
thread_ready(t); |
} |
166,13 → 177,16 |
slab_cache_destroy(thr_cache); |
TPRINTF("Test complete.\n"); |
if (!quiet) |
printf("Test complete.\n"); |
} |
char *test_slab1(void) |
char * test_slab1(bool quiet) |
{ |
testsimple(); |
testthreads(); |
sh_quiet = quiet; |
testsimple(quiet); |
testthreads(quiet); |
return NULL; |
} |
/branches/arm/kernel/test/mm/falloc2.c |
---|
39,24 → 39,26 |
#include <memstr.h> |
#include <arch.h> |
#define MAX_FRAMES 256 |
#define MAX_ORDER 8 |
#define MAX_FRAMES 256 |
#define MAX_ORDER 8 |
#define THREAD_RUNS 1 |
#define THREADS 8 |
#define THREAD_RUNS 1 |
#define THREADS 8 |
static atomic_t thread_count; |
static atomic_t thread_fail; |
static bool sh_quiet; |
static void falloc(void *arg) |
static void falloc(void * arg) |
{ |
int order, run, allocated, i; |
uint8_t val = THREAD->tid % THREADS; |
size_t k; |
index_t k; |
void **frames = (void **) malloc(MAX_FRAMES * sizeof(void *), FRAME_ATOMIC); |
if (frames == NULL) { |
TPRINTF("Thread #%" PRIu64 " (cpu%u): Unable to allocate frames\n", THREAD->tid, CPU->id); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " (cpu%u): Unable to allocate frames\n", THREAD->tid, CPU->id); |
atomic_inc(&thread_fail); |
atomic_dec(&thread_count); |
return; |
63,10 → 65,11 |
} |
thread_detach(THREAD); |
for (run = 0; run < THREAD_RUNS; run++) { |
for (order = 0; order <= MAX_ORDER; order++) { |
TPRINTF("Thread #%" PRIu64 " (cpu%u): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " (cpu%u): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order); |
allocated = 0; |
for (i = 0; i < (MAX_FRAMES >> order); i++) { |
78,13 → 81,17 |
break; |
} |
TPRINTF("Thread #%" PRIu64 " (cpu%u): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated); |
TPRINTF("Thread #%" PRIu64 " (cpu%u): Deallocating ... \n", THREAD->tid, CPU->id); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " (cpu%u): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " (cpu%u): Deallocating ... \n", THREAD->tid, CPU->id); |
for (i = 0; i < allocated; i++) { |
for (k = 0; k <= (((size_t) FRAME_SIZE << order) - 1); k++) { |
for (k = 0; k <= (((index_t) FRAME_SIZE << order) - 1); k++) { |
if (((uint8_t *) frames[i])[k] != val) { |
TPRINTF("Thread #%" PRIu64 " (cpu%u): Unexpected data (%c) in block %p offset %#" PRIs "\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " (cpu%u): Unexpected data (%c) in block %p offset %#" PRIi "\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); |
atomic_inc(&thread_fail); |
goto cleanup; |
} |
92,28 → 99,32 |
frame_free(KA2PA(frames[i])); |
} |
TPRINTF("Thread #%" PRIu64 " (cpu%u): Finished run.\n", THREAD->tid, CPU->id); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " (cpu%u): Finished run.\n", THREAD->tid, CPU->id); |
} |
} |
cleanup: |
cleanup: |
free(frames); |
TPRINTF("Thread #%" PRIu64 " (cpu%u): Exiting\n", THREAD->tid, CPU->id); |
if (!sh_quiet) |
printf("Thread #%" PRIu64 " (cpu%u): Exiting\n", THREAD->tid, CPU->id); |
atomic_dec(&thread_count); |
} |
char *test_falloc2(void) |
char * test_falloc2(bool quiet) |
{ |
unsigned int i; |
sh_quiet = quiet; |
atomic_set(&thread_count, THREADS); |
atomic_set(&thread_fail, 0); |
for (i = 0; i < THREADS; i++) { |
thread_t * thrd = thread_create(falloc, NULL, TASK, 0, "falloc", false); |
if (!thrd) { |
TPRINTF("Could not create thread %u\n", i); |
if (!quiet) |
printf("Could not create thread %u\n", i); |
break; |
} |
thread_ready(thrd); |
120,7 → 131,8 |
} |
while (atomic_get(&thread_count) > 0) { |
TPRINTF("Threads left: %ld\n", atomic_get(&thread_count)); |
if (!quiet) |
printf("Threads left: %ld\n", atomic_get(&thread_count)); |
thread_sleep(1); |
} |
/branches/arm/kernel/test/mm/falloc1.c |
---|
36,13 → 36,12 |
#include <debug.h> |
#include <align.h> |
#define MAX_FRAMES 1024 |
#define MAX_ORDER 8 |
#define TEST_RUNS 2 |
#define MAX_FRAMES 1024 |
#define MAX_ORDER 8 |
#define TEST_RUNS 2 |
char *test_falloc1(void) { |
uintptr_t *frames |
= (uintptr_t *) malloc(MAX_FRAMES * sizeof(uintptr_t), 0); |
char * test_falloc1(bool quiet) { |
uintptr_t * frames = (uintptr_t *) malloc(MAX_FRAMES * sizeof(uintptr_t), 0); |
int results[MAX_ORDER + 1]; |
int i, order, run; |
53,10 → 52,11 |
if (frames == NULL) |
return "Unable to allocate frames"; |
for (run = 0; run < TEST_RUNS; run++) { |
for (order = 0; order <= MAX_ORDER; order++) { |
TPRINTF("Allocating %d frames blocks ... ", 1 << order); |
if (!quiet) |
printf("Allocating %d frames blocks ... ", 1 << order); |
allocated = 0; |
for (i = 0; i < MAX_FRAMES >> order; i++) { |
63,7 → 63,8 |
frames[allocated] = (uintptr_t) frame_alloc(order, FRAME_ATOMIC | FRAME_KA); |
if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) { |
TPRINTF("Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10); |
if (!quiet) |
printf("Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10); |
return "Test failed"; |
} |
70,13 → 71,15 |
if (frames[allocated]) |
allocated++; |
else { |
TPRINTF("done. "); |
if (!quiet) |
printf("done. "); |
break; |
} |
} |
TPRINTF("%d blocks allocated.\n", allocated); |
if (!quiet) |
printf("%d blocks allocated.\n", allocated); |
if (run) { |
if (results[order] != allocated) |
return "Possible frame leak"; |
83,15 → 86,17 |
} else |
results[order] = allocated; |
TPRINTF("Deallocating ... "); |
if (!quiet) |
printf("Deallocating ... "); |
for (i = 0; i < allocated; i++) |
frame_free(KA2PA(frames[i])); |
TPRINTF("done.\n"); |
if (!quiet) |
printf("done.\n"); |
} |
} |
free(frames); |
return NULL; |
/branches/arm/kernel/test/mm/purge1.c |
---|
26,6 → 26,8 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifdef ia64 |
#include <print.h> |
#include <test.h> |
#include <mm/page.h> |
37,18 → 39,18 |
#include <debug.h> |
extern void tlb_invalidate_all(void); |
extern void tlb_invalidate_pages(asid_t asid, uintptr_t va, size_t cnt); |
extern void tlb_invalidate_pages(asid_t asid, uintptr_t va, count_t cnt); |
char *test_purge1(void) |
char * test_purge1(bool quiet) |
{ |
tlb_entry_t entryi; |
tlb_entry_t entryd; |
int i; |
entryd.word[0] = 0; |
entryd.word[1] = 0; |
entryd.p = true; /* present */ |
entryd.ma = MA_WRITEBACK; |
entryd.a = true; /* already accessed */ |
75,9 → 77,11 |
dtc_mapping_insert(0 + i * (1 << PAGE_WIDTH), 9, entryd); |
} |
tlb_invalidate_pages(8, 0x0c000, 14); |
tlb_invalidate_pages(8,0x0c000,14); |
/* tlb_invalidate_all(); */ |
/*tlb_invalidate_all();*/ |
return NULL; |
} |
#endif |
/branches/arm/kernel/test/mm/mapping1.c |
---|
35,36 → 35,40 |
#include <arch/types.h> |
#include <debug.h> |
#define PAGE0 0x10000000 |
#define PAGE1 (PAGE0 + PAGE_SIZE) |
#define PAGE0 0x10000000 |
#define PAGE1 (PAGE0+PAGE_SIZE) |
#define VALUE0 0x01234567 |
#define VALUE1 0x89abcdef |
#define VALUE0 0x01234567 |
#define VALUE1 0x89abcdef |
char *test_mapping1(void) |
char * test_mapping1(bool quiet) |
{ |
uintptr_t frame0, frame1; |
uint32_t v0, v1; |
frame0 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA); |
frame1 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA); |
TPRINTF("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0)); |
if (!quiet) |
printf("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0)); |
*((uint32_t *) frame0) = VALUE0; |
TPRINTF("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1)); |
if (!quiet) |
printf("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1)); |
*((uint32_t *) frame1) = VALUE1; |
TPRINTF("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0)); |
if (!quiet) |
printf("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0)); |
page_mapping_insert(AS_KERNEL, PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE); |
TPRINTF("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1)); |
if (!quiet) |
printf("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1)); |
page_mapping_insert(AS_KERNEL, PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE); |
v0 = *((uint32_t *) PAGE0); |
v1 = *((uint32_t *) PAGE1); |
TPRINTF("Value at virtual address %p is %#x.\n", PAGE0, v0); |
TPRINTF("Value at virtual address %p is %#x.\n", PAGE1, v1); |
if (!quiet) { |
printf("Value at virtual address %p is %#x.\n", PAGE0, v0); |
printf("Value at virtual address %p is %#x.\n", PAGE1, v1); |
} |
if (v0 != VALUE0) |
return "Value at v0 not equal to VALUE0"; |
71,22 → 75,25 |
if (v1 != VALUE1) |
return "Value at v1 not equal to VALUE1"; |
TPRINTF("Writing %#x to virtual address %p.\n", 0, PAGE0); |
if (!quiet) |
printf("Writing %#x to virtual address %p.\n", 0, PAGE0); |
*((uint32_t *) PAGE0) = 0; |
TPRINTF("Writing %#x to virtual address %p.\n", 0, PAGE1); |
*((uint32_t *) PAGE1) = 0; |
if (!quiet) |
printf("Writing %#x to virtual address %p.\n", 0, PAGE1); |
*((uint32_t *) PAGE1) = 0; |
v0 = *((uint32_t *) PAGE0); |
v1 = *((uint32_t *) PAGE1); |
TPRINTF("Value at virtual address %p is %#x.\n", PAGE0, *((uint32_t *) PAGE0)); |
TPRINTF("Value at virtual address %p is %#x.\n", PAGE1, *((uint32_t *) PAGE1)); |
if (!quiet) { |
printf("Value at virtual address %p is %#x.\n", PAGE0, *((uint32_t *) PAGE0)); |
printf("Value at virtual address %p is %#x.\n", PAGE1, *((uint32_t *) PAGE1)); |
} |
if (v0 != 0) |
return "Value at v0 not equal to 0"; |
if (v1 != 0) |
return "Value at v1 not equal to 0"; |
return NULL; |
return NULL; |
} |
/branches/arm/kernel/test/mm/purge1.def |
---|
1,3 → 1,4 |
#ifdef ia64 |
{ |
"purge1", |
"Itanium TLB purge test", |
4,3 → 5,4 |
&test_purge1, |
true |
}, |
#endif |
/branches/arm/kernel/test/avltree/avltree1.c |
---|
41,7 → 41,7 |
*/ |
static avltree_node_t avltree_nodes[NODE_COUNT]; |
/* |
/* |
* head of free nodes' list: |
*/ |
static avltree_node_t *first_free_node = NULL; |
58,11 → 58,11 |
if (!node) |
return NULL; |
if (node->lft) { |
tmp = test_tree_parents(node->lft); |
if (tmp != node) { |
TPRINTF("Bad parent pointer key: %" PRIu64 |
printf("Bad parent pointer key: %" PRIu64 |
", address: %p\n", tmp->key, node->lft); |
} |
} |
69,7 → 69,7 |
if (node->rgt) { |
tmp = test_tree_parents(node->rgt); |
if (tmp != node) { |
TPRINTF("Bad parent pointer key: %" PRIu64 |
printf("Bad parent pointer key: %" PRIu64 |
", address: %p\n", |
tmp->key,node->rgt); |
} |
80,50 → 80,49 |
int test_tree_balance(avltree_node_t *node) |
{ |
int h1, h2, diff; |
if (!node) |
return 0; |
h1 = test_tree_balance(node->lft); |
h2 = test_tree_balance(node->rgt); |
diff = h2 - h1; |
if ((diff != node->balance) || ((diff != -1) && (diff != 0) && (diff != 1))) |
TPRINTF("Bad balance\n"); |
return ((h1 > h2) ? (h1 + 1) : (h2 + 1)); |
if (diff != node->balance || (diff != -1 && diff != 0 && diff != 1)) { |
printf("Bad balance\n"); |
} |
return h1 > h2 ? h1 + 1 : h2 + 1; |
} |
/** |
* Prints the structure of the node, which is level levels from the top of the |
* tree. |
* tree. |
*/ |
static void print_tree_structure_flat(avltree_node_t *node, int level) |
static void |
print_tree_structure_flat(avltree_node_t *node, int level) |
{ |
/* |
* You can set the maximum level as high as you like. |
* Most of the time, you'll want to debug code using small trees, |
* so that a large level indicates a loop, which is a bug. |
* Most of the time, you'll want to debug code using small trees, |
* so that a large level indicates a loop, which is a bug. |
*/ |
if (level > 16) { |
TPRINTF("[...]"); |
printf("[...]"); |
return; |
} |
if (node == NULL) |
return; |
TPRINTF("%" PRIu64 "[%" PRIu8 "]", node->key, node->balance); |
printf("%" PRIu64 "[%" PRIu8 "]", node->key, node->balance); |
if (node->lft != NULL || node->rgt != NULL) { |
TPRINTF("("); |
printf("("); |
print_tree_structure_flat(node->lft, level + 1); |
if (node->rgt != NULL) { |
TPRINTF(","); |
printf(","); |
print_tree_structure_flat(node->rgt, level + 1); |
} |
TPRINTF(")"); |
printf(")"); |
} |
} |
130,10 → 129,10 |
static void alloc_avltree_node_prepare(void) |
{ |
int i; |
for (i = 0; i < NODE_COUNT - 1; i++) |
for (i = 0; i < NODE_COUNT - 1; i++) { |
avltree_nodes[i].par = &avltree_nodes[i + 1]; |
} |
avltree_nodes[i].par = NULL; |
/* |
140,44 → 139,37 |
* Node keys which will be used for insertion. Up to NODE_COUNT size of |
* array. |
*/ |
/* First tree node and same key */ |
avltree_nodes[0].key = 60; |
avltree_nodes[1].key = 60; |
avltree_nodes[2].key = 60; |
/* LL rotation */ |
avltree_nodes[3].key = 50; |
avltree_nodes[4].key = 40; |
avltree_nodes[5].key = 30; |
/* LR rotation */ |
avltree_nodes[6].key = 20; |
avltree_nodes[7].key = 20; |
avltree_nodes[8].key = 25; |
avltree_nodes[9].key = 25; |
/* LL rotation in lower floor */ |
avltree_nodes[10].key = 35; |
/* RR rotation */ |
avltree_nodes[11].key = 70; |
avltree_nodes[12].key = 80; |
/* RL rotation */ |
avltree_nodes[13].key = 90; |
avltree_nodes[14].key = 85; |
/* Insert 0 key */ |
avltree_nodes[15].key = 0; |
avltree_nodes[16].key = 0; |
/* Insert reverse */ |
avltree_nodes[17].key = 600; |
avltree_nodes[18].key = 500; |
avltree_nodes[19].key = 400; |
avltree_nodes[20].key = 300; |
for (i = 21; i < NODE_COUNT; i++) |
avltree_nodes[i].key = i * 3; |
187,35 → 179,40 |
static avltree_node_t *alloc_avltree_node(void) |
{ |
avltree_node_t *node; |
node = first_free_node; |
first_free_node = first_free_node->par; |
return node; |
} |
static void test_tree_insert(avltree_t *tree, size_t node_count) |
static void test_tree_insert(avltree_t *tree, count_t node_count, bool quiet) |
{ |
unsigned int i; |
avltree_node_t *newnode; |
avltree_create(tree); |
TPRINTF("Inserting %" PRIs " nodes...", node_count); |
if (!quiet) |
printf("Inserting %" PRIc " nodes...", node_count); |
for (i = 0; i < node_count; i++) { |
newnode = alloc_avltree_node(); |
avltree_insert(tree, newnode); |
test_tree_parents(tree->root); |
test_tree_balance(tree->root); |
if (!quiet) { |
test_tree_parents(tree->root); |
test_tree_balance(tree->root); |
} |
} |
TPRINTF("done.\n"); |
if (!quiet) |
printf("done.\n"); |
} |
static void test_tree_delete(avltree_t *tree, size_t node_count, |
int node_position) |
static void test_tree_delete(avltree_t *tree, count_t node_count, |
int node_position, bool quiet) |
{ |
avltree_node_t *delnode; |
unsigned int i; |
222,61 → 219,71 |
switch (node_position) { |
case 0: |
TPRINTF("Deleting root nodes..."); |
if (!quiet) |
printf("Deleting root nodes..."); |
while (tree->root != NULL) { |
delnode = tree->root; |
avltree_delete(tree, delnode); |
test_tree_parents(tree->root); |
test_tree_balance(tree->root); |
} |
if (!quiet) { |
test_tree_parents(tree->root); |
test_tree_balance(tree->root); |
} |
} |
break; |
case 1: |
TPRINTF("Deleting nodes according to creation time..."); |
if (!quiet) |
printf("Deleting nodes according to creation time..."); |
for (i = 0; i < node_count; i++) { |
avltree_delete(tree, &avltree_nodes[i]); |
test_tree_parents(tree->root); |
test_tree_balance(tree->root); |
if (!quiet) { |
test_tree_parents(tree->root); |
test_tree_balance(tree->root); |
} |
} |
break; |
break; |
} |
TPRINTF("done.\n"); |
if (!quiet) |
printf("done.\n"); |
} |
static void test_tree_delmin(avltree_t *tree, size_t node_count) |
static void test_tree_delmin(avltree_t *tree, count_t node_count, bool quiet) |
{ |
unsigned int i = 0; |
TPRINTF("Deleting minimum nodes..."); |
if (!quiet) |
printf("Deleting minimum nodes..."); |
while (tree->root != NULL) { |
i++; |
avltree_delete_min(tree); |
test_tree_parents(tree->root); |
test_tree_balance(tree->root); |
if (!quiet) { |
test_tree_parents(tree->root); |
test_tree_balance(tree->root); |
} |
} |
if (i != node_count) |
TPRINTF("Bad node count. Some nodes have been lost!\n"); |
TPRINTF("done.\n"); |
if (!quiet && (i != node_count)) |
printf("Bad node count. Some nodes have been lost!\n"); |
if (!quiet) |
printf("done.\n"); |
} |
char *test_avltree1(void) |
char *test_avltree1(bool quiet) |
{ |
alloc_avltree_node_prepare(); |
test_tree_insert(&avltree, NODE_COUNT); |
test_tree_delete(&avltree, NODE_COUNT, 0); |
test_tree_insert(&avltree, NODE_COUNT, quiet); |
test_tree_delete(&avltree, NODE_COUNT, 0, quiet); |
alloc_avltree_node_prepare(); |
test_tree_insert(&avltree, NODE_COUNT); |
test_tree_delete(&avltree, NODE_COUNT, 1); |
test_tree_insert(&avltree, NODE_COUNT, quiet); |
test_tree_delete(&avltree, NODE_COUNT, 1, quiet); |
alloc_avltree_node_prepare(); |
test_tree_insert(&avltree, NODE_COUNT); |
test_tree_delmin(&avltree, NODE_COUNT); |
test_tree_insert(&avltree, NODE_COUNT, quiet); |
test_tree_delmin(&avltree, NODE_COUNT, quiet); |
return NULL; |
} |
/branches/arm/kernel/test/avltree/avltree1.def |
---|
1,6 → 1,6 |
{ |
"avltree1", |
"Test AVL tree operations", |
"Test Avl tree operations", |
&test_avltree1, |
true |
}, |
/branches/arm/kernel/test/synch/rwlock3.c |
---|
34,35 → 34,41 |
#include <synch/rwlock.h> |
#define THREADS 4 |
#define THREADS 4 |
static atomic_t thread_count; |
static rwlock_t rwlock; |
static bool sh_quiet; |
static void reader(void *arg) |
{ |
thread_detach(THREAD); |
TPRINTF("cpu%u, tid %" PRIu64 ": trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 ": trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); |
rwlock_read_lock(&rwlock); |
rwlock_read_unlock(&rwlock); |
TPRINTF("cpu%u, tid %" PRIu64 ": success\n", CPU->id, THREAD->tid); |
TPRINTF("cpu%u, tid %" PRIu64 ": trying to lock rwlock for writing....\n", CPU->id, THREAD->tid); |
if (!sh_quiet) { |
printf("cpu%u, tid %" PRIu64 ": success\n", CPU->id, THREAD->tid); |
printf("cpu%u, tid %" PRIu64 ": trying to lock rwlock for writing....\n", CPU->id, THREAD->tid); |
} |
rwlock_write_lock(&rwlock); |
rwlock_write_unlock(&rwlock); |
TPRINTF("cpu%u, tid %" PRIu64 ": success\n", CPU->id, THREAD->tid); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 ": success\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
} |
char *test_rwlock3(void) |
char * test_rwlock3(bool quiet) |
{ |
int i; |
thread_t *thrd; |
sh_quiet = quiet; |
atomic_set(&thread_count, THREADS); |
73,15 → 79,16 |
thrd = thread_create(reader, NULL, TASK, 0, "reader", false); |
if (thrd) |
thread_ready(thrd); |
else |
TPRINTF("Could not create reader %d\n", i); |
else if (!quiet) |
printf("Could not create reader %d\n", i); |
} |
thread_sleep(1); |
rwlock_write_unlock(&rwlock); |
while (atomic_get(&thread_count) > 0) { |
TPRINTF("Threads left: %ld\n", atomic_get(&thread_count)); |
if (!quiet) |
printf("Threads left: %ld\n", atomic_get(&thread_count)); |
thread_sleep(1); |
} |
/branches/arm/kernel/test/synch/rwlock4.c |
---|
40,12 → 40,13 |
#include <synch/synch.h> |
#include <synch/spinlock.h> |
#define READERS 50 |
#define WRITERS 50 |
#define READERS 50 |
#define WRITERS 50 |
static atomic_t thread_count; |
static rwlock_t rwlock; |
static atomic_t threads_fault; |
static bool sh_quiet; |
SPINLOCK_INITIALIZE(rw_lock); |
56,10 → 57,10 |
static uint32_t random(uint32_t max) |
{ |
uint32_t rc; |
spinlock_lock(&rw_lock); |
spinlock_lock(&rw_lock); |
rc = seed % max; |
seed = (((seed << 2) ^ (seed >> 2)) * 487) + rc; |
seed = (((seed<<2) ^ (seed>>2)) * 487) + rc; |
spinlock_unlock(&rw_lock); |
return rc; |
} |
69,39 → 70,43 |
int rc, to; |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
to = random(40000); |
TPRINTF("cpu%u, tid %" PRIu64 " w+ (%d)\n", CPU->id, THREAD->tid, to); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 " w+ (%d)\n", CPU->id, THREAD->tid, to); |
rc = rwlock_write_lock_timeout(&rwlock, to); |
if (SYNCH_FAILED(rc)) { |
TPRINTF("cpu%u, tid %" PRIu64 " w!\n", CPU->id, THREAD->tid); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 " w!\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
return; |
} |
TPRINTF("cpu%u, tid %" PRIu64 " w=\n", CPU->id, THREAD->tid); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 " w=\n", CPU->id, THREAD->tid); |
if (rwlock.readers_in) { |
TPRINTF("Oops.\n"); |
if (!sh_quiet) |
printf("Oops."); |
atomic_inc(&threads_fault); |
atomic_dec(&thread_count); |
return; |
} |
thread_usleep(random(1000000)); |
if (rwlock.readers_in) { |
TPRINTF("Oops.\n"); |
if (!sh_quiet) |
printf("Oops."); |
atomic_inc(&threads_fault); |
atomic_dec(&thread_count); |
return; |
} |
rwlock_write_unlock(&rwlock); |
TPRINTF("cpu%u, tid %" PRIu64 " w-\n", CPU->id, THREAD->tid); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 " w-\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
} |
113,28 → 118,33 |
to = random(2000); |
TPRINTF("cpu%u, tid %" PRIu64 " r+ (%d)\n", CPU->id, THREAD->tid, to); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 " r+ (%d)\n", CPU->id, THREAD->tid, to); |
rc = rwlock_read_lock_timeout(&rwlock, to); |
if (SYNCH_FAILED(rc)) { |
TPRINTF("cpu%u, tid %" PRIu64 " r!\n", CPU->id, THREAD->tid); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 " r!\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
return; |
} |
TPRINTF("cpu%u, tid %" PRIu64 " r=\n", CPU->id, THREAD->tid); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 " r=\n", CPU->id, THREAD->tid); |
thread_usleep(30000); |
rwlock_read_unlock(&rwlock); |
TPRINTF("cpu%u, tid %" PRIu64 " r-\n", CPU->id, THREAD->tid); |
if (!sh_quiet) |
printf("cpu%u, tid %" PRIu64 " r-\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
} |
char *test_rwlock4(void) |
char * test_rwlock4(bool quiet) |
{ |
context_t ctx; |
uint32_t i; |
sh_quiet = quiet; |
waitq_initialize(&can_start); |
rwlock_initialize(&rwlock); |
148,25 → 158,28 |
thread_t *thrd; |
context_save(&ctx); |
TPRINTF("sp=%#x, readers_in=%" PRIs "\n", ctx.sp, rwlock.readers_in); |
TPRINTF("Creating %" PRIu32 " readers\n", rd); |
if (!quiet) { |
printf("sp=%#x, readers_in=%" PRIc "\n", ctx.sp, rwlock.readers_in); |
printf("Creating %" PRIu32 " readers\n", rd); |
} |
for (i = 0; i < rd; i++) { |
thrd = thread_create(reader, NULL, TASK, 0, "reader", false); |
if (thrd) |
thread_ready(thrd); |
else |
TPRINTF("Could not create reader %" PRIu32 "\n", i); |
else if (!quiet) |
printf("Could not create reader %" PRIu32 "\n", i); |
} |
if (!quiet) |
printf("Creating %" PRIu32 " writers\n", wr); |
TPRINTF("Creating %" PRIu32 " writers\n", wr); |
for (i = 0; i < wr; i++) { |
thrd = thread_create(writer, NULL, TASK, 0, "writer", false); |
if (thrd) |
thread_ready(thrd); |
else |
TPRINTF("Could not create writer %" PRIu32 "\n", i); |
else if (!quiet) |
printf("Could not create writer %" PRIu32 "\n", i); |
} |
thread_usleep(20000); |
173,7 → 186,8 |
waitq_wakeup(&can_start, WAKEUP_ALL); |
while (atomic_get(&thread_count) > 0) { |
TPRINTF("Threads left: %ld\n", atomic_get(&thread_count)); |
if (!quiet) |
printf("Threads left: %ld\n", atomic_get(&thread_count)); |
thread_sleep(1); |
} |
/branches/arm/kernel/test/synch/semaphore2.c |
---|
50,10 → 50,10 |
static uint32_t random(uint32_t max) |
{ |
uint32_t rc; |
spinlock_lock(&sem_lock); |
spinlock_lock(&sem_lock); |
rc = seed % max; |
seed = (((seed << 2) ^ (seed >> 2)) * 487) + rc; |
seed = (((seed<<2) ^ (seed>>2)) * 487) + rc; |
spinlock_unlock(&sem_lock); |
return rc; |
} |
67,21 → 67,21 |
waitq_sleep(&can_start); |
to = random(20000); |
TPRINTF("cpu%u, tid %" PRIu64 " down+ (%d)\n", CPU->id, THREAD->tid, to); |
printf("cpu%u, tid %" PRIu64 " down+ (%d)\n", CPU->id, THREAD->tid, to); |
rc = semaphore_down_timeout(&sem, to); |
if (SYNCH_FAILED(rc)) { |
TPRINTF("cpu%u, tid %" PRIu64 " down!\n", CPU->id, THREAD->tid); |
printf("cpu%u, tid %" PRIu64 " down!\n", CPU->id, THREAD->tid); |
return; |
} |
TPRINTF("cpu%u, tid %" PRIu64 " down=\n", CPU->id, THREAD->tid); |
printf("cpu%u, tid %" PRIu64 " down=\n", CPU->id, THREAD->tid); |
thread_usleep(random(30000)); |
semaphore_up(&sem); |
TPRINTF("cpu%u, tid %" PRIu64 " up\n", CPU->id, THREAD->tid); |
printf("cpu%u, tid %" PRIu64 " up\n", CPU->id, THREAD->tid); |
} |
char *test_semaphore2(void) |
char * test_semaphore2(bool quiet) |
{ |
uint32_t i, k; |
91,13 → 91,13 |
thread_t *thrd; |
k = random(7) + 1; |
TPRINTF("Creating %" PRIu32 " consumers\n", k); |
printf("Creating %" PRIu32 " consumers\n", k); |
for (i = 0; i < k; i++) { |
thrd = thread_create(consumer, NULL, TASK, 0, "consumer", false); |
if (thrd) |
thread_ready(thrd); |
else |
TPRINTF("Error creating thread\n"); |
printf("Error creating thread\n"); |
} |
thread_usleep(20000); |
/branches/arm/kernel/test/synch/rwlock5.c |
---|
35,8 → 35,8 |
#include <synch/waitq.h> |
#include <synch/rwlock.h> |
#define READERS 50 |
#define WRITERS 50 |
#define READERS 50 |
#define WRITERS 50 |
static rwlock_t rwlock; |
47,9 → 47,9 |
static void writer(void *arg) |
{ |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
rwlock_write_lock(&rwlock); |
atomic_inc(&items_written); |
rwlock_write_unlock(&rwlock); |
58,7 → 58,7 |
static void reader(void *arg) |
{ |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
rwlock_read_lock(&rwlock); |
66,7 → 66,7 |
rwlock_read_unlock(&rwlock); |
} |
char *test_rwlock5(void) |
char * test_rwlock5(bool quiet) |
{ |
int i, j, k; |
long readers, writers; |
76,15 → 76,15 |
for (i = 1; i <= 3; i++) { |
thread_t *thrd; |
atomic_set(&items_read, 0); |
atomic_set(&items_written, 0); |
readers = i * READERS; |
writers = (4 - i) * WRITERS; |
printf("Creating %ld readers and %ld writers...", readers, writers); |
TPRINTF("Creating %ld readers and %ld writers...", readers, writers); |
for (j = 0; j < (READERS + WRITERS) / 2; j++) { |
for (k = 0; k < i; k++) { |
thrd = thread_create(reader, NULL, TASK, 0, "reader", false); |
91,7 → 91,7 |
if (thrd) |
thread_ready(thrd); |
else |
TPRINTF("Could not create reader %d\n", k); |
printf("Could not create reader %d\n", k); |
} |
for (k = 0; k < (4 - i); k++) { |
thrd = thread_create(writer, NULL, TASK, 0, "writer", false); |
98,17 → 98,17 |
if (thrd) |
thread_ready(thrd); |
else |
TPRINTF("Could not create writer %d\n", k); |
printf("Could not create writer %d\n", k); |
} |
} |
TPRINTF("ok\n"); |
printf("ok\n"); |
thread_sleep(1); |
waitq_wakeup(&can_start, WAKEUP_ALL); |
while ((items_read.count != readers) || (items_written.count != writers)) { |
TPRINTF("%d readers remaining, %d writers remaining, readers_in=%d\n", readers - items_read.count, writers - items_written.count, rwlock.readers_in); |
printf("%d readers remaining, %d writers remaining, readers_in=%d\n", readers - items_read.count, writers - items_written.count, rwlock.readers_in); |
thread_usleep(100000); |
} |
} |
/branches/arm/kernel/test/synch/rwlock1.c |
---|
35,39 → 35,39 |
#include <synch/waitq.h> |
#include <synch/rwlock.h> |
#define READERS 50 |
#define WRITERS 50 |
#define READERS 50 |
#define WRITERS 50 |
static rwlock_t rwlock; |
char *test_rwlock1(void) |
char * test_rwlock1(bool quiet) |
{ |
rwlock_initialize(&rwlock); |
rwlock_write_lock(&rwlock); |
rwlock_write_unlock(&rwlock); |
rwlock_write_unlock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_unlock(&rwlock); |
rwlock_read_unlock(&rwlock); |
rwlock_read_unlock(&rwlock); |
rwlock_read_unlock(&rwlock); |
rwlock_read_unlock(&rwlock); |
rwlock_read_unlock(&rwlock); |
rwlock_write_lock(&rwlock); |
rwlock_write_unlock(&rwlock); |
rwlock_write_unlock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_unlock(&rwlock); |
rwlock_write_lock(&rwlock); |
rwlock_write_unlock(&rwlock); |
rwlock_write_unlock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_unlock(&rwlock); |
/branches/arm/kernel/test/synch/rwlock2.c |
---|
34,34 → 34,38 |
#include <synch/rwlock.h> |
#define READERS 50 |
#define WRITERS 50 |
#define READERS 50 |
#define WRITERS 50 |
static rwlock_t rwlock; |
static bool sh_quiet; |
static void writer(void *arg) |
{ |
TPRINTF("Trying to lock rwlock for writing....\n"); |
if (!sh_quiet) |
printf("Trying to lock rwlock for writing....\n"); |
rwlock_write_lock(&rwlock); |
rwlock_write_unlock(&rwlock); |
TPRINTF("Trying to lock rwlock for reading....\n"); |
if (!sh_quiet) |
printf("Trying to lock rwlock for reading....\n"); |
rwlock_read_lock(&rwlock); |
rwlock_read_unlock(&rwlock); |
rwlock_read_unlock(&rwlock); |
} |
char *test_rwlock2(void) |
char * test_rwlock2(bool quiet) |
{ |
thread_t *thrd; |
sh_quiet = quiet; |
rwlock_initialize(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
rwlock_read_lock(&rwlock); |
thrd = thread_create(writer, NULL, TASK, 0, "writer", false); |
if (thrd) |
68,7 → 72,7 |
thread_ready(thrd); |
else |
return "Could not create thread"; |
thread_sleep(1); |
rwlock_read_unlock(&rwlock); |
/branches/arm/kernel/test/synch/semaphore1.c |
---|
35,9 → 35,9 |
#include <synch/waitq.h> |
#include <synch/semaphore.h> |
#define AT_ONCE 3 |
#define PRODUCERS 50 |
#define CONSUMERS 50 |
#define AT_ONCE 3 |
#define PRODUCERS 50 |
#define CONSUMERS 50 |
static semaphore_t sem; |
47,10 → 47,10 |
static void producer(void *arg) |
{ |
thread_detach(THREAD); |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
semaphore_down(&sem); |
atomic_inc(&items_produced); |
thread_usleep(250); |
59,7 → 59,7 |
static void consumer(void *arg) |
{ |
thread_detach(THREAD); |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
69,7 → 69,7 |
semaphore_up(&sem); |
} |
char *test_semaphore1(void) |
char * test_semaphore1(bool quiet) |
{ |
int i, j, k; |
int consumers, producers; |
76,10 → 76,10 |
waitq_initialize(&can_start); |
semaphore_initialize(&sem, AT_ONCE); |
for (i = 1; i <= 3; i++) { |
thread_t *thrd; |
atomic_set(&items_produced, 0); |
atomic_set(&items_consumed, 0); |
86,8 → 86,8 |
consumers = i * CONSUMERS; |
producers = (4 - i) * PRODUCERS; |
TPRINTF("Creating %d consumers and %d producers...", consumers, producers); |
printf("Creating %d consumers and %d producers...", consumers, producers); |
for (j = 0; j < (CONSUMERS + PRODUCERS) / 2; j++) { |
for (k = 0; k < i; k++) { |
thrd = thread_create(consumer, NULL, TASK, 0, "consumer", false); |
94,7 → 94,7 |
if (thrd) |
thread_ready(thrd); |
else |
TPRINTF("could not create consumer %d\n", i); |
printf("could not create consumer %d\n", i); |
} |
for (k = 0; k < (4 - i); k++) { |
thrd = thread_create(producer, NULL, TASK, 0, "producer", false); |
101,17 → 101,17 |
if (thrd) |
thread_ready(thrd); |
else |
TPRINTF("could not create producer %d\n", i); |
printf("could not create producer %d\n", i); |
} |
} |
TPRINTF("ok\n"); |
printf("ok\n"); |
thread_sleep(1); |
waitq_wakeup(&can_start, WAKEUP_ALL); |
while ((items_consumed.count != consumers) || (items_produced.count != producers)) { |
TPRINTF("%d consumers remaining, %d producers remaining\n", consumers - items_consumed.count, producers - items_produced.count); |
printf("%d consumers remaining, %d producers remaining\n", consumers - items_consumed.count, producers - items_produced.count); |
thread_sleep(1); |
} |
} |
/branches/arm/kernel/test/test.h |
---|
38,17 → 38,8 |
#include <arch/types.h> |
#include <typedefs.h> |
extern bool test_quiet; |
typedef char *(*test_entry_t)(bool); |
#define TPRINTF(format, ...) \ |
{ \ |
if (!test_quiet) { \ |
printf(format, ##__VA_ARGS__); \ |
} \ |
} |
typedef char *(*test_entry_t)(void); |
typedef struct { |
char *name; |
char *desc; |
56,33 → 47,30 |
bool safe; |
} test_t; |
extern char *test_atomic1(void); |
extern char *test_avltree1(void); |
extern char *test_btree1(void); |
extern char *test_mips1(void); |
extern char *test_fault1(void); |
extern char *test_fpu1(void); |
extern char *test_sse1(void); |
extern char *test_mips2(void); |
extern char *test_falloc1(void); |
extern char *test_falloc2(void); |
extern char *test_mapping1(void); |
extern char *test_purge1(void); |
extern char *test_slab1(void); |
extern char *test_slab2(void); |
extern char *test_rwlock1(void); |
extern char *test_rwlock2(void); |
extern char *test_rwlock3(void); |
extern char *test_rwlock4(void); |
extern char *test_rwlock5(void); |
extern char *test_semaphore1(void); |
extern char *test_semaphore2(void); |
extern char *test_print1(void); |
extern char *test_print2(void); |
extern char *test_print3(void); |
extern char *test_print4(void); |
extern char *test_thread1(void); |
extern char *test_sysinfo1(void); |
extern char * test_atomic1(bool quiet); |
extern char * test_avltree1(bool quiet); |
extern char * test_btree1(bool quiet); |
extern char * test_mips1(bool quiet); |
extern char * test_fault1(bool quiet); |
extern char * test_fpu1(bool quiet); |
extern char * test_sse1(bool quiet); |
extern char * test_mips2(bool quiet); |
extern char * test_falloc1(bool quiet); |
extern char * test_falloc2(bool quiet); |
extern char * test_mapping1(bool quiet); |
extern char * test_purge1(bool quiet); |
extern char * test_slab1(bool quiet); |
extern char * test_slab2(bool quiet); |
extern char * test_rwlock1(bool quiet); |
extern char * test_rwlock2(bool quiet); |
extern char * test_rwlock3(bool quiet); |
extern char * test_rwlock4(bool quiet); |
extern char * test_rwlock5(bool quiet); |
extern char * test_semaphore1(bool quiet); |
extern char * test_semaphore2(bool quiet); |
extern char * test_print1(bool quiet); |
extern char * test_thread1(bool quiet); |
extern char * test_sysinfo1(bool quiet); |
extern test_t tests[]; |
/branches/arm/kernel/test/thread/thread1.c |
---|
36,33 → 36,37 |
#include <arch.h> |
#define THREADS 5 |
#define THREADS 5 |
static atomic_t finish; |
static atomic_t threads_finished; |
static bool sh_quiet; |
static void threadtest(void *data) |
{ |
thread_detach(THREAD); |
thread_detach(THREAD); |
while (atomic_get(&finish)) { |
TPRINTF("%" PRIu64 " ", THREAD->tid); |
if (!sh_quiet) |
printf("%" PRIu64 " ", THREAD->tid); |
thread_usleep(100000); |
} |
atomic_inc(&threads_finished); |
} |
char *test_thread1(void) |
char * test_thread1(bool quiet) |
{ |
unsigned int i, total = 0; |
sh_quiet = quiet; |
atomic_set(&finish, 1); |
atomic_set(&threads_finished, 0); |
for (i = 0; i < THREADS; i++) { |
thread_t *t; |
if (!(t = thread_create(threadtest, NULL, TASK, 0, "threadtest", false))) { |
TPRINTF("Could not create thread %d\n", i); |
if (!quiet) |
printf("Could not create thread %d\n", i); |
break; |
} |
thread_ready(t); |
69,12 → 73,14 |
total++; |
} |
TPRINTF("Running threads for 10 seconds...\n"); |
if (!quiet) |
printf("Running threads for 10 seconds...\n"); |
thread_sleep(10); |
atomic_set(&finish, 0); |
while (atomic_get(&threads_finished) < ((long) total)) { |
TPRINTF("Threads left: %d\n", total - atomic_get(&threads_finished)); |
if (!quiet) |
printf("Threads left: %d\n", total - atomic_get(&threads_finished)); |
thread_sleep(1); |
} |
/branches/arm/kernel/test/fpu/mips2_skip.c |
---|
File deleted |
/branches/arm/kernel/test/fpu/fpu1_ia64.c |
---|
File deleted |
/branches/arm/kernel/test/fpu/fpu1_skip.c |
---|
File deleted |
/branches/arm/kernel/test/fpu/sse1_skip.c |
---|
File deleted |
/branches/arm/kernel/test/fpu/fpu1_x86.c |
---|
File deleted |
/branches/arm/kernel/test/fpu/mips2.c |
---|
26,6 → 26,8 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifdef mips32 |
#include <print.h> |
#include <debug.h> |
36,13 → 38,14 |
#include <arch.h> |
#define THREADS 50 |
#define DELAY 10000L |
#define ATTEMPTS 5 |
#define THREADS 50 |
#define DELAY 10000L |
#define ATTEMPTS 5 |
static atomic_t threads_ok; |
static atomic_t threads_fault; |
static waitq_t can_start; |
static bool sh_quiet; |
static void testit1(void *data) |
{ |
53,7 → 56,7 |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
for (i = 0; i < ATTEMPTS; i++) { |
asm volatile ( |
"mtc1 %0,$1" |
68,7 → 71,8 |
); |
if (arg != after_arg) { |
TPRINTF("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
if (!sh_quiet) |
printf("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
atomic_inc(&threads_fault); |
break; |
} |
85,13 → 89,13 |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
for (i = 0; i < ATTEMPTS; i++) { |
asm volatile ( |
"mtc1 %0,$1" |
: "=r" (arg) |
); |
scheduler(); |
asm volatile ( |
"mfc1 %0,$1" |
99,7 → 103,8 |
); |
if (arg != after_arg) { |
TPRINTF("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
if (!sh_quiet) |
printf("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
atomic_inc(&threads_fault); |
break; |
} |
108,21 → 113,24 |
} |
char *test_mips2(void) |
char * test_mips2(bool quiet) |
{ |
unsigned int i, total = 0; |
sh_quiet = quiet; |
waitq_initialize(&can_start); |
atomic_set(&threads_ok, 0); |
atomic_set(&threads_fault, 0); |
TPRINTF("Creating %u threads... ", 2 * THREADS); |
if (!quiet) |
printf("Creating %u threads... ", 2 * THREADS); |
for (i = 0; i < THREADS; i++) { |
thread_t *t; |
if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) { |
TPRINTF("could not create thread %u\n", 2 * i); |
if (!quiet) |
printf("could not create thread %u\n", 2 * i); |
break; |
} |
thread_ready(t); |
129,7 → 137,8 |
total++; |
if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) { |
TPRINTF("could not create thread %u\n", 2 * i + 1); |
if (!quiet) |
printf("could not create thread %u\n", 2 * i + 1); |
break; |
} |
thread_ready(t); |
136,13 → 145,15 |
total++; |
} |
TPRINTF("ok\n"); |
if (!quiet) |
printf("ok\n"); |
thread_sleep(1); |
waitq_wakeup(&can_start, WAKEUP_ALL); |
while (atomic_get(&threads_ok) != (long) total) { |
TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok)); |
if (!quiet) |
printf("Threads left: %d\n", total - atomic_get(&threads_ok)); |
thread_sleep(1); |
} |
151,3 → 162,5 |
return "Test failed"; |
} |
#endif |
/branches/arm/kernel/test/fpu/fpu1.c |
---|
0,0 → 1,230 |
/* |
* Copyright (c) 2005 Jakub Vana |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#if (defined(ia32) || defined(amd64) || defined(ia64) || defined(ia32xen)) |
#include <print.h> |
#include <debug.h> |
#include <test.h> |
#include <atomic.h> |
#include <proc/thread.h> |
#include <arch.h> |
#include <arch/arch.h> |
#define THREADS 150 |
#define ATTEMPTS 100 |
#define E_10e8 271828182 |
#define PI_10e8 314159265 |
#ifdef KERN_ia32_ARCH_H_ |
static inline double sqrt(double x) |
{ |
double v; |
asm ( |
"fsqrt\n" |
: "=t" (v) |
: "0" (x) |
); |
return v; |
} |
#endif |
#ifdef KERN_amd64_ARCH_H_ |
static inline double sqrt(double x) |
{ |
double v; |
asm ( |
"fsqrt\n" |
: "=t" (v) |
: "0" (x) |
); |
return v; |
} |
#endif |
#ifdef KERN_ia64_ARCH_H_ |
#undef PI_10e8 |
#define PI_10e8 3141592 |
static inline long double sqrt(long double a) |
{ |
long double x = 1; |
long double lx = 0; |
if (a < 0.00000000000000001) |
return 0; |
while(x != lx) { |
lx = x; |
x = (x + (a / x)) / 2; |
} |
return x; |
} |
#endif |
static atomic_t threads_ok; |
static atomic_t threads_fault; |
static waitq_t can_start; |
static bool sh_quiet; |
static void e(void *data) |
{ |
int i; |
double e, d, le, f; |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
for (i = 0; i<ATTEMPTS; i++) { |
le = -1; |
e = 0; |
f = 1; |
for (d = 1; e != le; d *= f, f += 1) { |
le = e; |
e = e + 1 / d; |
} |
if ((int) (100000000 * e) != E_10e8) { |
if (!sh_quiet) |
printf("tid%" PRIu64 ": e*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8); |
atomic_inc(&threads_fault); |
break; |
} |
} |
atomic_inc(&threads_ok); |
} |
static void pi(void *data) |
{ |
int i; |
double lpi, pi; |
double n, ab, ad; |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
for (i = 0; i < ATTEMPTS; i++) { |
lpi = -1; |
pi = 0; |
for (n = 2, ab = sqrt(2); lpi != pi; n *= 2, ab = ad) { |
double sc, cd; |
sc = sqrt(1 - (ab * ab / 4)); |
cd = 1 - sc; |
ad = sqrt(ab * ab / 4 + cd * cd); |
lpi = pi; |
pi = 2 * n * ad; |
} |
#ifdef KERN_ia64_ARCH_H_ |
if ((int) (1000000 * pi) != PI_10e8) { |
if (!sh_quiet) |
printf("tid%" PRIu64 ": pi*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (1000000 * pi), (unative_t) (PI_10e8 / 100)); |
atomic_inc(&threads_fault); |
break; |
} |
#else |
if ((int) (100000000 * pi) != PI_10e8) { |
if (!sh_quiet) |
printf("tid%" PRIu64 ": pi*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8); |
atomic_inc(&threads_fault); |
break; |
} |
#endif |
} |
atomic_inc(&threads_ok); |
} |
char * test_fpu1(bool quiet) |
{ |
unsigned int i, total = 0; |
sh_quiet = quiet; |
waitq_initialize(&can_start); |
atomic_set(&threads_ok, 0); |
atomic_set(&threads_fault, 0); |
if (!quiet) |
printf("Creating %u threads... ", 2 * THREADS); |
for (i = 0; i < THREADS; i++) { |
thread_t *t; |
if (!(t = thread_create(e, NULL, TASK, 0, "e", false))) { |
if (!quiet) |
printf("could not create thread %u\n", 2 * i); |
break; |
} |
thread_ready(t); |
total++; |
if (!(t = thread_create(pi, NULL, TASK, 0, "pi", false))) { |
if (!quiet) |
printf("could not create thread %u\n", 2 * i + 1); |
break; |
} |
thread_ready(t); |
total++; |
} |
if (!quiet) |
printf("ok\n"); |
thread_sleep(1); |
waitq_wakeup(&can_start, WAKEUP_ALL); |
while (atomic_get(&threads_ok) != (long) total) { |
if (!quiet) |
printf("Threads left: %d\n", total - atomic_get(&threads_ok)); |
thread_sleep(1); |
} |
if (atomic_get(&threads_fault) == 0) |
return NULL; |
return "Test failed"; |
} |
#endif |
/branches/arm/kernel/test/fpu/sse1.c |
---|
26,6 → 26,8 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#if (defined(ia32) || defined(amd64) || defined(ia32xen)) |
#include <print.h> |
#include <debug.h> |
36,38 → 38,41 |
#include <arch.h> |
#define THREADS 25 |
#define DELAY 10000L |
#define ATTEMPTS 5 |
#define THREADS 25 |
#define DELAY 10000L |
#define ATTEMPTS 5 |
static atomic_t threads_ok; |
static atomic_t threads_fault; |
static waitq_t can_start; |
static bool sh_quiet; |
static void testit1(void *data) |
{ |
int i; |
int arg __attribute__((aligned(16))) = (int) ((unative_t) data); |
int after_arg __attribute__((aligned(16))); |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
for (i = 0; i < ATTEMPTS; i++) { |
asm volatile ( |
"movlpd %[arg], %%xmm2\n" |
: [arg] "=m" (arg) |
"movlpd %0, %%xmm2\n" |
: "=m" (arg) |
); |
delay(DELAY); |
asm volatile ( |
"movlpd %%xmm2, %[after_arg]\n" |
: [after_arg] "=m" (after_arg) |
"movlpd %%xmm2, %0\n" |
: "=m" (after_arg) |
); |
if (arg != after_arg) { |
TPRINTF("tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
if (!sh_quiet) |
printf("tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
atomic_inc(&threads_fault); |
break; |
} |
84,21 → 89,22 |
thread_detach(THREAD); |
waitq_sleep(&can_start); |
for (i = 0; i < ATTEMPTS; i++) { |
asm volatile ( |
"movlpd %[arg], %%xmm2\n" |
: [arg] "=m" (arg) |
"movlpd %0, %%xmm2\n" |
: "=m" (arg) |
); |
scheduler(); |
asm volatile ( |
"movlpd %%xmm2, %[after_arg]\n" |
: [after_arg] "=m" (after_arg) |
"movlpd %%xmm2, %0\n" |
: "=m" (after_arg) |
); |
if (arg != after_arg) { |
TPRINTF("tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
if (!sh_quiet) |
printf("tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
atomic_inc(&threads_fault); |
break; |
} |
106,21 → 112,25 |
atomic_inc(&threads_ok); |
} |
char *test_sse1(void) |
char * test_sse1(bool quiet) |
{ |
unsigned int i, total = 0; |
sh_quiet = quiet; |
waitq_initialize(&can_start); |
atomic_set(&threads_ok, 0); |
atomic_set(&threads_fault, 0); |
TPRINTF("Creating %u threads... ", 2 * THREADS); |
if (!quiet) |
printf("Creating %u threads... ", 2 * THREADS); |
for (i = 0; i < THREADS; i++) { |
thread_t *t; |
if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) { |
TPRINTF("could not create thread %u\n", 2 * i); |
if (!quiet) |
printf("could not create thread %u\n", 2 * i); |
break; |
} |
thread_ready(t); |
127,7 → 137,8 |
total++; |
if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) { |
TPRINTF("could not create thread %u\n", 2 * i + 1); |
if (!quiet) |
printf("could not create thread %u\n", 2 * i + 1); |
break; |
} |
thread_ready(t); |
134,13 → 145,15 |
total++; |
} |
TPRINTF("ok\n"); |
if (!quiet) |
printf("ok\n"); |
thread_sleep(1); |
waitq_wakeup(&can_start, WAKEUP_ALL); |
while (atomic_get(&threads_ok) != (long) total) { |
TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok)); |
if (!quiet) |
printf("Threads left: %d\n", total - atomic_get(&threads_ok)); |
thread_sleep(1); |
} |
149,3 → 162,5 |
return "Test failed"; |
} |
#endif |
/branches/arm/kernel/test/fpu/mips2.def |
---|
1,3 → 1,4 |
#ifdef mips32 |
{ |
"mips2", |
"MIPS FPU test", |
4,3 → 5,4 |
&test_mips2, |
true |
}, |
#endif |
/branches/arm/kernel/test/fpu/fpu1.def |
---|
1,3 → 1,4 |
#if (defined(ia32) || defined(amd64) || defined(ia64) || defined(ia32xen)) |
{ |
"fpu1", |
"Intel FPU test", |
4,3 → 5,4 |
&test_fpu1, |
true |
}, |
#endif |
/branches/arm/kernel/test/fpu/sse1.def |
---|
1,3 → 1,4 |
#if (defined(ia32) || defined(amd64) || defined(ia32xen)) |
{ |
"sse1", |
"Intel SEE test", |
4,3 → 5,4 |
&test_sse1, |
true |
}, |
#endif |
/branches/arm/kernel/test/print/print2.def |
---|
File deleted |
/branches/arm/kernel/test/print/print3.def |
---|
File deleted |
/branches/arm/kernel/test/print/print4.def |
---|
File deleted |
/branches/arm/kernel/test/print/print2.c |
---|
File deleted |
/branches/arm/kernel/test/print/print3.c |
---|
File deleted |
/branches/arm/kernel/test/print/print4.c |
---|
File deleted |
/branches/arm/kernel/test/print/print1.c |
---|
29,27 → 29,44 |
#include <print.h> |
#include <test.h> |
char *test_print1(void) |
#define BUFFER_SIZE 32 |
char * test_print1(bool quiet) |
{ |
TPRINTF("Testing printf(\"%%*.*s\", 5, 3, \"text\"):\n"); |
TPRINTF("Expected output: \" tex\"\n"); |
TPRINTF("Real output: \"%*.*s\"\n\n", 5, 3, "text"); |
if (!quiet) { |
int retval; |
unative_t nat = 0x12345678u; |
char buffer[BUFFER_SIZE]; |
printf(" text 10.8s %*.*s \n", 5, 3, "text"); |
printf(" very long text 10.8s %10.8s \n", "very long text"); |
printf(" text 8.10s %8.10s \n", "text"); |
printf(" very long text 8.10s %8.10s \n", "very long text"); |
printf(" char: c '%c', 3.2c '%3.2c', -3.2c '%-3.2c', 2.3c '%2.3c', -2.3c '%-2.3c' \n", 'a', 'b', 'c', 'd', 'e'); |
printf(" int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n", 1, 1, 1, 1, 1); |
printf(" -int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n", -1, -1, -1, -1, -1); |
printf(" 0xint: x '%#x', 5.3x '%#5.3x', -5.3x '%#-5.3x', 3.5x '%#3.5x', -3.5x '%#-3.5x' \n", 17, 17, 17, 17, 17); |
printf("'%#llx' 64bit, '%#x' 32bit, '%#hhx' 8bit, '%#hx' 16bit, unative_t '%#" PRIxn "'. '%#llx' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, nat, 0x1234567887654321ull, "Lovely string" ); |
printf(" Print to NULL '%s'\n", NULL); |
retval = snprintf(buffer, BUFFER_SIZE, "Short text without parameters."); |
printf("Result is: '%s', retval = %d\n", buffer, retval); |
retval = snprintf(buffer, BUFFER_SIZE, "Very very very long text without parameters."); |
printf("Result is: '%s', retval = %d\n", buffer, retval); |
printf("Print short text to %d char long buffer via snprintf.\n", BUFFER_SIZE); |
retval = snprintf(buffer, BUFFER_SIZE, "Short %s", "text"); |
printf("Result is: '%s', retval = %d\n", buffer, retval); |
printf("Print long text to %d char long buffer via snprintf.\n", BUFFER_SIZE); |
retval = snprintf(buffer, BUFFER_SIZE, "Very long %s. This text`s length is more than %d. We are interested in the result.", "text" , BUFFER_SIZE); |
printf("Result is: '%s', retval = %d\n", buffer, retval); |
} |
TPRINTF("Testing printf(\"%%10.8s\", \"very long text\"):\n"); |
TPRINTF("Expected output: \" very lon\"\n"); |
TPRINTF("Real output: \"%10.8s\"\n\n", "very long text"); |
TPRINTF("Testing printf(\"%%8.10s\", \"text\"):\n"); |
TPRINTF("Expected output: \"text\"\n"); |
TPRINTF("Real output: \"%8.10s\"\n\n", "text"); |
TPRINTF("Testing printf(\"%%8.10s\", \"very long text\"):\n"); |
TPRINTF("Expected output: \"very long \"\n"); |
TPRINTF("Real output: \"%8.10s\"\n\n", "very long text"); |
TPRINTF("Testing printf(\"%%s\", NULL):\n"); |
TPRINTF("Expected output: \"(NULL)\"\n"); |
TPRINTF("Real output: \"%s\"\n\n", NULL); |
return NULL; |
} |
/branches/arm/kernel/test/print/print1.def |
---|
1,6 → 1,6 |
{ |
"print1", |
"String printf test", |
"Printf test", |
&test_print1, |
true |
}, |
/branches/arm/kernel/test/test.c |
---|
34,8 → 34,6 |
#include <test.h> |
bool test_quiet; |
test_t tests[] = { |
#include <atomic/atomic1.def> |
#include <avltree/avltree1.def> |
58,14 → 56,11 |
#include <synch/semaphore1.def> |
#include <synch/semaphore2.def> |
#include <print/print1.def> |
#include <print/print2.def> |
#include <print/print3.def> |
#include <print/print4.def> |
#include <thread/thread1.def> |
#include <sysinfo/sysinfo1.def> |
{ |
.name = NULL, |
.desc = NULL, |
.desc = NULL, |
.entry = NULL |
} |
}; |
/branches/arm/kernel/test/btree/btree1.c |
---|
33,14 → 33,15 |
static void *data = (void *) 0xdeadbeef; |
char *test_btree1(void) |
char * test_btree1(bool quiet) |
{ |
btree_t t; |
int i; |
btree_create(&t); |
TPRINTF("Inserting keys.\n"); |
if (!quiet) |
printf("Inserting keys.\n"); |
btree_insert(&t, 19, data, NULL); |
btree_insert(&t, 20, data, NULL); |
btree_insert(&t, 21, data, NULL); |
77,10 → 78,11 |
for (i = 100; i >= 50; i--) |
btree_insert(&t, i, data, NULL); |
if (!test_quiet) |
if (!quiet) |
btree_print(&t); |
TPRINTF("Removing keys.\n"); |
if (!quiet) |
printf("Removing keys.\n"); |
btree_remove(&t, 50, NULL); |
btree_remove(&t, 49, NULL); |
btree_remove(&t, 51, NULL); |
156,7 → 158,7 |
btree_remove(&t, 35, NULL); |
btree_remove(&t, 36, NULL); |
if (!test_quiet) |
if (!quiet) |
btree_print(&t); |
return NULL; |
/branches/arm/kernel/test/debug/mips1_skip.c |
---|
File deleted |
/branches/arm/kernel/test/debug/mips1.c |
---|
25,6 → 25,8 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifdef mips32 |
#include <print.h> |
#include <debug.h> |
36,9 → 38,10 |
#include <arch.h> |
char *test_mips1(void) |
char * test_mips1(bool quiet) |
{ |
TPRINTF("If kconsole is compiled in, you should enter debug mode now.\n"); |
if (!quiet) |
printf("You should enter kconsole debug mode now.\n"); |
asm volatile ( |
"break\n" |
46,3 → 49,5 |
return "Back from debug mode"; |
} |
#endif |
/branches/arm/kernel/test/debug/mips1.def |
---|
1,3 → 1,4 |
#ifdef mips32 |
{ |
"mips1", |
"MIPS debug test", |
4,3 → 5,4 |
&test_mips1, |
false |
}, |
#endif |
/branches/arm/kernel/test/sysinfo/sysinfo1.c |
---|
32,9 → 32,9 |
#include <test.h> |
#include <sysinfo/sysinfo.h> |
char *test_sysinfo1(void) |
char * test_sysinfo1(bool quiet) |
{ |
if (!test_quiet) |
if (!quiet) |
sysinfo_dump(NULL, 0); |
return NULL; |
} |
/branches/arm/kernel/test/fault/fault1.c |
---|
36,7 → 36,8 |
#include <arch.h> |
char *test_fault1(void) |
char * test_fault1(bool quiet) |
{ |
((int *)(0))[1] = 0; |
/branches/arm/kernel/test/atomic/atomic1.c |
---|
31,7 → 31,7 |
#include <atomic.h> |
#include <debug.h> |
char *test_atomic1(void) |
char * test_atomic1(bool quiet) |
{ |
atomic_t a; |
/branches/arm/HelenOS.config |
---|
1,6 → 1,5 |
# |
# Copyright (c) 2006 Ondrej Palkovsky |
# Copyright (c) 2009 Martin Decky |
# Copyright (c) 2006 Ondrej Palkovsky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
27,451 → 26,60 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## General platform options |
## General configuration directives |
% Platform |
# Platform |
@ "amd64" AMD64/Intel EM64T (PC) |
@ "arm32" ARM 32-bit |
@ "ia32" Intel IA-32 (PC) |
@ "ia32xen" Intel IA-32 on Xen hypervisor |
@ "ia64" Intel IA-64 |
@ "mips32" MIPS 32-bit |
@ "ppc32" PowerPC 32-bit (iMac G4) |
@ "ppc64" PowerPC 64-bit (iMac G5) |
@ "sparc64" Sun UltraSPARC 64-bit |
! PLATFORM (choice) |
% Machine type |
# Machine |
@ "msim" MSIM |
@ "simics" Simics |
@ "bgxemul" GXEmul big endian |
@ "lgxemul" GXEmul little endian |
! [PLATFORM=mips32] MACHINE (choice) |
% Machine type |
# Machine type |
@ "ski" Ski ia64 simulator |
@ "i460GX" i460GX chipset machine |
@ "ski" Ski ia64 simulator |
! [PLATFORM=ia64] MACHINE (choice) |
% Machine type |
@ "generic" Generic Sun workstation or server |
@ "serengeti" Serengeti system |
! [PLATFORM=sparc64] MACHINE (choice) |
% Machine type |
@ "testarm" Gxemul Testarm |
@ "integratorcp" Integratorcp |
# Machine Type |
@ "gxemul_testarm" testarm - GXEmul |
@ "qemu_icp" Integrator CP - QEMU |
! [PLATFORM=arm32] MACHINE (choice) |
% CPU type |
@ "pentium4" Pentium 4 |
@ "pentium3" Pentium 3 |
@ "core" Core Solo/Duo |
@ "athlon_xp" Athlon XP |
@ "athlon_mp" Athlon MP |
! [PLATFORM=ia32] PROCESSOR (choice) |
% CPU type |
@ "opteron" Opteron |
! [PLATFORM=amd64] PROCESSOR (choice) |
% CPU type |
@ "us" UltraSPARC I-II subarchitecture |
@ "us3" UltraSPARC III-IV subarchitecture |
! [PLATFORM=sparc64&MACHINE=generic] PROCESSOR (choice) |
% CPU type |
@ "us3" |
! [PLATFORM=sparc64&MACHINE=serengeti] PROCESSOR (choice) |
% Ramdisk format |
@ "tmpfs" TMPFS image |
@ "fat" FAT16 image |
! RDFMT (choice) |
## Mapping between platform and kernel architecture |
% Kernel architecture |
@ "amd64" |
! [PLATFORM=amd64] KARCH (choice) |
% Kernel architecture |
@ "arm32" |
! [PLATFORM=arm32] KARCH (choice) |
% Kernel architecture |
@ "ia32" |
! [PLATFORM=ia32] KARCH (choice) |
% Kernel architecture |
@ "ia32xen" |
! [PLATFORM=ia32xen] KARCH (choice) |
% Kernel architecture |
@ "ia64" |
! [PLATFORM=ia64] KARCH (choice) |
% Kernel architecture |
@ "mips32" |
! [PLATFORM=mips32] KARCH (choice) |
% Kernel architecture |
@ "ppc32" |
! [PLATFORM=ppc32] KARCH (choice) |
% Kernel architecture |
@ "ppc64" |
! [PLATFORM=ppc64] KARCH (choice) |
% Kernel architecture |
@ "sparc64" |
! [PLATFORM=sparc64] KARCH (choice) |
## Mapping between platform and user space architecture |
% User space architecture |
@ "amd64" |
! [PLATFORM=amd64] UARCH (choice) |
% User space architecture |
@ "arm32" |
! [PLATFORM=arm32] UARCH (choice) |
% User space architecture |
@ "ia32" |
! [PLATFORM=ia32|PLATFORM=ia32xen] UARCH (choice) |
% User space architecture |
@ "ia64" |
! [PLATFORM=ia64] UARCH (choice) |
% User space architecture |
@ "mips32" |
! [PLATFORM=mips32&(MACHINE=msim|MACHINE=lgxemul)] UARCH (choice) |
% User space architecture |
@ "mips32eb" |
! [PLATFORM=mips32&MACHINE=bgxemul] UARCH (choice) |
% User space architecture |
@ "ppc32" |
! [PLATFORM=ppc32] UARCH (choice) |
% User space architecture |
@ "ppc64" |
! [PLATFORM=ppc64] UARCH (choice) |
% User space architecture |
@ "sparc64" |
! [PLATFORM=sparc64] UARCH (choice) |
## Mapping between platform and boot architecture |
% Boot architecture |
@ "amd64" |
! [PLATFORM=amd64] BARCH (choice) |
% Boot architecture |
@ "arm32" |
! [PLATFORM=arm32] BARCH (choice) |
% Boot architecture |
@ "ia32" |
! [PLATFORM=ia32] BARCH (choice) |
% Boot architecture |
@ "ia32xen" |
! [PLATFORM=ia32xen] BARCH (choice) |
% Boot architecture |
@ "ia64" |
! [PLATFORM=ia64] BARCH (choice) |
% Boot architecture |
@ "mips32" |
! [PLATFORM=mips32] BARCH (choice) |
% Boot architecture |
@ "ppc32" |
! [PLATFORM=ppc32] BARCH (choice) |
% Boot architecture |
@ "ppc64" |
! [PLATFORM=ppc64] BARCH (choice) |
% Boot architecture |
@ "sparc64" |
! [PLATFORM=sparc64] BARCH (choice) |
## Mapping between platform and image format |
% Image format |
@ "binary" |
! [PLATFORM=mips32&MACHINE=msim] IMAGE (choice) |
% Image format |
@ "ecoff" |
! [PLATFORM=mips32&(MACHINE=bgxemul|MACHINE=lgxemul)] IMAGE (choice) |
## Compiler options |
% Compiler |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "icc_native" ICC Native |
@ "suncc_native" Sun Studio C Compiler |
! [PLATFORM=amd64|PLATFORM=ia32] COMPILER (choice) |
! [PLATFORM=amd64|PLATFORM=ia32|PLATFORM=ia32xen] COMPILER (choice) |
% Compiler |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "icc_native" ICC Native |
! [PLATFORM=ia64] COMPILER (choice) |
% Compiler |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "suncc_native" Sun Studio C Compiler |
! [PLATFORM=sparc64] COMPILER (choice) |
% Compiler |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
! [PLATFORM=arm32|PLATFORM=mips32|PLATFORM=ppc32] COMPILER (choice) |
! [PLATFORM=arm32|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=ppc64] COMPILER (choice) |
## Kernel configuration |
% Fences |
! [PLATFORM=ia32&(PROCESSOR=athlon_xp|PROCESSOR=athlon_mp|PROCESSOR=pentium3)] CONFIG_FENCES_P3 (y) |
% Fences |
! [PLATFORM=ia32&(PROCESSOR=pentium4|PROCESSOR=core)] CONFIG_FENCES_P4 (y) |
% Fences |
! [PLATFORM=amd64] CONFIG_FENCES_P4 (y) |
% ACPI support |
! [PLATFORM=ia32|PLATFORM=amd64] CONFIG_ACPI (y) |
% Hierarchical page tables support |
! [PLATFORM=ia32|PLATFORM=amd64|PLATFORM=arm32|PLATFORM=mips32|PLATFORM=ppc32] CONFIG_PAGE_PT (y) |
% Page hash table support |
! [PLATFORM=ia64|PLATFORM=sparc64] CONFIG_PAGE_HT (y) |
% Software integer division support |
! [PLATFORM=ia32|PLATFORM=arm32|PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32] CONFIG_SOFTINT (y) |
% ASID support |
! [PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_ASID (y) |
% ASID FIFO support |
! [PLATFORM=ia64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_ASID_FIFO (y) |
% OpenFirmware tree support |
! [PLATFORM=sparc64] CONFIG_OFW_TREE (y) |
% Multiboot standard support |
! [PLATFORM=ia32|PLATFORM=amd64] CONFIG_MULTIBOOT (y) |
% FPU support |
! [PLATFORM=ia32|PLATFORM=amd64|PLATFORM=ia64|PLATFORM=sparc64] CONFIG_FPU (y) |
% FPU support |
! [PLATFORM=mips32&(MACHINE=lgxemul|MACHINE=bgxemul)] CONFIG_FPU (y) |
## Kernel features options |
% Support for SMP |
! [(PLATFORM=ia32&PROCESSOR!=athlon_xp)|PLATFORM=amd64|PLATFORM=sparc64|PLATFORM=ia64|(PLATFORM=mips32&MACHINE=msim)] CONFIG_SMP (y/n) |
% Debug build |
# Debug build |
! CONFIG_DEBUG (y/n) |
% Deadlock detection support for spinlocks |
! [CONFIG_DEBUG=y&CONFIG_SMP=y] CONFIG_DEBUG_SPINLOCK (y/n) |
% Lazy FPU context switching |
! [CONFIG_FPU=y] CONFIG_FPU_LAZY (y/n) |
% Use VHPT |
! [PLATFORM=ia64] CONFIG_VHPT (n/y) |
% Use TSB |
! [PLATFORM=sparc64] CONFIG_TSB (y/n) |
% IO SAPIC on default address support |
! [PLATFORM=ia64&MACHINE!=ski] CONFIG_IOSAPIC (y/n) |
% Virtually indexed D-cache support |
! [PLATFORM=sparc64] CONFIG_VIRT_IDX_DCACHE (y/n) |
% Support for userspace debuggers |
! CONFIG_UDEBUG (y/n) |
% Kernel console support |
! CONFIG_KCONSOLE (y/n) |
% Kernel symbol information |
! CONFIG_SYMTAB (y/n) |
% Detailed kernel logging |
! CONFIG_LOG (n/y) |
% Compile kernel tests |
! CONFIG_TEST (y/n) |
## Hardware support |
% Input device class |
@ "generic" Keyboard or serial line |
! [PLATFORM=arm32&MACHINE=integratorcp] CONFIG_HID_IN (choice) |
% Input device class |
@ "generic" Keyboard or serial line |
@ "none" No input device |
! [PLATFORM=ia32|PLATFORM=arm32&MACHINE=testarm|PLATFORM=amd64|PLATFORM=mips32|PLATFORM=ppc32|PLATFORM=sparc64] CONFIG_HID_IN (choice) |
% Input device class |
@ "generic" Keyboard or serial line |
@ "keyboard" Keyboard |
@ "serial" Serial line |
@ "none" No input device |
! [PLATFORM=ia64&MACHINE=i460GX] CONFIG_HID_IN (choice) |
% Output device class |
@ "generic" Monitor or serial line |
! [PLATFORM=arm32&MACHINE=integratorcp] CONFIG_HID_OUT (choice) |
% Output device class |
@ "generic" Monitor or serial line |
@ "none" No output device |
! [PLATFORM=ia32|PLATFORM=amd64|PLATFORM=sparc64|PLATFORM=ppc32|(PLATFORM=ia64&MACHINE=i460GX)|(PLATFORM=mips32&MACHINE=msim)] CONFIG_HID_OUT (choice) |
% Output device class |
@ "generic" Monitor or serial line |
@ "monitor" Monitor |
@ "serial" Serial line |
@ "none" No output device |
! [PLATFORM=mips32&(MACHINE=bgxemul|MACHINE=lgxemul)] CONFIG_HID_OUT (choice) |
% Output device class |
@ "generic" Monitor or serial line |
@ "monitor" Monitor |
@ "serial" Serial line |
@ "none" No output device |
! [PLATFORM=arm32&MACHINE=testarm] CONFIG_HID_OUT (choice) |
% PC keyboard support |
! [CONFIG_HID_IN=generic&(PLATFORM=ia32|PLATFORM=amd64)] CONFIG_PC_KBD (y/n) |
% PC keyboard support |
! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=ia64&MACHINE=i460GX] CONFIG_PC_KBD (y/n) |
% Support for msim/GXemul keyboard |
! [CONFIG_HID_IN=generic&PLATFORM=mips32] CONFIG_MIPS_KBD (y/n) |
% Support for msim/GXemul printer |
! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=mips32] CONFIG_MIPS_PRN (y/n) |
% Support for GXemul keyboard |
! [CONFIG_HID_IN=generic&PLATFORM=arm32&MACHINE=testarm] CONFIG_ARM_KBD (y/n) |
% Support for GXemul printer |
! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=serial)&PLATFORM=arm32&MACHINE=testarm] CONFIG_ARM_PRN (y/n) |
% Support for VIA CUDA controller |
! [CONFIG_HID_IN=generic&PLATFORM=ppc32] CONFIG_VIA_CUDA (y/n) |
% Support for NS16550 controller |
! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64&MACHINE=generic] CONFIG_NS16550 (y/n) |
% Support for NS16550 controller |
! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=serial)&PLATFORM=ia64&MACHINE=i460GX] CONFIG_NS16550 (y/n) |
% Support for Z8530 controller |
! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64&MACHINE=generic] CONFIG_Z8530 (y/n) |
% Support for Serengeti console |
! [CONFIG_HID_OUT=generic&PLATFORM=sparc64&MACHINE=serengeti] CONFIG_SGCN_PRN (y/n) |
% Support for Serengeti keyboard |
! [CONFIG_HID_IN=generic&PLATFORM=sparc64&MACHINE=serengeti] CONFIG_SGCN_KBD (y/n) |
% i8042 controller support |
! [CONFIG_PC_KBD=y] CONFIG_I8042 (y) |
% pl050 controller support |
! [CONFIG_HID_IN=generic&PLATFORM=arm32&MACHINE=integratorcp] CONFIG_PL050 (y) |
% Sun keyboard support |
! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64&MACHINE=generic&(CONFIG_NS16550=y|CONFIG_Z8530=y)] CONFIG_SUN_KBD (y) |
% Macintosh ADB keyboard support |
! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=ppc32&(CONFIG_VIA_CUDA=y)] CONFIG_MAC_KBD (y) |
% Dummy serial line input |
! [CONFIG_MIPS_KBD=y|CONFIG_ARM_KBD=y] CONFIG_DSRLNIN (y) |
% Dummy serial line output |
! [CONFIG_MIPS_PRN=y|CONFIG_ARM_PRN=y] CONFIG_DSRLNOUT (y) |
% Serial line input module |
! [CONFIG_DSRLNIN=y|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&MACHINE=serengeti&CONFIG_SGCN_KBD=y)] CONFIG_SRLN (y) |
% EGA support |
! [CONFIG_HID_OUT=generic&(PLATFORM=ia32|PLATFORM=amd64)] CONFIG_EGA (y/n) |
% EGA support |
! [CONFIG_HID_OUT=generic&PLATFORM=ia64&MACHINE=i460GX] CONFIG_EGA (y/n) |
% Framebuffer support |
! [CONFIG_HID_OUT=generic&(PLATFORM=ia32|PLATFORM=amd64|PLATFORM=ppc32)] CONFIG_FB (y/n) |
% Framebuffer support |
! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=monitor)&PLATFORM=mips32&(MACHINE=lgxemul|MACHINE=bgxemul)] CONFIG_FB (y/n) |
% Framebuffer support |
! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=monitor)&PLATFORM=arm32] CONFIG_FB (y/n) |
% Framebuffer support |
! [(CONFIG_HID_OUT=generic|CONFIG_HID_OUT=monitor)&PLATFORM=sparc64&MACHINE=generic] CONFIG_FB (y/n) |
% Default framebuffer mode |
@ "640x480" |
@ "800x600" |
@ "1024x768" |
@ "1152x720" |
@ "1152x864" |
@ "1280x960" |
@ "1280x1024" |
@ "1400x1050" |
@ "1440x900" |
@ "1440x1050" |
@ "1600x1200" |
@ "1920x1080" |
@ "1920x1200" |
! [(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_HID_OUT!=none&CONFIG_FB=y] CONFIG_VESA_MODE (choice) |
% Default framebuffer depth |
@ "8" |
@ "16" |
@ "24" |
! [(PLATFORM=ia32|PLATFORM=amd64)&CONFIG_HID_OUT!=none&CONFIG_FB=y] CONFIG_VESA_BPP (choice) |
% Start AP processors by the loader |
! [PLATFORM=sparc64&CONFIG_SMP=y] CONFIG_AP (y/n) |
% Use Block Address Translation by the loader |
! [PLATFORM=ppc32] CONFIG_BAT (y/n) |
% Preserve A.OUT header in isofs.b |
! [PLATFORM=sparc64&MACHINE=generic] CONFIG_AOUT_ISOFS_B (y) |
% External ramdisk |
! [PLATFORM=sparc64] CONFIG_RD_EXTERNAL (y/n) |
/branches/arm/boot/arch/arm32/Makefile.inc |
---|
28,15 → 28,15 |
build: $(BASE)/image.boot |
$(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot |
cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot |
$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot |
cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot |
depend: |
-rm arch/$(BARCH)/loader/image.boot |
-rm arch/$(ARCH)/loader/image.boot |
arch/$(BARCH)/loader/image.boot: |
make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) MACHINE=$(MACHINE) |
arch/$(ARCH)/loader/image.boot: |
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) IMAGE=$(IMAGE) MACHINE=$(MACHINE) |
clean: |
make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) IMAGE=$(IMAGE) |
-rm -f $(BASE)/image.boot |
/branches/arm/boot/arch/arm32/loader/print/print.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/boot/arch/arm32/loader/print/write.c |
---|
0,0 → 1,77 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arm32boot |
* @{ |
*/ |
/** @file |
* @brief GXemul specific code. |
*/ |
#include <printf.h> |
/** Address where characters to be printed are expected. */ |
#ifdef MACHINE_GXEMUL_TESTARM |
#define PUTC_ADDRESS 0x10000000 |
#endif |
#ifdef MACHINE_QEMU_ICP |
#define PUTC_ADDRESS 0x16000000 |
#endif |
/** Prints a character to the console. |
* |
* @param ch Character to be printed. |
*/ |
static void putc(char ch) |
{ |
if (ch == '\n') |
*((volatile char *) PUTC_ADDRESS) = '\r'; |
*((volatile char *) PUTC_ADDRESS) = ch; |
} |
/** Prints a string to the console. |
* |
* @param str String to be printed. |
* @param len Number of characters to be printed. |
*/ |
void write(const char *str, const int len) |
{ |
int i; |
for (i = 0; i < len; ++i) { |
putc(str[i]); |
} |
} |
/** @} |
*/ |
/branches/arm/boot/arch/arm32/loader/Makefile |
---|
27,7 → 27,7 |
# |
include ../../../../version |
-include ../../../../Makefile.config |
include ../../../Makefile.config |
## Toolchain configuration |
# |
41,15 → 41,14 |
TARGET = arm-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm/bin |
ifeq ($(MACHINE), testarm) |
ifeq ($(MACHINE), gxemul_testarm) |
DMACHINE = MACHINE_GXEMUL_TESTARM |
endif |
ifeq ($(MACHINE), integratorcp) |
DMACHINE = MACHINE_ICP |
ifeq ($(MACHINE), qemu_icp) |
DMACHINE = MACHINE_QEMU_ICP |
endif |
ifeq ($(COMPILER),gcc_native) |
CC = gcc |
AS = as |
66,17 → 65,28 |
OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump |
endif |
CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../.. -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -pipe |
CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../.. -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 |
ifdef REVISION |
CFLAGS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
ifdef MACHINE |
CFLAGS += "-DMACHINE=$(MACHINE)" |
endif |
SOURCES = \ |
main.c \ |
boot.S \ |
asm.S \ |
mm.c \ |
print/print.c \ |
print/write.c \ |
_components.c \ |
../../../generic/printf.c \ |
../../../generic/string.c \ |
../../../genarch/division.c |
COMPONENTS = \ |
85,7 → 95,7 |
$(USPACEDIR)/srv/loader/loader \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/srv/bd/rd/rd \ |
$(USPACEDIR)/srv/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
ifeq ($(RDFMT),tmpfs) |
COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
98,17 → 108,10 |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/fs/devfs/devfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/bd/file_bd/file_bd |
ifeq ($(MACHINE), testarm) |
RD_SRVS += \ |
$(USPACEDIR)/srv/bd/gxe_bd/gxe_bd |
endif |
$(USPACEDIR)/srv/fs/fat/fat |
RD_APPS = \ |
$(USPACEDIR)/app/getvc/getvc \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/trace/trace \ |
128,7 → 131,7 |
$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ |
depend: |
-makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
clean: |
-for file in $(RD_SRVS) ; do \ |
150,7 → 153,7 |
../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs |
endif |
ifeq ($(RDFMT),fat) |
../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs |
../../../../tools/mkfat.sh $(USPACEDIR)/dist/ initrd.fs |
endif |
../../../../tools/mkhord.py 4096 initrd.fs initrd.img |
rm initrd.fs |
/branches/arm/boot/arch/arm32/loader/boot.S |
---|
59,3 → 59,5 |
# make place for PTL0 page table |
page_table: |
.skip PTL0_ENTRIES * PTL0_ENTRY_SIZE |
/branches/arm/boot/arch/arm32/loader/main.c |
---|
32,16 → 32,13 |
*/ |
/** @file |
* @brief Bootstrap. |
*/ |
*/ |
#include "main.h" |
#include "main.h" |
#include "asm.h" |
#include "_components.h" |
#include <printf.h> |
#include <align.h> |
#include <macros.h> |
#include <string.h> |
#include "mm.h" |
49,16 → 46,16 |
#define KERNEL_VIRTUAL_ADDRESS 0x80200000 |
char *release = STRING(RELEASE); |
char *release = RELEASE; |
#ifdef REVISION |
char *revision = ", revision " STRING(REVISION); |
char *revision = ", revision " REVISION; |
#else |
char *revision = ""; |
#endif |
#ifdef TIMESTAMP |
char *timestamp = "\nBuilt on " STRING(TIMESTAMP); |
char *timestamp = "\nBuilt on " TIMESTAMP; |
#else |
char *timestamp = ""; |
#endif |
67,7 → 64,7 |
/** Prints bootloader version information. */ |
static void version_print(void) |
{ |
printf("HelenOS ARM32 Bootloader\nRelease %s%s%s\nCopyright (c) 2009 HelenOS project\n", |
printf("HelenOS ARM32 Bootloader\nRelease %s%s%s\nCopyright (c) 2007 HelenOS project\n", |
release, revision, timestamp); |
} |
87,37 → 84,31 |
printf(" kernel entry point at %L\n", KERNEL_VIRTUAL_ADDRESS); |
printf(" %L: boot info structure\n", &bootinfo); |
unsigned int i, j; |
for (i = 0; i < COMPONENTS; i++) { |
printf(" %L: %s image (size %d bytes)\n", |
components[i].start, components[i].name, components[i].size); |
} |
printf("\nCopying components\n"); |
unsigned int top = 0; |
bootinfo.cnt = 0; |
unsigned int i, j; |
for (i = 0; i < COMPONENTS; i++) { |
printf(" %s...", components[i].name); |
top = ALIGN_UP(top, KERNEL_PAGE_SIZE); |
memcpy(((void *) KERNEL_VIRTUAL_ADDRESS) + top, components[i].start, components[i].size); |
if (i > 0) { |
bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top; |
bootinfo.tasks[bootinfo.cnt].size = components[i].size; |
strncpy(bootinfo.tasks[bootinfo.cnt].name, |
components[i].name, BOOTINFO_TASK_NAME_BUFLEN); |
bootinfo.cnt++; |
} |
top += components[i].size; |
printf("done.\n"); |
} |
j = bootinfo.cnt - 1; |
printf("\nCopying components\n"); |
printf("Component\tAddress\t\tSize (Bytes)\n"); |
printf("============================================\n"); |
for (i = COMPONENTS - 1; i > 0; i--, j--) { |
printf("%s\t\t0x%x\t%d\n", components[i].name, bootinfo.tasks[j].addr, components[i].size); |
memcpy((void *)bootinfo.tasks[j].addr, components[i].start, |
components[i].size); |
} |
printf("KERNEL\t\t0x%x\t%d\n", KERNEL_VIRTUAL_ADDRESS, components[0].size); |
memcpy((void *)KERNEL_VIRTUAL_ADDRESS, components[0].start, |
components[0].size); |
printf("\nBooting the kernel...\n"); |
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo); |
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo, sizeof(bootinfo)); |
} |
/** @} |
/branches/arm/boot/arch/arm32/loader/asm.h |
---|
32,7 → 32,7 |
*/ |
/** @file |
* @brief Functions implemented in assembly. |
*/ |
*/ |
#ifndef BOOT_arm32_ASM_H |
40,10 → 40,10 |
/** Copies cnt bytes from dst to src. |
* |
* |
* @param dst Destination address. |
* @param src Source address. |
* @param cnt Count of bytes to be copied. |
* @param cnt Count of bytes to be copied. |
*/ |
#define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) |
58,11 → 58,12 |
/** Jumps to the kernel entry point. |
* |
* @param entry Kernel entry point address. |
* @param bootinfo Structure holding information about loaded tasks. |
* |
* @param entry Kernel entry point address. |
* @param bootinfo Structure holding information about loaded tasks. |
* @param bootinfo_size Size of the bootinfo structure. |
*/ |
extern void jump_to_kernel(void *entry, void *bootinfo) __attribute__((noreturn)); |
extern void jump_to_kernel(void *entry, void *bootinfo, |
unsigned int bootinfo_size) __attribute__((noreturn)); |
#endif |
/branches/arm/boot/arch/arm32/loader/main.h |
---|
32,7 → 32,7 |
*/ |
/** @file |
* @brief Boot related declarations. |
*/ |
*/ |
#ifndef BOOT_arm32_MAIN_H |
39,13 → 39,17 |
#define BOOT_arm32_MAIN_H |
/** Aligns to the nearest higher address. |
* |
* @param addr Address or number to be aligned. |
* @param align Size of alignment, must be power of 2. |
*/ |
#define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1)) |
/** Maximum number of tasks in the #bootinfo_t struct. */ |
#define TASKMAP_MAX_RECORDS 32 |
/** Size of buffer for storing task name in task_t. */ |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
/** Struct holding information about single loaded task. */ |
typedef struct { |
/** Address where the task was placed. */ |
52,8 → 56,6 |
void *addr; |
/** Size of the task's binary. */ |
unsigned int size; |
/** Task name. */ |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} task_t; |
72,3 → 74,4 |
/** @} |
*/ |
/branches/arm/boot/arch/sparc64/loader/Makefile |
---|
27,7 → 27,7 |
# |
include ../../../../version |
-include ../../../../Makefile.config |
include ../../../Makefile.config |
## Toolchain configuration |
# |
57,8 → 57,16 |
OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump |
endif |
CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../../genarch -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=ultrasparc -m64 -mno-fpu -pipe |
CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=ultrasparc -m64 -mno-fpu |
ifdef REVISION |
CFLAGS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
SOURCES = \ |
main.c \ |
_components.c \ |
71,9 → 79,6 |
asm.S \ |
boot.S |
# |
# All components that go to image.boot without the ramdisk. |
# |
COMPONENTS = \ |
$(KERNELDIR)/kernel.bin \ |
$(USPACEDIR)/srv/ns/ns \ |
80,7 → 85,7 |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/srv/loader/loader \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/srv/bd/rd/rd \ |
$(USPACEDIR)/srv/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
ifeq ($(RDFMT),tmpfs) |
COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
89,43 → 94,22 |
COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat |
endif |
# |
# Final list of all components that go to image.boot. |
# |
ALL_COMPONENTS = $(COMPONENTS) |
ifeq ($(CONFIG_RD_EXTERNAL),n) |
ALL_COMPONENTS += ./initrd.img |
endif |
RD_SRVS = \ |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/fs/devfs/devfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/bd/file_bd/file_bd |
$(USPACEDIR)/srv/fs/fat/fat |
ifeq ($(MACHINE),generic) |
RD_SRVS += \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/cir/fhc/fhc \ |
$(USPACEDIR)/srv/cir/obio/obio |
endif |
RD_APPS = \ |
$(USPACEDIR)/app/getvc/getvc \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/trace/trace \ |
$(USPACEDIR)/app/bdsh/bdsh \ |
$(USPACEDIR)/app/klog/klog |
ifeq ($(MACHINE),generic) |
RD_APPS += \ |
$(USPACEDIR)/app/tester/tester |
endif |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
ALL_COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(ALL_COMPONENTS)))) |
COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) |
.PHONY: all clean depend |
133,11 → 117,11 |
-include Makefile.depend |
image.boot: depend _components.h _link.ld $(ALL_COMPONENT_OBJECTS) $(OBJECTS) |
$(LD) -Map image.map -no-check-sections -N -T _link.ld $(ALL_COMPONENT_OBJECTS) $(OBJECTS) -o $@ |
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) |
$(LD) -Map image.map -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@ |
depend: |
-makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
clean: |
-for file in $(RD_SRVS) ; do \ |
146,9 → 130,9 |
-for file in $(RD_APPS) ; do \ |
rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ |
done |
-rm -f _components.h _components.c _link.ld $(ALL_COMPONENT_OBJECTS) $(OBJECTS) initrd.img image.boot image.map image.disasm Makefile.depend |
-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) initrd.img image.boot image.map image.disasm Makefile.depend |
_components.h _components.c _link.ld $(ALL_COMPONENT_OBJECTS): $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in |
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in |
for file in $(RD_SRVS) ; do \ |
cp $$file $(USPACEDIR)/dist/srv/ ; \ |
done |
159,11 → 143,11 |
../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs |
endif |
ifeq ($(RDFMT),fat) |
../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs |
../../../../tools/mkfat.sh $(USPACEDIR)/dist/ initrd.fs |
endif |
../../../../tools/mkhord.py 16384 initrd.fs initrd.img |
rm initrd.fs |
../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 1 "unsigned long" $(ALL_COMPONENTS) |
../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 1 "unsigned long" $(COMPONENTS) |
%.o: %.S |
$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/boot/arch/sparc64/loader/main.c |
---|
36,36 → 36,25 |
#include <ofw_tree.h> |
#include "ofwarch.h" |
#include <align.h> |
#include <macros.h> |
#include <string.h> |
bootinfo_t bootinfo; |
component_t components[COMPONENTS]; |
char *release = STRING(RELEASE); |
char *release = RELEASE; |
#ifdef REVISION |
char *revision = ", revision " STRING(REVISION); |
char *revision = ", revision " REVISION; |
#else |
char *revision = ""; |
#endif |
#ifdef TIMESTAMP |
char *timestamp = "\nBuilt on " STRING(TIMESTAMP); |
char *timestamp = "\nBuilt on " TIMESTAMP; |
#else |
char *timestamp = ""; |
#endif |
/** UltraSPARC subarchitecture - 1 for US, 3 for US3 */ |
uint8_t subarchitecture; |
/** |
* mask of the MID field inside the ICBUS_CONFIG register shifted by |
* MID_SHIFT bits to the right |
*/ |
uint16_t mid_mask; |
/** Print version information. */ |
static void version_print(void) |
{ |
74,39 → 63,6 |
release, revision, timestamp); |
} |
/* the lowest ID (read from the VER register) of some US3 CPU model */ |
#define FIRST_US3_CPU 0x14 |
/* the greatest ID (read from the VER register) of some US3 CPU model */ |
#define LAST_US3_CPU 0x19 |
/* UltraSPARC IIIi processor implementation code */ |
#define US_IIIi_CODE 0x15 |
/** |
* Sets the global variables "subarchitecture" and "mid_mask" to |
* correct values. |
*/ |
static void detect_subarchitecture(void) |
{ |
uint64_t v; |
asm volatile ("rdpr %%ver, %0\n" : "=r" (v)); |
v = (v << 16) >> 48; |
if ((v >= FIRST_US3_CPU) && (v <= LAST_US3_CPU)) { |
subarchitecture = SUBARCH_US3; |
if (v == US_IIIi_CODE) |
mid_mask = (1 << 5) - 1; |
else |
mid_mask = (1 << 10) - 1; |
} else if (v < FIRST_US3_CPU) { |
subarchitecture = SUBARCH_US; |
mid_mask = (1 << 5) - 1; |
} else { |
printf("\nThis CPU is not supported by HelenOS."); |
} |
} |
void bootstrap(void) |
{ |
void *base = (void *) KERNEL_VIRTUAL_ADDRESS; |
116,7 → 72,6 |
version_print(); |
detect_subarchitecture(); |
init_components(components); |
if (!ofw_get_physmem_start(&bootinfo.physmem_start)) { |
128,7 → 83,7 |
printf("Error: unable to get memory map, halting.\n"); |
halt(); |
} |
if (bootinfo.memmap.total == 0) { |
printf("Error: no memory detected, halting.\n"); |
halt(); |
143,8 → 98,8 |
silo_ramdisk_image += bootinfo.physmem_start; |
silo_ramdisk_image -= 0x400000; |
/* Install 1:1 mapping for the ramdisk. */ |
if (ofw_map((void *)((uintptr_t) silo_ramdisk_image), |
(void *)((uintptr_t) silo_ramdisk_image), |
if (ofw_map((void *)((uintptr_t)silo_ramdisk_image), |
(void *)((uintptr_t)silo_ramdisk_image), |
silo_ramdisk_size, -1) != 0) { |
printf("Failed to map ramdisk.\n"); |
halt(); |
179,9 → 134,6 |
base + top; |
bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = |
components[i].size; |
strncpy(bootinfo.taskmap.tasks[ |
bootinfo.taskmap.count].name, components[i].name, |
BOOTINFO_TASK_NAME_BUFLEN); |
bootinfo.taskmap.count++; |
} |
top += components[i].size; |
207,8 → 159,7 |
* given to us by SILO. |
*/ |
(void) ofw_claim_phys(base + top, silo_ramdisk_size); |
(void) ofw_map(bootinfo.physmem_start + base + top, base + top, |
silo_ramdisk_size, -1); |
(void) ofw_map(base + top, base + top, silo_ramdisk_size, -1); |
memmove(base + top, (void *)((uintptr_t)silo_ramdisk_image), |
silo_ramdisk_size); |
printf("done.\n"); |
258,8 → 209,7 |
balloc_base = base + ALIGN_UP(top, PAGE_SIZE); |
(void) ofw_claim_phys(bootinfo.physmem_start + balloc_base, |
BALLOC_MAX_SIZE); |
(void) ofw_map(bootinfo.physmem_start + balloc_base, balloc_base, |
BALLOC_MAX_SIZE, -1); |
(void) ofw_map(balloc_base, balloc_base, BALLOC_MAX_SIZE, -1); |
balloc_init(&bootinfo.ballocs, (uintptr_t)balloc_base); |
printf("\nCanonizing OpenFirmware device tree..."); |
266,7 → 216,7 |
bootinfo.ofw_root = ofw_tree_build(); |
printf("done.\n"); |
#ifdef CONFIG_AP |
#ifdef CONFIG_SMP |
printf("\nChecking for secondary processors..."); |
if (!ofw_cpu()) |
printf("Error: unable to get CPU properties\n"); |
273,10 → 223,9 |
printf("done.\n"); |
#endif |
ofw_setup_palette(); |
printf("\nBooting the kernel...\n"); |
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, |
bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo, |
sizeof(bootinfo)); |
} |
/branches/arm/boot/arch/sparc64/loader/boot.S |
---|
43,7 → 43,7 |
.global start |
start: |
ba %xcc, 1f |
b 1f |
nop |
/* |
83,7 → 83,7 |
call ofw_init ! initialize OpenFirmware |
stx %o4, [%l0] |
ba %xcc, bootstrap |
b bootstrap |
nop |
.align STACK_ALIGNMENT |
/branches/arm/boot/arch/sparc64/loader/main.h |
---|
38,19 → 38,12 |
#define TASKMAP_MAX_RECORDS 32 |
/** Size of buffer for storing task name in task_t. */ |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
#define BSP_PROCESSOR 1 |
#define AP_PROCESSOR 0 |
#define SUBARCH_US 1 |
#define SUBARCH_US3 3 |
typedef struct { |
void *addr; |
uint32_t size; |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} task_t; |
typedef struct { |
/branches/arm/boot/arch/sparc64/loader/asm.S |
---|
40,7 → 40,7 |
.global jump_to_kernel |
halt: |
ba %xcc, halt |
b halt |
nop |
memcpy: |
105,28 → 105,9 |
* 1. Make sure that the code we have moved has drained to main memory. |
* 2. Invalidate I-cache. |
* 3. Flush instruction pipeline. |
*/ |
/* |
* US3 processors have a write-invalidate cache, so explicitly |
* invalidating it is not required. Whether to invalidate I-cache |
* or not is decided according to the value of the global |
* "subarchitecture" variable (set in the bootstrap). |
*/ |
set subarchitecture, %g2 |
ldub [%g2], %g2 |
cmp %g2, 3 |
be %xcc, 1f |
nop |
0: |
call icache_flush |
nop |
1: |
membar #StoreStore |
/* |
* Flush the instruction pipeline. |
*/ |
*/ |
call icache_flush |
membar #StoreStore |
flush %i7 |
mov %o0, %l1 |
153,6 → 134,7 |
retl |
! SF Erratum #51 |
nop |
.global ofw |
ofw: |
save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
/branches/arm/boot/arch/sparc64/loader/ofwarch.c |
---|
32,7 → 32,7 |
* @brief Architecture dependent parts of OpenFirmware interface. |
*/ |
#include <ofwarch.h> |
#include <ofwarch.h> |
#include <ofw.h> |
#include <printf.h> |
#include <string.h> |
40,10 → 40,6 |
#include "main.h" |
#include "asm.h" |
/* these tho variables will be set by the detect_subarchitecture function */ |
extern uint8_t subarchitecture; |
extern uint16_t mid_mask; |
void write(const char *str, const int len) |
{ |
int i; |
60,40 → 56,36 |
return flag != -1; |
} |
/** |
* Starts all CPUs represented by following siblings of the given node, |
* except for the current CPU. |
* |
* @param child The first child of the OFW tree node whose children |
* represent CPUs to be woken up. |
* @param current_mid MID of the current CPU, the current CPU will |
* (of course) not be woken up. |
* @return Number of CPUs which have the same parent node as |
* "child". |
*/ |
static int wake_cpus_in_node(phandle child, uint64_t current_mid) |
int ofw_cpu(void) |
{ |
int cpus; |
char type_name[BUF_SIZE]; |
phandle node; |
node = ofw_get_child_node(ofw_root); |
if (node == 0 || node == -1) { |
printf("Could not find any child nodes of the root node.\n"); |
return 0; |
} |
for (cpus = 0; child != 0 && child != -1; |
child = ofw_get_peer_node(child), cpus++) { |
if (ofw_get_property(child, "device_type", type_name, |
uint64_t current_mid; |
asm volatile ("ldxa [%1] %2, %0\n" |
: "=r" (current_mid) |
: "r" (0), "i" (ASI_UPA_CONFIG)); |
current_mid >>= UPA_CONFIG_MID_SHIFT; |
current_mid &= UPA_CONFIG_MID_MASK; |
int cpus; |
for (cpus = 0; node != 0 && node != -1; node = ofw_get_peer_node(node), |
cpus++) { |
if (ofw_get_property(node, "device_type", type_name, |
sizeof(type_name)) > 0) { |
if (strcmp(type_name, "cpu") == 0) { |
uint32_t mid; |
/* |
* "upa-portid" for US, "portid" for US-III, |
* "cpuid" for US-IV |
*/ |
if (ofw_get_property( |
child, "upa-portid", |
&mid, sizeof(mid)) <= 0 |
&& ofw_get_property(child, "portid", |
&mid, sizeof(mid)) <= 0 |
&& ofw_get_property(child, "cpuid", |
&mid, sizeof(mid)) <= 0) |
if (ofw_get_property(node, "upa-portid", &mid, |
sizeof(mid)) <= 0) |
continue; |
if (current_mid != mid) { |
101,7 → 93,7 |
* Start secondary processor. |
*/ |
(void) ofw_call("SUNW,start-cpu", 3, 1, |
NULL, child, KERNEL_VIRTUAL_ADDRESS, |
NULL, node, KERNEL_VIRTUAL_ADDRESS, |
bootinfo.physmem_start | |
AP_PROCESSOR); |
} |
112,59 → 104,12 |
return cpus; |
} |
/** |
* Finds out the current CPU's MID and wakes up all AP processors. |
*/ |
int ofw_cpu(void) |
{ |
int cpus; |
phandle node; |
phandle subnode; |
phandle cpus_parent; |
phandle cmp; |
char name[BUF_SIZE]; |
/* get the current CPU MID */ |
uint64_t current_mid; |
asm volatile ("ldxa [%1] %2, %0\n" |
: "=r" (current_mid) |
: "r" (0), "i" (ASI_ICBUS_CONFIG)); |
current_mid >>= ICBUS_CONFIG_MID_SHIFT; |
current_mid &= mid_mask; |
/* wake up CPUs */ |
cpus_parent = ofw_find_device("/ssm@0,0"); |
if (cpus_parent == 0 || cpus_parent == -1) { |
cpus_parent = ofw_find_device("/"); |
} |
node = ofw_get_child_node(cpus_parent); |
cpus = wake_cpus_in_node(node, current_mid); |
while (node != 0 && node != -1) { |
if (ofw_get_property(node, "name", name, |
sizeof(name)) > 0) { |
if (strcmp(name, "cmp") == 0) { |
subnode = ofw_get_child_node(node); |
cpus += wake_cpus_in_node(subnode, |
current_mid); |
} |
} |
node = ofw_get_peer_node(node); |
} |
return cpus; |
} |
/** Get physical memory starting address. |
* |
* @param start Pointer to variable where the physical memory starting |
* address will be stored. |
* @param start Pointer to variable where the physical memory starting |
* address will be stored. |
* |
* @return Non-zero on succes, zero on failure. |
* @return Non-zero on succes, zero on failure. |
*/ |
int ofw_get_physmem_start(uintptr_t *start) |
{ |
/branches/arm/boot/arch/sparc64/loader/register.h |
---|
33,7 → 33,8 |
#define PSTATE_PRIV_BIT 4 |
#define PSTATE_AM_BIT 8 |
#define ASI_ICBUS_CONFIG 0x4a |
#define ICBUS_CONFIG_MID_SHIFT 17 |
#define ASI_UPA_CONFIG 0x4a |
#define UPA_CONFIG_MID_SHIFT 17 |
#define UPA_CONFIG_MID_MASK 0x1f |
#endif |
/branches/arm/boot/arch/sparc64/Makefile.inc |
---|
26,40 → 26,27 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
TMP = distroot |
TMP=distroot |
ifeq ($(CONFIG_AOUT_ISOFS_B),y) |
SILO_PACKAGE = silo.tar.gz |
else |
SILO_PACKAGE = silo.patched.tar.gz |
endif |
build: $(BASE)/image.iso |
$(BASE)/image.iso: depend arch/$(BARCH)/loader/image.boot |
$(BASE)/image.iso: depend arch/$(ARCH)/loader/image.boot |
mkdir -p $(TMP)/boot |
mkdir -p $(TMP)/HelenOS |
cat arch/$(BARCH)/silo/$(SILO_PACKAGE) | (cd $(TMP)/boot; tar xvfz -) |
cp arch/$(BARCH)/silo/README arch/$(BARCH)/silo/COPYING $(TMP)/boot |
ifeq ($(CONFIG_RD_EXTERNAL),y) |
cp arch/$(BARCH)/silo/silo.conf $(TMP)/boot/silo.conf |
else |
cat arch/$(BARCH)/silo/silo.conf | grep -v initrd > $(TMP)/boot/silo.conf |
endif |
cp arch/$(BARCH)/loader/image.boot $(TMP)/HelenOS/image.boot |
cat arch/$(ARCH)/silo/silo.tar.gz | (cd $(TMP)/boot; tar xvfz -) |
cp arch/$(ARCH)/silo/README arch/$(ARCH)/silo/COPYING arch/$(ARCH)/silo/silo.conf $(TMP)/boot |
cp arch/$(ARCH)/loader/image.boot $(TMP)/HelenOS/image.boot |
gzip -f $(TMP)/HelenOS/image.boot |
ifeq ($(CONFIG_RD_EXTERNAL),y) |
cp arch/$(BARCH)/loader/initrd.img $(TMP)/HelenOS/initrd.img |
endif |
mkisofs -f -G $(TMP)/boot/isofs.b -B ... -r -o $@ $(TMP)/ |
cp arch/$(ARCH)/loader/initrd.img $(TMP)/HelenOS/initrd.img |
mkisofs -f -G $(TMP)/boot/isofs.b -B ... -r -o $(BASE)/image.iso $(TMP)/ |
depend: |
-rm arch/$(BARCH)/loader/image.boot |
-rm arch/$(ARCH)/loader/image.boot |
arch/$(BARCH)/loader/image.boot: |
$(MAKE) -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
arch/$(ARCH)/loader/image.boot: |
$(MAKE) -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)" |
clean: generic_clean |
$(MAKE) -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
$(MAKE) -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
-rm -fr $(TMP) |
-rm -f $(BASE)/image.iso |
/branches/arm/boot/arch/sparc64/silo/silo.patched.tar.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/boot/arch/ia64/loader/Makefile |
---|
27,7 → 27,7 |
# |
include ../../../../version |
-include ../../../../Makefile.config |
include ../../../Makefile.config |
## Toolchain configuration |
# |
47,7 → 47,7 |
LD = ld |
OBJCOPY = objcopy |
OBJDUMP = objdump |
GEFI_PREFIX = |
GEFI_PREXIX = |
endif |
ifeq ($(COMPILER),icc_native) |
68,8 → 68,16 |
endif |
#-mno-pic means do not use gp + imm22 to address data |
CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../../genarch -I../../../../kernel/generic/include -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -pipe |
CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -I../../../../kernel/generic/include -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic |
ifdef REVISION |
CFLAGS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
SOURCES = \ |
main.c \ |
../../../generic/printf.c \ |
79,39 → 87,22 |
asm.S \ |
boot.S |
NOCOMPONENTS = \ |
$(KERNELDIR)/kernel.bin |
COMPONENTS = \ |
$(KERNELDIR)/kernel.bin \ |
$(USPACEDIR)/srv/ns/ns \ |
$(USPACEDIR)/srv/loader/loader \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/srv/bd/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
ifeq ($(RDFMT),tmpfs) |
COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
endif |
ifeq ($(RDFMT),fat) |
COMPONENTS += $(USPACEDIR)/srv/fs/fat/fat |
endif |
RD_SRVS = \ |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/fs/devfs/devfs \ |
$(USPACEDIR)/srv/vfs/vfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/bd/file_bd/file_bd |
RD_APPS = \ |
$(USPACEDIR)/app/getvc/getvc \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/trace/trace \ |
$(USPACEDIR)/app/klog/klog \ |
$(USPACEDIR)/app/bdsh/bdsh |
$(USPACEDIR)/app/klog/klog |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) |
125,41 → 116,22 |
hello.efi: image.boot |
make -C gefi/HelenOS PREFIX=$(GEFI_PREFIX) |
cp gefi/HelenOS/hello.efi ../../../../ |
# cp gefi/HelenOS/hello.efi /boot/efi/ |
cp gefi/HelenOS/image.bin ../../../../ |
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) |
$(LD) -Map image.map -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ |
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) |
$(LD) -Map image.map -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@ |
depend: |
-makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
clean: |
-for file in $(RD_SRVS) ; do \ |
rm -f $(USPACEDIR)/dist/srv/`basename $$file` ; \ |
done |
-for file in $(RD_APPS) ; do \ |
rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ |
done |
-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) image.boot image.map image.disasm initrd.img image.boot Makefile.depend ../../../../image.bin ../../../../hello.efi |
-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot image.map image.disasm Makefile.depend ../../../../image.bin ../../../../hello.efi |
make -C gefi clean |
make -C gefi/HelenOS clean |
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in |
for file in $(RD_SRVS) ; do \ |
cp $$file $(USPACEDIR)/dist/srv/ ; \ |
done |
for file in $(RD_APPS) ; do \ |
cp $$file $(USPACEDIR)/dist/app/ ; \ |
done |
ifeq ($(RDFMT),tmpfs) |
../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs |
endif |
ifeq ($(RDFMT),fat) |
../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs |
endif |
../../../../tools/mkhord.py 16384 initrd.fs initrd.img |
rm initrd.fs |
../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned long" $(COMPONENTS) ./initrd.img |
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in |
../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned long" $(COMPONENTS) |
%.o: %.S |
$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/boot/arch/ia64/loader/gefi/apps/Makefile |
---|
28,7 → 28,7 |
CRTOBJS = ../gnuefi/crt0-efi-$(ARCH).o |
LDSCRIPT = ../gnuefi/elf_$(ARCH)_efi.lds |
LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS) |
LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name) |
LOADLIBES = -lefi -lgnuefi |
FORMAT = efi-app-$(ARCH) |
TARGETS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi printenv.efi t7.efi |
/branches/arm/boot/arch/ia64/loader/gefi/HelenOS/mkimage.c |
---|
File deleted |
/branches/arm/boot/arch/ia64/loader/gefi/HelenOS/division.c |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/boot/arch/ia64/loader/gefi/HelenOS/division.h |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/boot/arch/ia64/loader/gefi/HelenOS/Makefile |
---|
20,7 → 20,6 |
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
# 02111-1307, USA. |
# |
prefix=$(PREFIX) |
include ../Make.defaults |
CDIR=$(TOPDIR)/.. |
32,8 → 31,10 |
LOADLIBES = -lefi -lgnuefi |
FORMAT = efi-app-$(ARCH) |
all: gefi hello.efi |
clean: |
rm -f *.efi *~ *.o *.so *.map *.disass *.bin |
42,30 → 43,18 |
hello.efi: hello.so |
$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \ |
-j .rela -j .reloc --target=$(FORMAT) hello.so hello.efi |
$(OBJDUMP) -d hello.efi > hello.disass |
#When selected first lines or second lines, select if image is linked into hello or not - usefull for network boot |
#hello.so: hello.o image.o division.o |
hello.so: hello.o image.bin division.o |
# $(LD) $(LDFLAGS) -Map hello.map hello.o division.o image.o -o hello.so $(LOADLIBES) #link image inside hello |
$(LD) $(LDFLAGS) -Map hello.map hello.o division.o -o hello.so $(LOADLIBES) #dont link image inside hello |
hello.so: hello.o image.o |
$(LD) $(LDFLAGS) -Map hello.map hello.o -o hello.so $(LOADLIBES) |
hello.o: hello.c |
$(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c hello.c -o hello.o |
division.o: division.c |
$(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c division.c -o division.o |
image.bin: ../../image.boot |
image.o: ../../image.boot |
$(OBJCOPY) -O binary ../../image.boot image.bin |
$(OBJCOPY) -I binary -O elf64-ia64-little -B ia64 image.bin image.o |
image.o: ../../image.boot mkimage |
$(OBJCOPY) -O binary ../../image.boot image.bin |
./mkimage |
$(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c image.c -o image.o |
# $(OBJCOPY) -I binary -O elf64-ia64-little -B ia64 image.bin image.o |
mkimage: mkimage.c |
gcc -o mkimage mkimage.c |
gefi: |
make -C .. prefix=$(PREFIX) |
/branches/arm/boot/arch/ia64/loader/gefi/HelenOS/hello.c |
---|
1,29 → 1,9 |
#include <efi.h> |
#include <efilib.h> |
#include <../../../../../../kernel/arch/ia64/include/bootinfo.h> |
#define KERNEL_LOAD_ADDRESS 0x4400000 |
#define MEM_MAP_DESCRIPTOR_OFFSET_TYPE 0 |
#define MEM_MAP_DESCRIPTOR_OFFSET_BASE 8 |
#define MEM_MAP_DESCRIPTOR_OFFSET_PAGES 24 |
//Link image as a data array into hello - usefull with network boot |
//#define IMAGE_LINKED |
bootinfo_t *bootinfo=(bootinfo_t *)BOOTINFO_ADDRESS; |
#ifdef IMAGE_LINKED |
extern char HOSimage[]; |
extern int HOSimagesize; |
#endif |
static CHAR16 * |
a2u (char *str) |
{ |
35,7 → 15,24 |
mem[i] = 0; |
return mem; |
} |
char HEX[256]; |
char hexs[]="0123456789ABCDEF"; |
/* |
void to_hex(unsigned long long num) |
{ |
int a; |
for(a=15;a>=0;a--) |
{ |
char c=num - (num & 0xfffffffffffffff0LL); |
num/=16; |
c=hexs[c]; |
HEX[a]=c; |
} |
} |
*/ |
EFI_STATUS |
efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab) |
{ |
75,18 → 72,16 |
EFI_FILE *FileHandle; |
BS->HandleProtocol(LoadedImage->DeviceHandle, &FileSystemProtocol, &Vol); |
Vol->OpenVolume (Vol, &CurDir); |
char FileName[1024]; |
char *OsKernelBuffer; |
int i; |
int defaultLoad; |
int imageLoad; |
UINTN Size; |
StrCpy(FileName,DevicePathToStr(LoadedImage->FilePath)); |
for(i=StrLen(FileName);i>=0 && FileName[i]!='\\';i--); |
FileName[i] = 0; |
FileName[0] = 0; |
Print(L"%s\n",LoadedImage->LoadOptions); |
102,13 → 97,11 |
} |
while(LoadOptions[i]==L' ') if(LoadOptions[i++]==0) break; |
if(LoadOptions[i++]==0){ |
if(LoadOptions[i++]==0) |
StrCat(FileName,L"\\image.bin"); |
defaultLoad=1; |
} |
/* else{ |
else{ |
CHAR16 buf[1024]; |
//buf[0]='\\'; |
buf[0]='\\'; |
i--; |
int j; |
for(j=0;LoadOptions[i+j]!=L' '&&LoadOptions[i+j]!=0;j++) |
115,101 → 108,38 |
buf[j+1]=LoadOptions[i+j]; |
buf[j+1]=0; |
StrCat(FileName,buf); |
defaultLoad=0; |
}*/ |
else{ |
CHAR16 buf[1024]; |
//buf[0]='\\'; |
i--; |
int j; |
for(j=0;LoadOptions[i+j]!=L' '&&LoadOptions[i+j]!=0;j++) |
buf[j]=LoadOptions[i+j]; |
buf[j+1]=0; |
StrCat(FileName,buf); |
defaultLoad=0; |
} |
//Print(L"%s\n",FileName); |
imageLoad=1; |
#ifdef IMAGE_LINKED |
if(defaultLoad) { |
Print(L"Using Linked Image\n"); |
imageLoad=0; |
EFI_STATUS stat; |
stat=CurDir->Open(CurDir, &FileHandle, FileName, EFI_FILE_MODE_READ, 0); |
if(EFI_ERROR(stat)){ |
Print(L"Error Opening Image %s\n",FileName); |
return 0; |
} |
#endif |
Size = 0x00400000; |
BS->AllocatePool(EfiLoaderData, Size, &OsKernelBuffer); |
FileHandle->Read(FileHandle, &Size, OsKernelBuffer); |
FileHandle->Close(FileHandle); |
char * HOS; |
if(imageLoad) |
{ |
Size = 0x00400000; |
if(Size<1) return 0; |
Vol->OpenVolume (Vol, &CurDir); |
EFI_STATUS stat; |
stat=CurDir->Open(CurDir, &FileHandle, FileName, EFI_FILE_MODE_READ, 0); |
if(EFI_ERROR(stat)){ |
Print(L"Error Opening Image %s\n",FileName); |
return 0; |
} |
BS->AllocatePool(EfiLoaderData, Size, &OsKernelBuffer); |
FileHandle->Read(FileHandle, &Size, OsKernelBuffer); |
FileHandle->Close(FileHandle); |
HOS = OsKernelBuffer; |
if(Size<1) return 0; |
} |
#ifdef IMAGE_LINKED |
else { |
HOS = HOSimage; |
Size = HOSimagesize; |
Print(L"Image start %llX\n",(long long)HOS); |
Print(L"Image size %llX\n",(long long)Size); |
Print(L"Image &size %llX\n",(long long)&Size); |
} |
#endif |
char * HOS = OsKernelBuffer; |
int HOSSize = Size; |
rArg rSAL; |
rArg rPAL; |
//Setup AP's wake up address |
LibSalProc(0x01000000,2,0x4400200,0,0,0,0,0,&rSAL); |
//Get System Frequency |
UINT64 sys_freq; |
LibSalProc(0x01000012,0,0,0,0,0,0,0,&rSAL); |
sys_freq=rSAL.p1; |
UINT64 freq_scale; |
//Get CPU Frequency to System Frequency ratio |
LibPalProc(14,0,0,0,&rPAL); |
freq_scale=rPAL.p1; |
UINT64 sapic; |
LibGetSalIpiBlock(&sapic); |
Print (L"SAPIC:%X\n", sapic); |
//bootinfo->sapic=sapic; |
UINT64 wakeup_intno; |
LibGetSalWakeupVector(&wakeup_intno); |
Print (L"WAKEUP INTNO:%X\n", wakeup_intno); |
{ |
UINTN cookie; |
void *p=(void *)KERNEL_LOAD_ADDRESS; |
UINTN mapsize,descsize; |
UINT32 desver; |
EFI_STATUS status; |
EFI_MEMORY_DESCRIPTOR emd[1024]; |
mapsize=1024*sizeof(emd); |
status=BS->AllocatePages(AllocateAnyPages,EfiLoaderData,/*(HOSSize>>12)+1*/ 1,p); |
if(EFI_ERROR(status)){ |
220,18 → 150,10 |
return EFI_SUCCESS; |
} |
UINTN no_entryes; |
void * mds; |
mds=LibMemoryMap(&no_entryes,&cookie,&descsize,&desver); |
for(i=0;i<no_entryes;i++) |
{ |
unsigned int type=*((unsigned int *)(mds+i*descsize+MEM_MAP_DESCRIPTOR_OFFSET_TYPE)); |
unsigned long long base=*((unsigned long long *)(mds+i*descsize+MEM_MAP_DESCRIPTOR_OFFSET_BASE)); |
unsigned long long pages=*((unsigned long long *)(mds+i*descsize+MEM_MAP_DESCRIPTOR_OFFSET_PAGES)); |
Print(L"T:%02d %016llX %016llX\n",type,base,pages*EFI_PAGE_SIZE); |
status=BS->GetMemoryMap(&mapsize,emd,&cookie,&descsize,&desver); |
if(EFI_ERROR(status)){ |
Print(L"Error 1\n"); |
return EFI_SUCCESS; |
} |
status=BS->ExitBootServices(image,cookie); |
if(EFI_ERROR(status)){ |
239,62 → 161,12 |
return EFI_SUCCESS; |
} |
} |
int a; |
for(a=0;a<HOSSize;a++){ |
((char *)(0x4400000))[a]=HOS[a]; |
} |
bootinfo->sapic=(unsigned long *)sapic; |
bootinfo->wakeup_intno=wakeup_intno; |
bootinfo->sys_freq=sys_freq; |
bootinfo->freq_scale=freq_scale; |
bootinfo->hello_configured=1; |
bootinfo->memmap_items=0; |
for(i=0;i<no_entryes;i++) |
{ |
unsigned int type=*((unsigned int *)(mds+i*descsize+MEM_MAP_DESCRIPTOR_OFFSET_TYPE)); |
unsigned long long base=*((unsigned long long *)(mds+i*descsize+MEM_MAP_DESCRIPTOR_OFFSET_BASE)); |
unsigned long long pages=*((unsigned long long *)(mds+i*descsize+MEM_MAP_DESCRIPTOR_OFFSET_PAGES)); |
switch (type) |
{ |
case EfiConventionalMemory: |
bootinfo->memmap[bootinfo->memmap_items].type=EFI_MEMMAP_FREE_MEM; |
bootinfo->memmap[bootinfo->memmap_items].base=base; |
bootinfo->memmap[bootinfo->memmap_items].size=pages*EFI_PAGE_SIZE; |
bootinfo->memmap_items++; |
break; |
case EfiMemoryMappedIO: |
bootinfo->memmap[bootinfo->memmap_items].type=EFI_MEMMAP_IO; |
bootinfo->memmap[bootinfo->memmap_items].base=base; |
bootinfo->memmap[bootinfo->memmap_items].size=pages*EFI_PAGE_SIZE; |
bootinfo->memmap_items++; |
break; |
case EfiMemoryMappedIOPortSpace: |
bootinfo->memmap[bootinfo->memmap_items].type=EFI_MEMMAP_IO_PORTS; |
bootinfo->memmap[bootinfo->memmap_items].base=base; |
bootinfo->memmap[bootinfo->memmap_items].size=pages*EFI_PAGE_SIZE; |
bootinfo->memmap_items++; |
break; |
default : |
break; |
} |
} |
//Run Kernel |
asm volatile( |
305,6 → 177,8 |
); |
//Not reached |
while(1){ |
((volatile int *)(0x80000000000b8000))[0]++; |
} |
return EFI_SUCCESS; |
} |
/branches/arm/boot/arch/ia64/loader/gefi/Make.defaults |
---|
27,19 → 27,30 |
# |
INSTALLROOT=/usr/local |
TOPDIR := $(shell pwd) |
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) |
ARCH = ia64 |
INCDIR = -I. -I$(CDIR)/inc -I$(CDIR)/inc/$(ARCH) -I$(CDIR)/inc/protocol |
ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,) |
INCDIR = -I. -I$(CDIR)/inc -I$(CDIR)/inc/$(ARCH) -I$(CDIR)/inc/protocol |
CPPFLAGS = -DCONFIG_$(ARCH) |
CFLAGS = -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -frename-registers -mfixed-range=f32-f127 |
LDFLAGS = -nostdlib |
INSTALL = install |
CFLAGS = -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants |
LDFLAGS = -nostdlib |
INSTALL = install |
CC = $(prefix)gcc |
AS = $(prefix)as |
LD = $(prefix)ld |
AR = $(prefix)ar |
RANLIB = $(prefix)ranlib |
OBJCOPY = $(prefix)objcopy |
OBJDUMP = $(prefix)objdump |
GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.') |
# prefix = |
CC = $(prefix)gcc |
AS = $(prefix)as |
LD = $(prefix)ld |
AR = $(prefix)ar |
RANLIB = $(prefix)ranlib |
OBJCOPY = $(prefix)objcopy |
OBJDUMP = $(prefix)objdump |
ifneq ($(GCC_VERSION),2) |
CFLAGS += -frename-registers |
endif |
CFLAGS += -mfixed-range=f32-f127 |
/branches/arm/boot/arch/ia64/loader/gefi/Makefile |
---|
23,9 → 23,9 |
include Make.defaults |
SUBDIRS = lib gnuefi inc |
SUBDIRS = lib gnuefi inc apps |
all: $(SUBDIRS) |
all: check_gcc $(SUBDIRS) |
$(SUBDIRS): |
$(MAKE) -C $@ |
39,4 → 39,13 |
.PHONY: $(SUBDIRS) clean depend |
# |
# on both platforms you must use gcc 3.0 or higher |
# |
check_gcc: |
ifeq ($(GCC_VERSION),2) |
@echo "you need to use a version of gcc >= 3.0, you are using `$(CC) --version`" |
@exit 1 |
endif |
include Make.rules |
/branches/arm/boot/arch/ia64/loader/_link.ld.in |
---|
12,14 → 12,11 |
*(.data); /* initialized data */ |
_got = . ; |
*(.got .got.*); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); |
} |
.sboot : { |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); |
} |
/DISCARD/ : { |
/branches/arm/boot/arch/ia64/loader/boot.S |
---|
34,7 → 34,6 |
.global start |
start: |
mov ar.rsc = r0 |
# movl r8 = (VRN_KERNEL << VRN_SHIFT) ;; |
movl r1 = 0x4400000 |
58,22 → 57,6 |
mov b1 = r18 ;; |
br.call.sptk.many b0 = b1 |
.align 512 |
ap_start: |
ap_loop: |
movl r18=0x4405000;; |
mov b1 = r18 ;; |
br.call.sptk.many b0 = b1;; |
.align 1024 |
.align 4096 |
.global binfo |
binfo: |
.bss #on this line is ".bss", it cannot be seen in my mcedit :-( |
/branches/arm/boot/arch/ia64/loader/asm.S |
---|
37,5 → 37,7 |
alloc loc0 = ar.pfs, 1, 1, 0, 0 |
movl r8 = 0x4404000;; |
mov b1 = r8 ;; |
mov r1 = in0; #Save bootinfo prt |
mov r1 = in0; |
br.call.sptk.many b0 = b1;; |
.global ofw |
ofw: |
/branches/arm/boot/arch/ia64/loader/main.c |
---|
1,6 → 1,6 |
/* |
* Copyright (c) 2005 Martin Decky |
* Copyright (c) 2006 Jakub Jermar |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
33,13 → 33,11 |
#include "_components.h" |
#include <align.h> |
#include <balloc.h> |
#include <macros.h> |
#include <string.h> |
extern bootinfo_t binfo; |
bootinfo_t bootinfo; |
component_t components[COMPONENTS]; |
char *release = STRING(RELEASE); |
char *release = RELEASE; |
void write(const char *str, const int len) |
{ |
46,22 → 44,15 |
return; |
} |
#define DEFAULT_MEMORY_BASE 0x4000000 |
#define DEFAULT_MEMORY_SIZE 0x4000000 |
#define DEFAULT_LEGACY_IO_BASE 0x00000FFFFC000000 |
#define DEFAULT_LEGACY_IO_SIZE 0x4000000 |
#define DEFAULT_FREQ_SCALE 0x0000000100000001 /* 1/1 */ |
#define DEFAULT_SYS_FREQ 100000000 /* 100MHz */ |
#ifdef REVISION |
char *revision = ", revision " STRING(REVISION); |
char *revision = ", revision " REVISION; |
#else |
char *revision = ""; |
#endif |
#ifdef TIMESTAMP |
char *timestamp = "\nBuilt on " STRING(TIMESTAMP); |
char *timestamp = "\nBuilt on " TIMESTAMP; |
#else |
char *timestamp = ""; |
#endif |
69,18 → 60,26 |
/** Print version information. */ |
static void version_print(void) |
{ |
printf("HelenOS IA64 Bootloader\nRelease %s%s%s\n" |
"Copyright (c) 2006 HelenOS project\n", release, revision, |
timestamp); |
printf("HelenOS IA64 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp); |
} |
void bootstrap(void) |
{ |
int ii; |
bootinfo_t *bootinfo = &binfo; |
//for(ii=0;ii<KERNEL_SIZE;ii++) ((char *)(0x100000))[ii] = ((char *)KERNEL_START)[ii+1]; |
//((int *)(0x100000))[0]++; |
version_print(); |
init_components(components); |
printf("\nSystem info\n"); |
92,46 → 91,20 |
printf(" %P: %s image (size %d bytes)\n", components[i].start, |
components[i].name, components[i].size); |
if (!bootinfo->hello_configured) { |
/* |
* Load configuration defaults for simulators. |
*/ |
bootinfo->memmap_items = 0; |
bootinfo->memmap[bootinfo->memmap_items].base = |
DEFAULT_MEMORY_BASE; |
bootinfo->memmap[bootinfo->memmap_items].size = |
DEFAULT_MEMORY_SIZE; |
bootinfo->memmap[bootinfo->memmap_items].type = |
EFI_MEMMAP_FREE_MEM; |
bootinfo->memmap_items++; |
bootinfo->memmap[bootinfo->memmap_items].base = |
DEFAULT_LEGACY_IO_BASE; |
bootinfo->memmap[bootinfo->memmap_items].size = |
DEFAULT_LEGACY_IO_SIZE; |
bootinfo->memmap[bootinfo->memmap_items].type = |
EFI_MEMMAP_IO_PORTS; |
bootinfo->memmap_items++; |
bootinfo->freq_scale = DEFAULT_FREQ_SCALE; |
bootinfo->sys_freq = DEFAULT_SYS_FREQ; |
} |
bootinfo.taskmap.count = 0; |
for (i = 0; i < COMPONENTS; i++) { |
bootinfo->taskmap.count = 0; |
for (i = 0; i < COMPONENTS; i++) { |
if (i > 0) { |
bootinfo->taskmap.tasks[bootinfo->taskmap.count].addr = |
components[i].start; |
bootinfo->taskmap.tasks[bootinfo->taskmap.count].size = |
components[i].size; |
strncpy(bootinfo->taskmap.tasks[ |
bootinfo->taskmap.count].name, |
components[i].name, BOOTINFO_TASK_NAME_BUFLEN); |
bootinfo->taskmap.count++; |
bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = components[i].start; |
bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size; |
bootinfo.taskmap.count++; |
} |
} |
jump_to_kernel(bootinfo); |
jump_to_kernel(&bootinfo); |
} |
/branches/arm/boot/arch/ia64/loader/main.h |
---|
29,14 → 29,29 |
#ifndef BOOT_ia64_MAIN_H_ |
#define BOOT_ia64_MAIN_H_ |
#include <ofw.h> |
#include <ofw_tree.h> |
#include <types.h> |
#include <../../../../kernel/arch/ia64/include/bootinfo.h> |
#define CONFIG_INIT_TASKS 32 |
typedef struct { |
void *addr; |
size_t size; |
} init_task_t; |
typedef struct { |
count_t count; |
init_task_t tasks[CONFIG_INIT_TASKS]; |
} init_t; |
typedef struct { |
init_t taskmap; |
} bootinfo_t; |
extern bootinfo_t bootinfo; |
extern void start(void); |
extern void bootstrap(void); |
/branches/arm/boot/arch/ia64/loader/types.h |
---|
41,4 → 41,7 |
typedef uint64_t uintptr_t; |
typedef uint64_t unative_t; |
typedef unsigned long count_t; |
#endif |
/branches/arm/boot/arch/ia64/Makefile.inc |
---|
26,17 → 26,22 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#ifeq ($(MACHINE),ski) |
build: $(BASE)/image.boot |
$(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot |
cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot |
$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot |
cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot |
depend: |
-rm arch/$(BARCH)/loader/image.boot |
-rm arch/$(ARCH)/loader/image.boot |
arch/$(BARCH)/loader/image.boot: |
make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
arch/$(ARCH)/loader/image.boot: |
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)" |
clean: generic_clean |
make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)" |
-rm -f $(BASE)/image.boot |
#endif |
/branches/arm/boot/arch/ppc32/yaboot/README |
---|
File deleted |
/branches/arm/boot/arch/ppc32/yaboot/yaboot |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/boot/arch/ppc32/yaboot/bootinfo.txt |
---|
File deleted |
/branches/arm/boot/arch/ppc32/yaboot/maps |
---|
File deleted |
/branches/arm/boot/arch/ppc32/yaboot/yaboot.conf |
---|
File deleted |
/branches/arm/boot/arch/ppc32/yaboot/ofboot.b |
---|
File deleted |
/branches/arm/boot/arch/ppc32/yaboot/COPYING |
---|
File deleted |
/branches/arm/boot/arch/ppc32/loader/Makefile |
---|
27,7 → 27,7 |
# |
include ../../../../version |
-include ../../../../Makefile.config |
include ../../../Makefile.config |
## Toolchain configuration |
# |
57,8 → 57,16 |
OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump |
endif |
CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -I../../../genarch -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc -msoft-float -m32 -pipe |
CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc -msoft-float -m32 |
ifdef REVISION |
CFLAGS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
SOURCES = \ |
main.c \ |
ofwarch.c \ |
65,7 → 73,6 |
_components.c \ |
../../../genarch/ofw.c \ |
../../../generic/printf.c \ |
../../../generic/string.c \ |
asm.S \ |
boot.S |
75,8 → 82,8 |
$(USPACEDIR)/srv/loader/loader \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/srv/bd/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
$(USPACEDIR)/srv/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
ifeq ($(RDFMT),tmpfs) |
COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
endif |
88,13 → 95,10 |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/fs/devfs/devfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/bd/file_bd/file_bd |
$(USPACEDIR)/srv/fs/fat/fat |
RD_APPS = \ |
$(USPACEDIR)/app/getvc/getvc \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/trace/trace \ |
114,7 → 118,7 |
$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ |
depend: |
-makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
clean: |
-for file in $(RD_SRVS) ; do \ |
136,7 → 140,7 |
../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs |
endif |
ifeq ($(RDFMT),fat) |
../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs |
../../../../tools/mkfat.sh $(USPACEDIR)/dist/ initrd.fs |
endif |
../../../../tools/mkhord.py 4096 initrd.fs initrd.img |
rm initrd.fs |
/branches/arm/boot/arch/ppc32/loader/main.c |
---|
32,8 → 32,6 |
#include "_components.h" |
#include <ofw.h> |
#include <align.h> |
#include <macros.h> |
#include <string.h> |
#define HEAP_GAP 1024000 |
74,16 → 72,16 |
} |
} |
char *release = STRING(RELEASE); |
char *release = RELEASE; |
#ifdef REVISION |
char *revision = ", revision " STRING(REVISION); |
char *revision = ", revision " REVISION; |
#else |
char *revision = ""; |
#endif |
#ifdef TIMESTAMP |
char *timestamp = "\nBuilt on " STRING(TIMESTAMP); |
char *timestamp = "\nBuilt on " TIMESTAMP; |
#else |
char *timestamp = ""; |
#endif |
91,7 → 89,7 |
/** Print version information. */ |
static void version_print(void) |
{ |
printf("HelenOS PPC32 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n\n", release, revision, timestamp); |
printf("HelenOS PPC32 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp); |
} |
void bootstrap(void) |
109,29 → 107,25 |
check_align(&trans, "translation table"); |
if (!ofw_memmap(&bootinfo.memmap)) { |
printf("Error: Unable to get memory map, halting.\n"); |
printf("Error: unable to get memory map, halting.\n"); |
halt(); |
} |
if (bootinfo.memmap.total == 0) { |
printf("Error: No memory detected, halting.\n"); |
printf("Error: no memory detected, halting.\n"); |
halt(); |
} |
if (!ofw_screen(&bootinfo.screen)) |
printf("Warning: Unable to get screen properties.\n"); |
printf("Warning: unable to get screen properties.\n"); |
if (!ofw_macio(&bootinfo.macio)) |
printf("Warning: Unable to get macio properties.\n"); |
if (!ofw_keyboard(&bootinfo.keyboard)) |
printf("Warning: unable to get keyboard properties.\n"); |
printf("Device statistics\n"); |
printf("\nDevice statistics\n"); |
printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline); |
printf(" keyboard at %L (size %d bytes)\n", bootinfo.keyboard.addr, bootinfo.keyboard.size); |
if (bootinfo.screen.addr) |
printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline); |
if (bootinfo.macio.addr) |
printf(" macio at %L (size %d bytes)\n", bootinfo.macio.addr, bootinfo.macio.size); |
void *real_mode_pa = ofw_translate(&real_mode); |
void *trans_pa = ofw_translate(&trans); |
void *bootinfo_pa = ofw_translate(&bootinfo); |
167,9 → 161,6 |
if (j == 0) { |
bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = (void *) (pages << PAGE_WIDTH); |
bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size; |
strncpy(bootinfo.taskmap.tasks[bootinfo.taskmap.count].name, |
components[i].name, BOOTINFO_TASK_NAME_BUFLEN); |
bootinfo.taskmap.count++; |
} |
} |
181,8 → 172,6 |
fix_overlap(&trans, &trans_pa, "translation table", &top); |
fix_overlap(&bootinfo, &bootinfo_pa, "boot info", &top); |
ofw_setup_palette(); |
printf("\nBooting the kernel...\n"); |
jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, pages << PAGE_WIDTH, real_mode_pa, (void *) bootinfo.screen.addr, bootinfo.screen.scanline); |
} |
/branches/arm/boot/arch/ppc32/loader/ofwarch.c |
---|
48,24 → 48,22 |
} |
} |
int ofw_macio(macio_t *macio) |
int ofw_keyboard(keyboard_t *keyboard) |
{ |
char device_name[BUF_SIZE]; |
if ((ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0) |
&& (ofw_get_property(ofw_aliases, "mac-io", device_name, sizeof(device_name)) <= 0)) |
if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0) |
return false; |
phandle device = ofw_find_device(device_name); |
if (device == -1) |
return false; |
pci_reg_t pci_reg; |
if (ofw_get_property(device, "assigned-addresses", &pci_reg, sizeof(pci_reg)) <= 0) |
pci_reg_t macio; |
if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0) |
return false; |
macio->addr = (void *) pci_reg.addr.addr_lo; |
macio->size = pci_reg.size_lo; |
keyboard->addr = (void *) macio.addr.addr_lo; |
keyboard->size = macio.size_lo; |
return true; |
} |
/branches/arm/boot/arch/ppc32/loader/_link.ld.in |
---|
1,9 → 1,9 |
OUTPUT_FORMAT("elf32-powerpc") |
OUTPUT_ARCH(powerpc:common) |
ENTRY(start) |
OUTPUT_FORMAT("elf32-powerpc") |
OUTPUT_ARCH(powerpc:common) |
ENTRY(start) |
SECTIONS { |
.boot 0x01000000: AT (0) { |
.boot 0x10000000: AT (0) { |
*(BOOTSTRAP); |
*(REALMODE); |
*(.text); |
10,12 → 10,12 |
*(.rodata); |
*(.rodata.*); |
*(.data); /* initialized data */ |
*(.data); /* initialized data */ |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
[[COMPONENTS]] |
} |
} |
/branches/arm/boot/arch/ppc32/loader/asm.S |
---|
28,26 → 28,8 |
#include "asm.h" |
#include "regname.h" |
#include "debug.inc" |
.macro SMC_COHERENCY addr |
dcbst 0, \addr |
sync |
icbi 0, \addr |
sync |
isync |
.endm |
.macro FLUSH_DCACHE addr |
dcbst 0, \addr |
sync |
isync |
.endm |
.macro TLB_FLUSH reg |
tlbie \reg |
addi \reg, \reg, 0x1000 |
.endm |
.text |
.global halt |
158,6 → 140,9 |
real_mode: |
DEBUG_INIT |
DEBUG_real_mode |
# copy kernel to proper location |
# |
# r5 = trans (pa) |
178,13 → 163,14 |
mtctr r31 |
lwz r29, 0(r5) |
DEBUG_INIT |
DEBUG_copy_loop |
copy_loop: |
lwz r28, 0(r29) |
stw r28, 0(r30) |
SMC_COHERENCY r30 |
addi r29, r29, 4 |
addi r30, r30, 4 |
subi r6, r6, 4 |
194,11 → 180,15 |
bdnz copy_loop |
DEBUG_end_copy_loop |
addi r5, r5, 4 |
b page_copy |
copy_end: |
DEBUG_segments |
# initially fill segment registers |
li r31, 0 |
206,7 → 196,7 |
li r29, 8 |
mtctr r29 |
li r30, 0 # ASID 0 (VSIDs 0 .. 7) |
seg_fill_uspace: |
mtsrin r30, r31 |
230,6 → 220,8 |
# invalidate block address translation registers |
DEBUG_bat |
li r30, 0 |
mtspr ibat0u, r30 |
259,6 → 251,8 |
# create empty Page Hash Table |
# on top of memory, size 64 KB |
DEBUG_pht |
lwz r31, 0(r3) # r31 = memory size |
lis r30, 65536@h |
280,7 → 274,6 |
# write zeroes |
stw r29, 0(r31) |
FLUSH_DCACHE r31 |
addi r31, r31, 4 |
subi r30, r30, 4 |
289,6 → 282,8 |
beq clear_end |
bdnz pht_clear |
DEBUG_end_pht_clear |
clear_end: |
296,6 → 291,8 |
# create BAT identity mapping |
DEBUG_mapping |
lwz r31, 0(r3) # r31 = memory size |
lis r29, 0x0002 |
318,6 → 315,8 |
bdnz bat_mask |
DEBUG_bat_mask |
andi. r31, r31, 0x07ff # mask = mask & 0x07ff (BAT can map up to 256 MB) |
li r29, 2 |
337,90 → 336,16 |
mtspr dbat0l, r30 |
no_bat: |
#endif |
# flush TLB |
DEBUG_tlb |
li r31, 0 |
sync |
tlbia |
tlbsync |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
DEBUG_prepare |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
TLB_FLUSH r31 |
eieio |
tlbsync |
sync |
# start the kernel |
# |
# pc = KERNEL_START_ADDR |
448,6 → 373,8 |
sync |
isync |
DEBUG_rfi |
rfi |
.align PAGE_WIDTH |
/branches/arm/boot/arch/ppc32/loader/regname.h |
---|
208,13 → 208,11 |
#define hid0 1008 |
/* MSR bits */ |
#define msr_dr (1 << 4) |
#define msr_ir (1 << 5) |
#define msr_pr (1 << 14) |
#define msr_ir (1 << 4) |
#define msr_dr (1 << 5) |
#define msr_ee (1 << 15) |
/* HID0 bits */ |
#define hid0_sten (1 << 24) |
#define hid0_ice (1 << 15) |
#define hid0_dce (1 << 14) |
#define hid0_icfi (1 << 11) |
/branches/arm/boot/arch/ppc32/loader/main.h |
---|
33,17 → 33,9 |
#define TASKMAP_MAX_RECORDS 32 |
/** Size of buffer for storing task name in task_t. */ |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
/** Struct holding information about single loaded task. */ |
typedef struct { |
/** Address where the task was placed. */ |
void *addr; |
/** Size of the task's binary. */ |
unsigned int size; |
/** Task name. */ |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} task_t; |
typedef struct { |
55,7 → 47,7 |
memmap_t memmap; |
taskmap_t taskmap; |
screen_t screen; |
macio_t macio; |
keyboard_t keyboard; |
} bootinfo_t; |
extern void start(void); |
/branches/arm/boot/arch/ppc32/loader/debug.inc |
---|
0,0 → 1,11479 |
# |
# Copyright (C) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
.macro DEBUG_INIT |
#ifdef CONFIG_DEBUG |
lis r11, 65535 |
ori r11, r11, 65535 |
lis r12, 0 |
ori r12, r12, 0 |
mr r10, r8 |
#endif |
.endm |
.macro DEBUG_real_mode |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
#endif |
.endm |
.macro DEBUG_copy_loop |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
#endif |
.endm |
.macro DEBUG_end_copy_loop |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r11, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r11, 388(r10) |
stw r11, 392(r10) |
stw r12, 396(r10) |
stw r11, 400(r10) |
stw r11, 404(r10) |
stw r11, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r11, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r11, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r11, 400(r10) |
stw r11, 404(r10) |
stw r11, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r11, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r11, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
#endif |
.endm |
.macro DEBUG_segments |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
#endif |
.endm |
.macro DEBUG_bat |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
#endif |
.endm |
.macro DEBUG_mapping |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
#endif |
.endm |
.macro DEBUG_tlb |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
#endif |
.endm |
.macro DEBUG_prepare |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
#endif |
.endm |
.macro DEBUG_rfi |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
#endif |
.endm |
.macro DEBUG_pht |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
#endif |
.endm |
.macro DEBUG_end_pht_clear |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r11, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r11, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r11, 388(r10) |
stw r11, 392(r10) |
stw r12, 396(r10) |
stw r11, 400(r10) |
stw r11, 404(r10) |
stw r11, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r11, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r11, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r11, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r11, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r11, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
#endif |
.endm |
.macro DEBUG_bat_mask |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
#endif |
.endm |
/branches/arm/boot/arch/ppc32/Makefile.inc |
---|
26,27 → 26,17 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
TMP = distroot |
build: $(BASE)/image.boot |
build: $(BASE)/image.iso |
$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot |
cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot |
$(BASE)/image.iso: depend arch/$(BARCH)/loader/image.boot |
mkdir -p $(TMP)/boot |
mkdir -p $(TMP)/ppc |
cp arch/$(BARCH)/loader/image.boot $(TMP)/boot/image.boot |
cp arch/$(BARCH)/yaboot/ofboot.b $(TMP)/boot/ofboot.b |
cp arch/$(BARCH)/yaboot/bootinfo.txt $(TMP)/ppc/bootinfo.txt |
cp arch/$(BARCH)/yaboot/yaboot $(TMP)/boot/yaboot |
cp arch/$(BARCH)/yaboot/yaboot.conf $(TMP)/boot/yaboot.conf |
mkisofs -hfs -part -map arch/$(BARCH)/yaboot/maps -no-desktop -hfs-volid "HelenOS" -hfs-bless $(TMP)/boot -r -o $@ $(TMP)/ |
depend: |
-rm arch/$(BARCH)/loader/image.boot |
-rm arch/$(ARCH)/loader/image.boot |
arch/$(BARCH)/loader/image.boot: |
$(MAKE) -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
arch/$(ARCH)/loader/image.boot: |
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)" |
clean: generic_clean |
$(MAKE) -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
-rm -fr $(TMP) |
-rm -f $(BASE)/image.iso |
make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)" |
-rm -f $(BASE)/image.boot |
/branches/arm/boot/arch/amd64/Makefile.inc |
---|
26,14 → 26,12 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
TMP = distroot |
INIT_TASKS = \ |
$(USPACEDIR)/srv/ns/ns \ |
$(USPACEDIR)/srv/loader/loader \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/srv/bd/rd/rd \ |
$(USPACEDIR)/srv/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
ifeq ($(RDFMT),tmpfs) |
INIT_TASKS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
47,14 → 45,10 |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/fs/devfs/devfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/bd/ata_bd/ata_bd \ |
$(USPACEDIR)/srv/bd/file_bd/file_bd |
$(USPACEDIR)/srv/fs/fat/fat |
RD_APPS = \ |
$(USPACEDIR)/app/getvc/getvc \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/trace/trace \ |
63,18 → 57,18 |
build: $(BASE)/image.iso |
$(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito arch/$(BARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) |
mkdir -p $(TMP)/boot/grub |
cp arch/$(BARCH)/grub/stage2_eltorito $(TMP)/boot/grub/ |
$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) |
mkdir -p arch/$(ARCH)/iso/boot/grub |
cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/ |
ifneq ($(RDFMT),tmpfs) |
cat arch/$(BARCH)/grub/menu.lst | grep -v "tmpfs" > $(TMP)/boot/grub/menu.lst |
cat arch/$(ARCH)/grub/menu.lst | grep -v "tmpfs" >arch/$(ARCH)/iso/boot/grub/menu.lst |
endif |
ifneq ($(RDFMT),fat) |
cat arch/$(BARCH)/grub/menu.lst | grep -v "fat" > $(TMP)/boot/grub/menu.lst |
cat arch/$(ARCH)/grub/menu.lst | grep -v "fat" >arch/$(ARCH)/iso/boot/grub/menu.lst |
endif |
cp $(KERNELDIR)/kernel.bin $(TMP)/boot/ |
cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/ |
for task in $(INIT_TASKS) ; do \ |
cp $$task $(TMP)/boot/ ; \ |
cp $$task arch/$(ARCH)/iso/boot/ ; \ |
done |
for file in $(RD_SRVS) ; do \ |
cp $$file $(USPACEDIR)/dist/srv/ ; \ |
83,14 → 77,14 |
cp $$file $(USPACEDIR)/dist/app/ ; \ |
done |
ifeq ($(RDFMT),tmpfs) |
$(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/initrd.fs |
$(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs |
endif |
ifeq ($(RDFMT),fat) |
$(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/initrd.fs |
$(BASE)/tools/mkfat.sh $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs |
endif |
$(BASE)/tools/mkhord.py 4096 $(TMP)/boot/initrd.fs $(TMP)/boot/initrd.img |
rm $(TMP)/boot/initrd.fs |
mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(TMP)/ |
$(BASE)/tools/mkhord.py 4096 arch/$(ARCH)/iso/boot/initrd.fs arch/$(ARCH)/iso/boot/initrd.img |
rm arch/$(ARCH)/iso/boot/initrd.fs |
mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/ |
clean: |
-for file in $(RD_SRVS) ; do \ |
99,5 → 93,5 |
-for file in $(RD_APPS) ; do \ |
rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ |
done |
-rm -fr $(TMP) |
-rm -fr arch/$(ARCH)/iso |
-rm -f $(BASE)/image.iso |
/branches/arm/boot/arch/ppc64/loader/Makefile |
---|
0,0 → 1,120 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
include ../../../../version |
include ../../../Makefile.config |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
BFD_NAME = elf64-powerpc |
BFD_ARCH = powerpc:common64 |
TARGET = ppc64-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc64/bin |
ifeq ($(COMPILER),gcc_native) |
CC = gcc |
AS = as |
LD = ld |
OBJCOPY = objcopy |
OBJDUMP = objdump |
endif |
ifeq ($(COMPILER),gcc_cross) |
CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc |
AS = $(TOOLCHAIN_DIR)/$(TARGET)-as |
LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld |
OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy |
OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump |
endif |
CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc64 -msoft-float -m64 |
ifdef REVISION |
CFLAGS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
SOURCES = \ |
main.c \ |
ofwarch.c \ |
_components.c \ |
../../../genarch/ofw.c \ |
../../../generic/printf.c \ |
asm.S \ |
boot.S |
COMPONENTS = \ |
$(KERNELDIR)/kernel.bin \ |
$(USPACEDIR)/srv/ns/ns \ |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/vfs/vfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/trace/trace \ |
$(USPACEDIR)/app/klog/klog |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS)))) |
.PHONY: all clean depend |
all: image.boot |
-include Makefile.depend |
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) |
$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@ |
depend: |
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
clean: |
-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend |
_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in |
../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned long" $(COMPONENTS) |
%.o: %.S |
$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
%.o: %.c |
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@ |
/branches/arm/boot/arch/ppc64/loader/_link.ld.in |
---|
0,0 → 1,27 |
OUTPUT_FORMAT("elf64-powerpc") |
OUTPUT_ARCH(powerpc:common64) |
ENTRY(start) |
SECTIONS { |
.boot 0x0000000010000000: AT (0) { |
*(BOOTSTRAP); |
*(REALMODE); |
*(.text); |
*(.toc); |
*(.opd); |
*(.rodata); |
*(.rodata.*); |
*(.data); /* initialized data */ |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
[[COMPONENTS]] |
} |
/DISCARD/ : { |
*(*); |
} |
} |
/branches/arm/boot/arch/ppc64/loader/main.c |
---|
0,0 → 1,182 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include "main.h" |
#include <printf.h> |
#include "asm.h" |
#include "_components.h" |
#include <ofw.h> |
#include <align.h> |
#define HEAP_GAP 1024000 |
bootinfo_t bootinfo; |
static void check_align(const void *addr, const char *desc) |
{ |
if ((unsigned long) addr % PAGE_SIZE != 0) { |
printf("Error: %s not on page boundary, halting.\n", desc); |
halt(); |
} |
} |
static void fix_overlap(void *va, void **pa, const char *desc, unsigned long *top) |
{ |
if ((unsigned long) *pa + PAGE_SIZE < *top) { |
printf("Warning: %s overlaps kernel physical area\n", desc); |
void *new_va = (void *) (ALIGN_UP((unsigned long) KERNEL_END + HEAP_GAP, PAGE_SIZE) + *top); |
void *new_pa = (void *) (HEAP_GAP + *top); |
*top += PAGE_SIZE; |
if (ofw_map(new_pa, new_va, PAGE_SIZE, 0) != 0) { |
printf("Error: Unable to map page aligned memory at %L (physical %L), halting.\n", new_va, new_pa); |
halt(); |
} |
if ((unsigned long) new_pa + PAGE_SIZE < KERNEL_SIZE) { |
printf("Error: %s cannot be relocated, halting.\n", desc); |
halt(); |
} |
printf("Relocating %L -> %L (physical %L -> %L)\n", va, new_va, *pa, new_pa); |
*pa = new_pa; |
memcpy(new_va, va, PAGE_SIZE); |
} |
} |
char *release = RELEASE; |
#ifdef REVISION |
char *revision = ", revision " REVISION; |
#else |
char *revision = ""; |
#endif |
#ifdef TIMESTAMP |
char *timestamp = "\nBuilt on " TIMESTAMP; |
#else |
char *timestamp = ""; |
#endif |
/** Print version information. */ |
static void version_print(void) |
{ |
printf("HelenOS PPC64 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp); |
} |
void bootstrap(void) |
{ |
version_print(); |
component_t components[COMPONENTS]; |
init_components(components); |
unsigned int i; |
for (i = 0; i < COMPONENTS; i++) |
check_align(components[i].start, components[i].name); |
check_align(&real_mode, "bootstrap trampoline"); |
check_align(&trans, "translation table"); |
if (!ofw_memmap(&bootinfo.memmap)) { |
printf("Error: unable to get memory map, halting.\n"); |
halt(); |
} |
if (bootinfo.memmap.total == 0) { |
printf("Error: no memory detected, halting.\n"); |
halt(); |
} |
if (!ofw_screen(&bootinfo.screen)) { |
printf("Error: unable to get screen properties, halting.\n"); |
halt(); |
} |
if (!ofw_keyboard(&bootinfo.keyboard)) { |
printf("Error: unable to get keyboard properties, halting.\n"); |
halt(); |
} |
printf("\nDevice statistics\n"); |
printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline); |
printf(" keyboard at %L (size %d bytes)\n", bootinfo.keyboard.addr, bootinfo.keyboard.size); |
void *real_mode_pa = ofw_translate(&real_mode); |
void *trans_pa = ofw_translate(&trans); |
void *bootinfo_pa = ofw_translate(&bootinfo); |
printf("\nMemory statistics (total %d MB)\n", bootinfo.memmap.total >> 20); |
printf(" %L: boot info structure (physical %L)\n", &bootinfo, bootinfo_pa); |
printf(" %L: bootstrap trampoline (physical %L)\n", &real_mode, real_mode_pa); |
printf(" %L: translation table (physical %L)\n", &trans, trans_pa); |
for (i = 0; i < COMPONENTS; i++) |
printf(" %L: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size); |
unsigned long top = 0; |
for (i = 0; i < COMPONENTS; i++) |
top += ALIGN_UP(components[i].size, PAGE_SIZE); |
unsigned long pages = ALIGN_UP(KERNEL_SIZE, PAGE_SIZE) >> PAGE_WIDTH; |
for (i = 0; i < pages; i++) { |
void *pa = ofw_translate(KERNEL_START + (i << PAGE_WIDTH)); |
fix_overlap(KERNEL_START + (i << PAGE_WIDTH), &pa, "kernel", &top); |
trans[i] = pa; |
} |
bootinfo.taskmap.count = 0; |
for (i = 1; i < COMPONENTS; i++) { |
unsigned long component_pages = ALIGN_UP(components[i].size, PAGE_SIZE) >> PAGE_WIDTH; |
unsigned long j; |
for (j = 0; j < component_pages; j++) { |
void *pa = ofw_translate(components[i].start + (j << PAGE_WIDTH)); |
fix_overlap(components[i].start + (j << PAGE_WIDTH), &pa, components[i].name, &top); |
trans[pages + j] = pa; |
if (j == 0) { |
bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = (void *) (pages << PAGE_WIDTH); |
bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size; |
bootinfo.taskmap.count++; |
} |
} |
pages += component_pages; |
} |
fix_overlap(&real_mode, &real_mode_pa, "bootstrap trampoline", &top); |
fix_overlap(&trans, &trans_pa, "translation table", &top); |
fix_overlap(&bootinfo, &bootinfo_pa, "boot info", &top); |
printf("\nBooting the kernel...\n"); |
jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, pages << PAGE_WIDTH, real_mode_pa, (void *) bootinfo.screen.addr, bootinfo.screen.scanline); |
} |
/branches/arm/boot/arch/ppc64/loader/ofwarch.h |
---|
0,0 → 1,35 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef BOOT_ppc64_OFWARCH_H_ |
#define BOOT_ppc64_OFWARCH_H_ |
#define OFW_ADDRESS_CELLS 2 |
#define OFW_SIZE_CELLS 2 |
#endif |
/branches/arm/boot/arch/ppc64/loader/asm.S |
---|
0,0 → 1,301 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include "asm.h" |
#include "regname.h" |
#include "debug.inc" |
.text |
.global halt |
.global memcpy |
.global jump_to_kernel |
halt: |
b halt |
memcpy: |
srwi. r7, r5, 3 |
addi r6, r3, -4 |
addi r4, r4, -4 |
beq 2f |
andi. r0, r6, 3 |
mtctr r7 |
bne 5f |
1: |
lwz r7, 4(r4) |
lwzu r8, 8(r4) |
stw r7, 4(r6) |
stwu r8, 8(r6) |
bdnz 1b |
andi. r5, r5, 7 |
2: |
cmplwi 0, r5, 4 |
blt 3f |
lwzu r0, 4(r4) |
addi r5, r5, -4 |
stwu r0, 4(r6) |
3: |
cmpwi 0, r5, 0 |
beqlr |
mtctr r5 |
addi r4, r4, 3 |
addi r6, r6, 3 |
4: |
lbzu r0, 1(r4) |
stbu r0, 1(r6) |
bdnz 4b |
blr |
5: |
subfic r0, r0, 4 |
mtctr r0 |
6: |
lbz r7, 4(r4) |
addi r4, r4, 1 |
stb r7, 4(r6) |
addi r6, r6, 1 |
bdnz 6b |
subf r5, r0, r5 |
rlwinm. r7, r5, 32-3, 3, 31 |
beq 2b |
mtctr r7 |
b 1b |
jump_to_kernel: |
# r3 = bootinfo (pa) |
# r4 = bootinfo_size |
# r5 = trans (pa) |
# r6 = bytes to copy |
# r7 = real_mode (pa) |
# r8 = framebuffer (pa) |
# r9 = scanline |
# disable interrupts |
mfmsr r31 |
rlwinm r31, r31, 0, 17, 15 |
mtmsr r31 |
# set real_mode meeting point address |
mtspr srr0, r7 |
# jumps to real_mode |
mfmsr r31 |
lis r30, ~0@h |
ori r30, r30, ~(msr_ir | msr_dr)@l |
and r31, r31, r30 |
mtspr srr1, r31 |
sync |
isync |
rfid |
.section REALMODE, "ax" |
.align PAGE_WIDTH |
.global real_mode |
real_mode: |
DEBUG_INIT |
DEBUG_real_mode |
# copy kernel to proper location |
# |
# r5 = trans (pa) |
# r6 = bytes to copy |
# r8 = framebuffer (pa) |
# r9 = scanline |
li r31, PAGE_SIZE >> 2 |
li r30, 0 |
page_copy: |
cmpwi r6, 0 |
beq copy_end |
# copy page |
mtctr r31 |
lwz r29, 0(r5) |
DEBUG_INIT |
DEBUG_copy_loop |
copy_loop: |
lwz r28, 0(r29) |
stw r28, 0(r30) |
addi r29, r29, 4 |
addi r30, r30, 4 |
subi r6, r6, 4 |
cmpwi r6, 0 |
beq copy_end |
bdnz copy_loop |
DEBUG_end_copy_loop |
addi r5, r5, 4 |
b page_copy |
copy_end: |
DEBUG_segments |
# initially fill segment registers |
li r31, 0 |
li r29, 8 |
mtctr r29 |
li r30, 0 # ASID 0 (VSIDs 0 .. 7) |
seg_fill_uspace: |
mtsrin r30, r31 |
addi r30, r30, 1 |
addis r31, r31, 0x1000 # move to next SR |
bdnz seg_fill_uspace |
li r29, 8 |
mtctr r29 |
lis r30, 0x4000 # priviledged access only |
ori r30, r30, 8 # ASID 0 (VSIDs 8 .. 15) |
seg_fill_kernel: |
mtsrin r30, r31 |
addi r30, r30, 1 |
addis r31, r31, 0x1000 # move to next SR |
bdnz seg_fill_kernel |
# create empty Page Hash Table |
# on top of memory, size 64 KB |
DEBUG_pht |
lwz r31, 0(r3) # r31 = memory size |
lis r30, 65536@h |
ori r30, r30, 65536@l # r30 = 65536 |
subi r29, r30, 1 # r29 = 65535 |
sub r31, r31, r30 |
andc r31, r31, r29 # pht = ALIGN_DOWN(memory_size - 65536, 65536) |
mtsdr1 r31 |
li r29, 2 |
srw r30, r30, r29 # r30 = 16384 |
li r29, 0 |
pht_clear: |
# write zeroes |
stw r29, 0(r31) |
addi r31, r31, 4 |
subi r30, r30, 4 |
cmpwi r30, 0 |
beq clear_end |
bdnz pht_clear |
DEBUG_end_pht_clear |
clear_end: |
DEBUG_tlb |
tlbia |
tlbsync |
DEBUG_prepare |
# start the kernel |
# |
# pc = KERNEL_START_ADDR |
# r3 = bootinfo (pa) |
# sprg0 = KA2PA(KERNEL_START_ADDR) |
# sprg3 = physical memory size |
# sp = 0 (pa) |
lis r31, KERNEL_START_ADDR@ha |
addi r31, r31, KERNEL_START_ADDR@l |
mtspr srr0, r31 |
subis r31, r31, 0x8000 |
mtsprg0 r31 |
lwz r31, 0(r3) |
mtsprg3 r31 |
li sp, 0 |
mfmsr r31 |
ori r31, r31, (msr_ir | msr_dr)@l |
mtspr srr1, r31 |
sync |
isync |
DEBUG_rfi |
rfid |
.align PAGE_WIDTH |
.global trans |
trans: |
.space (TRANS_SIZE * TRANS_ITEM_SIZE) |
/branches/arm/boot/arch/ppc64/loader/boot.S |
---|
0,0 → 1,42 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#include "regname.h" |
.section BOOTSTRAP, "ax" |
.global start |
start: |
lis r4, ofw_cif@ha |
addi r4, r4, ofw_cif@l |
stw r5, 0(r4) |
bl ofw_init |
b bootstrap |
/branches/arm/boot/arch/ppc64/loader/regname.h |
---|
0,0 → 1,204 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef __ppc32_REGNAME_H__ |
#define __ppc32_REGNAME_H__ |
/* Condition Register Bit Fields */ |
#define cr0 0 |
#define cr1 1 |
#define cr2 2 |
#define cr3 3 |
#define cr4 4 |
#define cr5 5 |
#define cr6 6 |
#define cr7 7 |
/* General Purpose Registers (GPRs) */ |
#define r0 0 |
#define r1 1 |
#define r2 2 |
#define r3 3 |
#define r4 4 |
#define r5 5 |
#define r6 6 |
#define r7 7 |
#define r8 8 |
#define r9 9 |
#define r10 10 |
#define r11 11 |
#define r12 12 |
#define r13 13 |
#define r14 14 |
#define r15 15 |
#define r16 16 |
#define r17 17 |
#define r18 18 |
#define r19 19 |
#define r20 20 |
#define r21 21 |
#define r22 22 |
#define r23 23 |
#define r24 24 |
#define r25 25 |
#define r26 26 |
#define r27 27 |
#define r28 28 |
#define r29 29 |
#define r30 30 |
#define r31 31 |
/* GPR Aliases */ |
#define sp 1 |
/* Floating Point Registers (FPRs) */ |
#define fr0 0 |
#define fr1 1 |
#define fr2 2 |
#define fr3 3 |
#define fr4 4 |
#define fr5 5 |
#define fr6 6 |
#define fr7 7 |
#define fr8 8 |
#define fr9 9 |
#define fr10 10 |
#define fr11 11 |
#define fr12 12 |
#define fr13 13 |
#define fr14 14 |
#define fr15 15 |
#define fr16 16 |
#define fr17 17 |
#define fr18 18 |
#define fr19 19 |
#define fr20 20 |
#define fr21 21 |
#define fr22 22 |
#define fr23 23 |
#define fr24 24 |
#define fr25 25 |
#define fr26 26 |
#define fr27 27 |
#define fr28 28 |
#define fr29 29 |
#define fr30 30 |
#define fr31 31 |
#define vr0 0 |
#define vr1 1 |
#define vr2 2 |
#define vr3 3 |
#define vr4 4 |
#define vr5 5 |
#define vr6 6 |
#define vr7 7 |
#define vr8 8 |
#define vr9 9 |
#define vr10 10 |
#define vr11 11 |
#define vr12 12 |
#define vr13 13 |
#define vr14 14 |
#define vr15 15 |
#define vr16 16 |
#define vr17 17 |
#define vr18 18 |
#define vr19 19 |
#define vr20 20 |
#define vr21 21 |
#define vr22 22 |
#define vr23 23 |
#define vr24 24 |
#define vr25 25 |
#define vr26 26 |
#define vr27 27 |
#define vr28 28 |
#define vr29 29 |
#define vr30 30 |
#define vr31 31 |
#define evr0 0 |
#define evr1 1 |
#define evr2 2 |
#define evr3 3 |
#define evr4 4 |
#define evr5 5 |
#define evr6 6 |
#define evr7 7 |
#define evr8 8 |
#define evr9 9 |
#define evr10 10 |
#define evr11 11 |
#define evr12 12 |
#define evr13 13 |
#define evr14 14 |
#define evr15 15 |
#define evr16 16 |
#define evr17 17 |
#define evr18 18 |
#define evr19 19 |
#define evr20 20 |
#define evr21 21 |
#define evr22 22 |
#define evr23 23 |
#define evr24 24 |
#define evr25 25 |
#define evr26 26 |
#define evr27 27 |
#define evr28 28 |
#define evr29 29 |
#define evr30 30 |
#define evr31 31 |
/* Special Purpose Registers (SPRs) */ |
#define xer 1 |
#define lr 8 |
#define ctr 9 |
#define dec 22 |
#define sdr1 25 |
#define srr0 26 |
#define srr1 27 |
#define sprg0 272 |
#define sprg1 273 |
#define sprg2 274 |
#define sprg3 275 |
#define prv 287 |
#define hid0 1008 |
/* MSR bits */ |
#define msr_ir (1 << 4) |
#define msr_dr (1 << 5) |
/* HID0 bits */ |
#define hid0_ice (1 << 15) |
#define hid0_dce (1 << 14) |
#define hid0_icfi (1 << 11) |
#define hid0_dci (1 << 10) |
#endif |
/branches/arm/boot/arch/ppc64/loader/asm.h |
---|
0,0 → 1,52 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef BOOT_ppc64_ASM_H_ |
#define BOOT_ppc64_ASM_H_ |
#define PAGE_SIZE 4096 |
#define PAGE_WIDTH 12 |
#define TRANS_SIZE 1024 |
#define TRANS_ITEM_SIZE 8 |
#define KERNEL_START_ADDR 0x80008000 |
#ifndef __ASM__ |
#define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) |
extern void *trans[TRANS_SIZE]; |
extern void halt(); |
extern void jump_to_kernel(void *bootinfo, unsigned long bootinfo_size, void *trans, unsigned long kernel_size, void *real_mode, void *fb, unsigned long scanline) __attribute__((noreturn)); |
extern void real_mode(); |
#endif |
#endif |
/branches/arm/boot/arch/ppc64/loader/main.h |
---|
0,0 → 1,58 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef BOOT_ppc64_MAIN_H_ |
#define BOOT_ppc64_MAIN_H_ |
#include "ofw.h" |
#define TASKMAP_MAX_RECORDS 32 |
typedef struct { |
void *addr; |
unsigned long size; |
} task_t; |
typedef struct { |
unsigned long count; |
task_t tasks[TASKMAP_MAX_RECORDS]; |
} taskmap_t; |
typedef struct { |
memmap_t memmap; |
taskmap_t taskmap; |
screen_t screen; |
keyboard_t keyboard; |
} bootinfo_t; |
extern void start(void); |
extern void bootstrap(void); |
extern memmap_t memmap; |
#endif |
/branches/arm/boot/arch/ppc64/loader/ofwarch.c |
---|
0,0 → 1,68 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <ofwarch.h> |
#include <ofw.h> |
#include <printf.h> |
typedef int (* ofw_entry_t)(ofw_args_t *args); |
int ofw(ofw_args_t *args) |
{ |
return ((ofw_entry_t) ofw_cif)(args); |
} |
void write(const char *str, const int len) |
{ |
ofw_write(str, len); |
} |
int ofw_keyboard(keyboard_t *keyboard) |
{ |
char device_name[BUF_SIZE]; |
if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0) |
return false; |
phandle device = ofw_find_device(device_name); |
if (device == -1) |
return false; |
pci_reg_t macio; |
if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0) |
return false; |
keyboard->addr = (void *) (((unsigned long) macio.addr.addr_lo) | (((unsigned long) macio.addr.addr_hi) << 32)); |
keyboard->size = macio.size_lo; |
return true; |
} |
int ofw_translate_failed(ofw_arg_t flag) |
{ |
return 0; |
} |
/branches/arm/boot/arch/ppc64/loader/types.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef BOOT_ppc64_TYPES_H_ |
#define BOOT_ppc64_TYPES_H_ |
#include <gentypes.h> |
typedef signed char int8_t; |
typedef unsigned char uint8_t; |
typedef unsigned short uint16_t; |
typedef unsigned int uint32_t; |
typedef unsigned long uint64_t; |
typedef uint64_t uintptr_t; |
typedef uint64_t unative_t; |
#endif |
/branches/arm/boot/arch/ppc64/loader/debug.inc |
---|
0,0 → 1,11479 |
# |
# Copyright (C) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
.macro DEBUG_INIT |
#ifdef CONFIG_DEBUG |
lis r11, 65535 |
ori r11, r11, 65535 |
lis r12, 0 |
ori r12, r12, 0 |
mr r10, r8 |
#endif |
.endm |
.macro DEBUG_real_mode |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
#endif |
.endm |
.macro DEBUG_copy_loop |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
#endif |
.endm |
.macro DEBUG_end_copy_loop |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r11, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r11, 388(r10) |
stw r11, 392(r10) |
stw r12, 396(r10) |
stw r11, 400(r10) |
stw r11, 404(r10) |
stw r11, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r11, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r11, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r11, 400(r10) |
stw r11, 404(r10) |
stw r11, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r11, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r11, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
#endif |
.endm |
.macro DEBUG_segments |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
#endif |
.endm |
.macro DEBUG_bat |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
#endif |
.endm |
.macro DEBUG_mapping |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
#endif |
.endm |
.macro DEBUG_tlb |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
#endif |
.endm |
.macro DEBUG_prepare |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r12, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
#endif |
.endm |
.macro DEBUG_rfi |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
#endif |
.endm |
.macro DEBUG_pht |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
#endif |
.endm |
.macro DEBUG_end_pht_clear |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r11, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r11, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r11, 388(r10) |
stw r11, 392(r10) |
stw r12, 396(r10) |
stw r11, 400(r10) |
stw r11, 404(r10) |
stw r11, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r11, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r11, 408(r10) |
stw r11, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r11, 260(r10) |
stw r11, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r11, 280(r10) |
stw r11, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r11, 324(r10) |
stw r11, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r11, 344(r10) |
stw r11, 348(r10) |
stw r12, 352(r10) |
stw r11, 356(r10) |
stw r11, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r11, 372(r10) |
stw r11, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r11, 264(r10) |
stw r11, 268(r10) |
stw r11, 272(r10) |
stw r11, 276(r10) |
stw r11, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r11, 300(r10) |
stw r11, 304(r10) |
stw r11, 308(r10) |
stw r11, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r11, 328(r10) |
stw r11, 332(r10) |
stw r11, 336(r10) |
stw r11, 340(r10) |
stw r11, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r11, 360(r10) |
stw r11, 364(r10) |
stw r11, 368(r10) |
stw r12, 372(r10) |
stw r11, 376(r10) |
stw r11, 380(r10) |
stw r12, 384(r10) |
stw r11, 388(r10) |
stw r11, 392(r10) |
stw r11, 396(r10) |
stw r11, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
stw r12, 256(r10) |
stw r12, 260(r10) |
stw r12, 264(r10) |
stw r12, 268(r10) |
stw r12, 272(r10) |
stw r12, 276(r10) |
stw r12, 280(r10) |
stw r12, 284(r10) |
stw r12, 288(r10) |
stw r12, 292(r10) |
stw r12, 296(r10) |
stw r12, 300(r10) |
stw r12, 304(r10) |
stw r12, 308(r10) |
stw r12, 312(r10) |
stw r12, 316(r10) |
stw r12, 320(r10) |
stw r12, 324(r10) |
stw r12, 328(r10) |
stw r12, 332(r10) |
stw r12, 336(r10) |
stw r12, 340(r10) |
stw r12, 344(r10) |
stw r12, 348(r10) |
stw r12, 352(r10) |
stw r12, 356(r10) |
stw r12, 360(r10) |
stw r12, 364(r10) |
stw r12, 368(r10) |
stw r12, 372(r10) |
stw r12, 376(r10) |
stw r12, 380(r10) |
stw r12, 384(r10) |
stw r12, 388(r10) |
stw r12, 392(r10) |
stw r12, 396(r10) |
stw r12, 400(r10) |
stw r12, 404(r10) |
stw r12, 408(r10) |
stw r12, 412(r10) |
#endif |
.endm |
.macro DEBUG_bat_mask |
#ifdef CONFIG_DEBUG |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r11, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r11, 68(r10) |
stw r11, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r12, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r11, 140(r10) |
stw r11, 144(r10) |
stw r11, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r11, 240(r10) |
stw r11, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r11, 244(r10) |
stw r11, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r11, 24(r10) |
stw r11, 28(r10) |
stw r12, 32(r10) |
stw r11, 36(r10) |
stw r11, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r11, 52(r10) |
stw r11, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r11, 76(r10) |
stw r11, 80(r10) |
stw r12, 84(r10) |
stw r11, 88(r10) |
stw r11, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r11, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r11, 164(r10) |
stw r11, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r11, 180(r10) |
stw r11, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r11, 196(r10) |
stw r11, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r11, 216(r10) |
stw r11, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r11, 8(r10) |
stw r11, 12(r10) |
stw r11, 16(r10) |
stw r11, 20(r10) |
stw r11, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r11, 40(r10) |
stw r11, 44(r10) |
stw r11, 48(r10) |
stw r12, 52(r10) |
stw r11, 56(r10) |
stw r11, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r11, 80(r10) |
stw r11, 84(r10) |
stw r11, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r11, 132(r10) |
stw r11, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r11, 152(r10) |
stw r11, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r11, 168(r10) |
stw r11, 172(r10) |
stw r11, 176(r10) |
stw r12, 180(r10) |
stw r11, 184(r10) |
stw r11, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r11, 200(r10) |
stw r11, 204(r10) |
stw r11, 208(r10) |
stw r11, 212(r10) |
stw r11, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r11, 228(r10) |
stw r11, 232(r10) |
stw r11, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r11, 248(r10) |
stw r11, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r11, 100(r10) |
stw r11, 104(r10) |
stw r11, 108(r10) |
stw r11, 112(r10) |
stw r11, 116(r10) |
stw r11, 120(r10) |
stw r11, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
add r10, r10, r9 |
stw r12, 0(r10) |
stw r12, 4(r10) |
stw r12, 8(r10) |
stw r12, 12(r10) |
stw r12, 16(r10) |
stw r12, 20(r10) |
stw r12, 24(r10) |
stw r12, 28(r10) |
stw r12, 32(r10) |
stw r12, 36(r10) |
stw r12, 40(r10) |
stw r12, 44(r10) |
stw r12, 48(r10) |
stw r12, 52(r10) |
stw r12, 56(r10) |
stw r12, 60(r10) |
stw r12, 64(r10) |
stw r12, 68(r10) |
stw r12, 72(r10) |
stw r12, 76(r10) |
stw r12, 80(r10) |
stw r12, 84(r10) |
stw r12, 88(r10) |
stw r12, 92(r10) |
stw r12, 96(r10) |
stw r12, 100(r10) |
stw r12, 104(r10) |
stw r12, 108(r10) |
stw r12, 112(r10) |
stw r12, 116(r10) |
stw r12, 120(r10) |
stw r12, 124(r10) |
stw r12, 128(r10) |
stw r12, 132(r10) |
stw r12, 136(r10) |
stw r12, 140(r10) |
stw r12, 144(r10) |
stw r12, 148(r10) |
stw r12, 152(r10) |
stw r12, 156(r10) |
stw r12, 160(r10) |
stw r12, 164(r10) |
stw r12, 168(r10) |
stw r12, 172(r10) |
stw r12, 176(r10) |
stw r12, 180(r10) |
stw r12, 184(r10) |
stw r12, 188(r10) |
stw r12, 192(r10) |
stw r12, 196(r10) |
stw r12, 200(r10) |
stw r12, 204(r10) |
stw r12, 208(r10) |
stw r12, 212(r10) |
stw r12, 216(r10) |
stw r12, 220(r10) |
stw r12, 224(r10) |
stw r12, 228(r10) |
stw r12, 232(r10) |
stw r12, 236(r10) |
stw r12, 240(r10) |
stw r12, 244(r10) |
stw r12, 248(r10) |
stw r12, 252(r10) |
#endif |
.endm |
/branches/arm/boot/arch/ppc64/Makefile.inc |
---|
0,0 → 1,42 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
build: $(BASE)/image.boot |
$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot |
cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot |
depend: |
-rm arch/$(ARCH)/loader/image.boot |
arch/$(ARCH)/loader/image.boot: |
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
clean: generic_clean |
make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
-rm -f $(BASE)/image.boot |
/branches/arm/boot/arch/mips32/loader/_link.ld.in |
---|
File deleted |
/branches/arm/boot/arch/mips32/loader/Makefile |
---|
27,7 → 27,7 |
# |
include ../../../../version |
-include ../../../../Makefile.config |
include ../../../Makefile.config |
## Toolchain configuration |
# |
36,25 → 36,17 |
CROSS_PREFIX = /usr/local |
endif |
ifeq ($(IMAGE),binary) |
LD_IN = binary |
endif |
ifeq ($(IMAGE),ecoff) |
LD_IN = ecoff |
endif |
BFD_NAME = elf32-tradlittlemips |
BFD_ARCH = mips |
TARGET = mipsel-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/mipsel/bin |
ifeq ($(MACHINE),lgxemul) |
BFD_NAME = elf32-tradlittlemips |
BFD = ecoff-littlemips |
endif |
ifeq ($(MACHINE),bgxemul) |
BFD_NAME = elf32-tradbigmips |
BFD = ecoff-bigmips |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips/bin |
TARGET = mips-linux-gnu |
endif |
ifeq ($(MACHINE),msim) |
BFD_NAME = elf32-tradlittlemips |
BFD = binary |
endif |
ifeq ($(COMPILER),gcc_native) |
CC = gcc |
AS = as |
71,14 → 63,21 |
OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump |
endif |
CFLAGS = -DRELEASE=$(RELEASE) -I. -I../../../generic -imacros ../../../../config.h -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mhard-float -mips3 -pipe |
CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mhard-float -mips3 |
ifdef REVISION |
CFLAGS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
SOURCES = \ |
main.c \ |
msim.c \ |
_components.c \ |
../../../generic/printf.c \ |
../../../generic/string.c \ |
asm.S \ |
boot.S |
88,8 → 87,8 |
$(USPACEDIR)/srv/loader/loader \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/srv/bd/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
$(USPACEDIR)/srv/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
ifeq ($(RDFMT),tmpfs) |
COMPONENTS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
endif |
101,14 → 100,10 |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/fs/devfs/devfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/bd/file_bd/file_bd \ |
$(USPACEDIR)/srv/bd/gxe_bd/gxe_bd |
$(USPACEDIR)/srv/fs/fat/fat |
RD_APPS = \ |
$(USPACEDIR)/app/getvc/getvc \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/trace/trace \ |
124,14 → 119,11 |
-include Makefile.depend |
image.boot: image.raw |
$(OBJCOPY) -O $(BFD) $< $@ |
image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) |
$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) -o $@ |
image.raw: depend _components.h _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) |
$(LD) -no-check-sections -N -T _link.ld -o $@ $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) |
depend: |
-makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
clean: |
-for file in $(RD_SRVS) ; do \ |
140,7 → 132,7 |
-for file in $(RD_APPS) ; do \ |
rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ |
done |
-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.raw image.boot Makefile.depend |
-rm -f _components.h _components.c _link.ld _link.ld.in $(COMPONENT_OBJECTS) initrd.o $(OBJECTS) initrd.img image.boot Makefile.depend |
_components.h _components.c _link.ld $(COMPONENT_OBJECTS) initrd.o: $(COMPONENTS) $(RD_SRVS) $(RD_APPS) _link.ld.in |
for file in $(RD_SRVS) ; do \ |
153,12 → 145,15 |
../../../../tools/mktmpfs.py $(USPACEDIR)/dist/ initrd.fs |
endif |
ifeq ($(RDFMT),fat) |
../../../../tools/mkfat.py $(USPACEDIR)/dist/ initrd.fs |
../../../../tools/mkfat.sh $(USPACEDIR)/dist/ initrd.fs |
endif |
../../../../tools/mkhord.py 16384 initrd.fs initrd.img |
rm initrd.fs |
../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 16384 "unsigned int" $(COMPONENTS) ./initrd.img |
_link.ld.in: _link.ld.in.$(LD_IN) |
cp $< $@ |
%.o: %.S |
$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/boot/arch/mips32/loader/_link.ld.in.ecoff |
---|
0,0 → 1,21 |
OUTPUT_FORMAT("ecoff-littlemips") |
ENTRY(start) |
SECTIONS { |
.boot 0xbfc00000: AT (0) { |
*(BOOTSTRAP); |
*(.text); |
*(.rodata); |
*(.rodata.*); |
*(.data); /* initialized data */ |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
*(.scommon); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
*(.reginfo); |
[[COMPONENTS]] |
} |
} |
/branches/arm/boot/arch/mips32/loader/_link.ld.in.binary |
---|
0,0 → 1,21 |
OUTPUT_FORMAT("binary") |
ENTRY(start) |
SECTIONS { |
.boot 0xbfc00000: AT (0) { |
*(BOOTSTRAP); |
*(.text); |
*(.rodata); |
*(.rodata.*); |
*(.data); /* initialized data */ |
*(.sdata); |
*(.sdata2); |
*(.sbss); |
*(.scommon); |
*(.bss); /* uninitialized static variables */ |
*(COMMON); /* global variables */ |
*(.reginfo); |
[[COMPONENTS]] |
} |
} |
/branches/arm/boot/arch/mips32/loader/main.c |
---|
28,9 → 28,6 |
#include "main.h" |
#include <printf.h> |
#include <align.h> |
#include <macros.h> |
#include <string.h> |
#include "msim.h" |
#include "asm.h" |
#include "_components.h" |
37,16 → 34,16 |
#define KERNEL_VIRTUAL_ADDRESS 0x80100000 |
char *release = STRING(RELEASE); |
char *release = RELEASE; |
#ifdef REVISION |
char *revision = ", revision " STRING(REVISION); |
char *revision = ", revision " REVISION; |
#else |
char *revision = ""; |
#endif |
#ifdef TIMESTAMP |
char *timestamp = "\nBuilt on " STRING(TIMESTAMP); |
char *timestamp = "\nBuilt on " TIMESTAMP; |
#else |
char *timestamp = ""; |
#endif |
75,10 → 72,9 |
printf(" %L: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size); |
printf("\nCopying components\n"); |
unsigned int top = 0; |
bootinfo.cnt = 0; |
for (i = 0; i < min(COMPONENTS, TASKMAP_MAX_RECORDS); i++) { |
for (i = 0; i < COMPONENTS; i++) { |
printf(" %s...", components[i].name); |
top = ALIGN_UP(top, PAGE_SIZE); |
memcpy(((void *) KERNEL_VIRTUAL_ADDRESS) + top, components[i].start, components[i].size); |
85,8 → 81,6 |
if (i > 0) { |
bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top; |
bootinfo.tasks[bootinfo.cnt].size = components[i].size; |
strncpy(bootinfo.tasks[bootinfo.cnt].name, |
components[i].name, BOOTINFO_TASK_NAME_BUFLEN); |
bootinfo.cnt++; |
} |
top += components[i].size; |
93,13 → 87,6 |
printf("done.\n"); |
} |
unsigned int *cpumap = (unsigned int *) CPUMAP; |
bootinfo.cpumap = 0; |
for (i = 0; i < CPUMAP_MAX_RECORDS; i++) { |
if (cpumap[i] != 0) |
bootinfo.cpumap |= (1 << i); |
} |
printf("\nBooting the kernel...\n"); |
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo); |
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo, sizeof(bootinfo)); |
} |
/branches/arm/boot/arch/mips32/loader/asm.h |
---|
29,11 → 29,11 |
#ifndef BOOT_mips32_ASM_H_ |
#define BOOT_mips32_ASM_H_ |
#define PAGE_SIZE 16384 |
#define PAGE_WIDTH 14 |
#define PAGE_SIZE 16384 |
#define PAGE_WIDTH 14 |
#define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) |
#define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) |
void jump_to_kernel(void *entry, void *bootinfo) __attribute__((noreturn)); |
void jump_to_kernel(void *entry, void *bootinfo, unsigned int bootinfo_size) __attribute__((noreturn)); |
#endif |
/branches/arm/boot/arch/mips32/loader/main.h |
---|
29,30 → 29,21 |
#ifndef BOOT_mips32_MAIN_H_ |
#define BOOT_mips32_MAIN_H_ |
#define CPUMAP 0x80001000 |
#define INITIAL_STACK 0x80002000 |
#define MSIM_DORDER_ADDRESS 0xb0000004 |
/** Align to the nearest higher address. |
* |
* @param addr Address or size to be aligned. |
* @param align Size of alignment, must be power of 2. |
*/ |
#define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1)) |
#define TASKMAP_MAX_RECORDS 32 |
#define CPUMAP_MAX_RECORDS 32 |
#define TASKMAP_MAX_RECORDS 32 |
#ifndef __ASM__ |
/** Size of buffer for storing task name in task_t. */ |
#define BOOTINFO_TASK_NAME_BUFLEN 32 |
/** Struct holding information about single loaded task. */ |
typedef struct { |
/** Address where the task was placed. */ |
void *addr; |
/** Size of the task's binary. */ |
unsigned int size; |
/** Task name. */ |
char name[BOOTINFO_TASK_NAME_BUFLEN]; |
} task_t; |
typedef struct { |
unsigned int cpumap; |
unsigned int cnt; |
task_t tasks[TASKMAP_MAX_RECORDS]; |
} bootinfo_t; |
61,5 → 52,3 |
extern void bootstrap(void); |
#endif |
#endif |
/branches/arm/boot/arch/mips32/loader/boot.S |
---|
27,8 → 27,9 |
# |
#include "regname.h" |
#include "main.h" |
#define INITIAL_STACK 0x80040000 |
.set noat |
.set noreorder |
.set nomacro |
37,82 → 38,8 |
.global start |
start: |
lui $sp, INITIAL_STACK >> 16 |
ori $sp, $sp, INITIAL_STACK & 0xffff |
/* Setup CPU map (on msim this code |
is executed in parallel on all CPUs, |
but it not an issue) */ |
la $a0, CPUMAP |
sw $zero, 0($a0) |
sw $zero, 4($a0) |
sw $zero, 8($a0) |
sw $zero, 12($a0) |
sw $zero, 16($a0) |
sw $zero, 20($a0) |
sw $zero, 24($a0) |
sw $zero, 28($a0) |
sw $zero, 32($a0) |
sw $zero, 36($a0) |
sw $zero, 40($a0) |
sw $zero, 44($a0) |
sw $zero, 48($a0) |
sw $zero, 52($a0) |
sw $zero, 56($a0) |
sw $zero, 60($a0) |
sw $zero, 64($a0) |
sw $zero, 68($a0) |
sw $zero, 72($a0) |
sw $zero, 76($a0) |
sw $zero, 80($a0) |
sw $zero, 84($a0) |
sw $zero, 88($a0) |
sw $zero, 92($a0) |
sw $zero, 96($a0) |
sw $zero, 100($a0) |
sw $zero, 104($a0) |
sw $zero, 108($a0) |
sw $zero, 112($a0) |
sw $zero, 116($a0) |
sw $zero, 120($a0) |
sw $zero, 124($a0) |
lui $a1, 1 |
#ifdef MACHINE_msim |
/* Read dorder value */ |
la $k0, MSIM_DORDER_ADDRESS |
lw $k1, ($k0) |
/* If we are not running on BSP |
then end in an infinite loop */ |
beq $k1, $zero, bsp |
j bootstrap |
nop |
/* Record CPU presence */ |
sll $a2, $k1, 2 |
addu $a2, $a2, $a0 |
sw $a1, ($a2) |
loop: |
j loop |
nop |
#endif |
bsp: |
/* Record CPU presence */ |
sw $a1, ($a0) |
/* Setup initial stack */ |
la $sp, INITIAL_STACK |
j bootstrap |
nop |
/branches/arm/boot/arch/mips32/Makefile.inc |
---|
28,15 → 28,15 |
build: $(BASE)/image.boot |
$(BASE)/image.boot: depend arch/$(BARCH)/loader/image.boot |
cp arch/$(BARCH)/loader/image.boot $(BASE)/image.boot |
$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot |
cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot |
depend: |
-rm arch/$(BARCH)/loader/image.boot |
-rm arch/$(ARCH)/loader/image.boot |
arch/$(BARCH)/loader/image.boot: |
make -C arch/$(BARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
arch/$(ARCH)/loader/image.boot: |
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) IMAGE=$(IMAGE) |
clean: |
make -C arch/$(BARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) |
make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) IMAGE=$(IMAGE) |
-rm -f $(BASE)/image.boot |
/branches/arm/boot/arch/ia32/Makefile.inc |
---|
26,15 → 26,13 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
TMP = distroot |
INIT_TASKS = \ |
$(USPACEDIR)/srv/ns/ns \ |
$(USPACEDIR)/srv/loader/loader \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/srv/bd/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
$(USPACEDIR)/srv/rd/rd \ |
$(USPACEDIR)/srv/vfs/vfs |
ifeq ($(RDFMT),tmpfs) |
INIT_TASKS += $(USPACEDIR)/srv/fs/tmpfs/tmpfs |
endif |
47,14 → 45,9 |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/fs/devfs/devfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/bd/ata_bd/ata_bd \ |
$(USPACEDIR)/srv/bd/file_bd/file_bd |
$(USPACEDIR)/srv/fs/fat/fat |
RD_APPS = \ |
$(USPACEDIR)/app/getvc/getvc \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/trace/trace \ |
63,18 → 56,18 |
build: $(BASE)/image.iso |
$(BASE)/image.iso: arch/$(BARCH)/grub/stage2_eltorito arch/$(BARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) |
mkdir -p $(TMP)/boot/grub |
cp arch/$(BARCH)/grub/stage2_eltorito $(TMP)/boot/grub/ |
$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst $(KERNELDIR)/kernel.bin $(INIT_TASKS) $(RD_SRVS) $(RD_APPS) |
mkdir -p arch/$(ARCH)/iso/boot/grub |
cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/ |
ifneq ($(RDFMT),tmpfs) |
cat arch/$(BARCH)/grub/menu.lst | grep -v "tmpfs" > $(TMP)/boot/grub/menu.lst |
cat arch/$(ARCH)/grub/menu.lst | grep -v "tmpfs" >arch/$(ARCH)/iso/boot/grub/menu.lst |
endif |
ifneq ($(RDFMT),fat) |
cat arch/$(BARCH)/grub/menu.lst | grep -v "fat" > $(TMP)/boot/grub/menu.lst |
cat arch/$(ARCH)/grub/menu.lst | grep -v "fat" >arch/$(ARCH)/iso/boot/grub/menu.lst |
endif |
cp $(KERNELDIR)/kernel.bin $(TMP)/boot/ |
cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/ |
for task in $(INIT_TASKS) ; do \ |
cp $$task $(TMP)/boot/ ; \ |
cp $$task arch/$(ARCH)/iso/boot/ ; \ |
done |
for file in $(RD_SRVS) ; do \ |
cp $$file $(USPACEDIR)/dist/srv/ ; \ |
83,14 → 76,14 |
cp $$file $(USPACEDIR)/dist/app/ ; \ |
done |
ifeq ($(RDFMT),tmpfs) |
$(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ $(TMP)/boot/initrd.fs |
$(BASE)/tools/mktmpfs.py $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs |
endif |
ifeq ($(RDFMT),fat) |
$(BASE)/tools/mkfat.py $(USPACEDIR)/dist/ $(TMP)/boot/initrd.fs |
$(BASE)/tools/mkfat.sh $(USPACEDIR)/dist/ arch/$(ARCH)/iso/boot/initrd.fs |
endif |
$(BASE)/tools/mkhord.py 4096 $(TMP)/boot/initrd.fs $(TMP)/boot/initrd.img |
rm $(TMP)/boot/initrd.fs |
mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $@ $(TMP)/ |
$(BASE)/tools/mkhord.py 4096 arch/$(ARCH)/iso/boot/initrd.fs arch/$(ARCH)/iso/boot/initrd.img |
rm arch/$(ARCH)/iso/boot/initrd.fs |
mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/ |
clean: |
-for file in $(RD_SRVS) ; do \ |
99,5 → 92,5 |
-for file in $(RD_APPS) ; do \ |
rm -f $(USPACEDIR)/dist/app/`basename $$file` ; \ |
done |
-rm -fr $(TMP) |
-rm -fr arch/$(ARCH)/iso |
-rm -f $(BASE)/image.iso |
/branches/arm/boot/arch/ia32/grub |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/boot/arch/ia32/grub/menu.lst |
---|
0,0 → 1,15 |
default 0 |
timeout 10 |
title=HelenOS |
root (cd) |
kernel /boot/kernel.bin |
module /boot/ns |
module /boot/init |
module /boot/devmap |
module /boot/rd |
module /boot/vfs |
module /boot/tmpfs |
module /boot/fat |
module /boot/loader |
module /boot/initrd.img |
/branches/arm/boot/arch/ia32/grub/stage2_eltorito |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/boot/arch/ia32/grub/COPYING |
---|
0,0 → 1,340 |
GNU GENERAL PUBLIC LICENSE |
Version 2, June 1991 |
Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Everyone is permitted to copy and distribute verbatim copies |
of this license document, but changing it is not allowed. |
Preamble |
The licenses for most software are designed to take away your |
freedom to share and change it. By contrast, the GNU General Public |
License is intended to guarantee your freedom to share and change free |
software--to make sure the software is free for all its users. This |
General Public License applies to most of the Free Software |
Foundation's software and to any other program whose authors commit to |
using it. (Some other Free Software Foundation software is covered by |
the GNU Library General Public License instead.) You can apply it to |
your programs, too. |
When we speak of free software, we are referring to freedom, not |
price. Our General Public Licenses are designed to make sure that you |
have the freedom to distribute copies of free software (and charge for |
this service if you wish), that you receive source code or can get it |
if you want it, that you can change the software or use pieces of it |
in new free programs; and that you know you can do these things. |
To protect your rights, we need to make restrictions that forbid |
anyone to deny you these rights or to ask you to surrender the rights. |
These restrictions translate to certain responsibilities for you if you |
distribute copies of the software, or if you modify it. |
For example, if you distribute copies of such a program, whether |
gratis or for a fee, you must give the recipients all the rights that |
you have. You must make sure that they, too, receive or can get the |
source code. And you must show them these terms so they know their |
rights. |
We protect your rights with two steps: (1) copyright the software, and |
(2) offer you this license which gives you legal permission to copy, |
distribute and/or modify the software. |
Also, for each author's protection and ours, we want to make certain |
that everyone understands that there is no warranty for this free |
software. If the software is modified by someone else and passed on, we |
want its recipients to know that what they have is not the original, so |
that any problems introduced by others will not reflect on the original |
authors' reputations. |
Finally, any free program is threatened constantly by software |
patents. We wish to avoid the danger that redistributors of a free |
program will individually obtain patent licenses, in effect making the |
program proprietary. To prevent this, we have made it clear that any |
patent must be licensed for everyone's free use or not licensed at all. |
The precise terms and conditions for copying, distribution and |
modification follow. |
GNU GENERAL PUBLIC LICENSE |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
0. This License applies to any program or other work which contains |
a notice placed by the copyright holder saying it may be distributed |
under the terms of this General Public License. The "Program", below, |
refers to any such program or work, and a "work based on the Program" |
means either the Program or any derivative work under copyright law: |
that is to say, a work containing the Program or a portion of it, |
either verbatim or with modifications and/or translated into another |
language. (Hereinafter, translation is included without limitation in |
the term "modification".) Each licensee is addressed as "you". |
Activities other than copying, distribution and modification are not |
covered by this License; they are outside its scope. The act of |
running the Program is not restricted, and the output from the Program |
is covered only if its contents constitute a work based on the |
Program (independent of having been made by running the Program). |
Whether that is true depends on what the Program does. |
1. You may copy and distribute verbatim copies of the Program's |
source code as you receive it, in any medium, provided that you |
conspicuously and appropriately publish on each copy an appropriate |
copyright notice and disclaimer of warranty; keep intact all the |
notices that refer to this License and to the absence of any warranty; |
and give any other recipients of the Program a copy of this License |
along with the Program. |
You may charge a fee for the physical act of transferring a copy, and |
you may at your option offer warranty protection in exchange for a fee. |
2. You may modify your copy or copies of the Program or any portion |
of it, thus forming a work based on the Program, and copy and |
distribute such modifications or work under the terms of Section 1 |
above, provided that you also meet all of these conditions: |
a) You must cause the modified files to carry prominent notices |
stating that you changed the files and the date of any change. |
b) You must cause any work that you distribute or publish, that in |
whole or in part contains or is derived from the Program or any |
part thereof, to be licensed as a whole at no charge to all third |
parties under the terms of this License. |
c) If the modified program normally reads commands interactively |
when run, you must cause it, when started running for such |
interactive use in the most ordinary way, to print or display an |
announcement including an appropriate copyright notice and a |
notice that there is no warranty (or else, saying that you provide |
a warranty) and that users may redistribute the program under |
these conditions, and telling the user how to view a copy of this |
License. (Exception: if the Program itself is interactive but |
does not normally print such an announcement, your work based on |
the Program is not required to print an announcement.) |
These requirements apply to the modified work as a whole. If |
identifiable sections of that work are not derived from the Program, |
and can be reasonably considered independent and separate works in |
themselves, then this License, and its terms, do not apply to those |
sections when you distribute them as separate works. But when you |
distribute the same sections as part of a whole which is a work based |
on the Program, the distribution of the whole must be on the terms of |
this License, whose permissions for other licensees extend to the |
entire whole, and thus to each and every part regardless of who wrote it. |
Thus, it is not the intent of this section to claim rights or contest |
your rights to work written entirely by you; rather, the intent is to |
exercise the right to control the distribution of derivative or |
collective works based on the Program. |
In addition, mere aggregation of another work not based on the Program |
with the Program (or with a work based on the Program) on a volume of |
a storage or distribution medium does not bring the other work under |
the scope of this License. |
3. You may copy and distribute the Program (or a work based on it, |
under Section 2) in object code or executable form under the terms of |
Sections 1 and 2 above provided that you also do one of the following: |
a) Accompany it with the complete corresponding machine-readable |
source code, which must be distributed under the terms of Sections |
1 and 2 above on a medium customarily used for software interchange; or, |
b) Accompany it with a written offer, valid for at least three |
years, to give any third party, for a charge no more than your |
cost of physically performing source distribution, a complete |
machine-readable copy of the corresponding source code, to be |
distributed under the terms of Sections 1 and 2 above on a medium |
customarily used for software interchange; or, |
c) Accompany it with the information you received as to the offer |
to distribute corresponding source code. (This alternative is |
allowed only for noncommercial distribution and only if you |
received the program in object code or executable form with such |
an offer, in accord with Subsection b above.) |
The source code for a work means the preferred form of the work for |
making modifications to it. For an executable work, complete source |
code means all the source code for all modules it contains, plus any |
associated interface definition files, plus the scripts used to |
control compilation and installation of the executable. However, as a |
special exception, the source code distributed need not include |
anything that is normally distributed (in either source or binary |
form) with the major components (compiler, kernel, and so on) of the |
operating system on which the executable runs, unless that component |
itself accompanies the executable. |
If distribution of executable or object code is made by offering |
access to copy from a designated place, then offering equivalent |
access to copy the source code from the same place counts as |
distribution of the source code, even though third parties are not |
compelled to copy the source along with the object code. |
4. You may not copy, modify, sublicense, or distribute the Program |
except as expressly provided under this License. Any attempt |
otherwise to copy, modify, sublicense or distribute the Program is |
void, and will automatically terminate your rights under this License. |
However, parties who have received copies, or rights, from you under |
this License will not have their licenses terminated so long as such |
parties remain in full compliance. |
5. You are not required to accept this License, since you have not |
signed it. However, nothing else grants you permission to modify or |
distribute the Program or its derivative works. These actions are |
prohibited by law if you do not accept this License. Therefore, by |
modifying or distributing the Program (or any work based on the |
Program), you indicate your acceptance of this License to do so, and |
all its terms and conditions for copying, distributing or modifying |
the Program or works based on it. |
6. Each time you redistribute the Program (or any work based on the |
Program), the recipient automatically receives a license from the |
original licensor to copy, distribute or modify the Program subject to |
these terms and conditions. You may not impose any further |
restrictions on the recipients' exercise of the rights granted herein. |
You are not responsible for enforcing compliance by third parties to |
this License. |
7. If, as a consequence of a court judgment or allegation of patent |
infringement or for any other reason (not limited to patent issues), |
conditions are imposed on you (whether by court order, agreement or |
otherwise) that contradict the conditions of this License, they do not |
excuse you from the conditions of this License. If you cannot |
distribute so as to satisfy simultaneously your obligations under this |
License and any other pertinent obligations, then as a consequence you |
may not distribute the Program at all. For example, if a patent |
license would not permit royalty-free redistribution of the Program by |
all those who receive copies directly or indirectly through you, then |
the only way you could satisfy both it and this License would be to |
refrain entirely from distribution of the Program. |
If any portion of this section is held invalid or unenforceable under |
any particular circumstance, the balance of the section is intended to |
apply and the section as a whole is intended to apply in other |
circumstances. |
It is not the purpose of this section to induce you to infringe any |
patents or other property right claims or to contest validity of any |
such claims; this section has the sole purpose of protecting the |
integrity of the free software distribution system, which is |
implemented by public license practices. Many people have made |
generous contributions to the wide range of software distributed |
through that system in reliance on consistent application of that |
system; it is up to the author/donor to decide if he or she is willing |
to distribute software through any other system and a licensee cannot |
impose that choice. |
This section is intended to make thoroughly clear what is believed to |
be a consequence of the rest of this License. |
8. If the distribution and/or use of the Program is restricted in |
certain countries either by patents or by copyrighted interfaces, the |
original copyright holder who places the Program under this License |
may add an explicit geographical distribution limitation excluding |
those countries, so that distribution is permitted only in or among |
countries not thus excluded. In such case, this License incorporates |
the limitation as if written in the body of this License. |
9. The Free Software Foundation may publish revised and/or new versions |
of the General Public License from time to time. Such new versions will |
be similar in spirit to the present version, but may differ in detail to |
address new problems or concerns. |
Each version is given a distinguishing version number. If the Program |
specifies a version number of this License which applies to it and "any |
later version", you have the option of following the terms and conditions |
either of that version or of any later version published by the Free |
Software Foundation. If the Program does not specify a version number of |
this License, you may choose any version ever published by the Free Software |
Foundation. |
10. If you wish to incorporate parts of the Program into other free |
programs whose distribution conditions are different, write to the author |
to ask for permission. For software which is copyrighted by the Free |
Software Foundation, write to the Free Software Foundation; we sometimes |
make exceptions for this. Our decision will be guided by the two goals |
of preserving the free status of all derivatives of our free software and |
of promoting the sharing and reuse of software generally. |
NO WARRANTY |
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
REPAIR OR CORRECTION. |
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
POSSIBILITY OF SUCH DAMAGES. |
END OF TERMS AND CONDITIONS |
How to Apply These Terms to Your New Programs |
If you develop a new program, and you want it to be of the greatest |
possible use to the public, the best way to achieve this is to make it |
free software which everyone can redistribute and change under these terms. |
To do so, attach the following notices to the program. It is safest |
to attach them to the start of each source file to most effectively |
convey the exclusion of warranty; and each file should have at least |
the "copyright" line and a pointer to where the full notice is found. |
<one line to give the program's name and a brief idea of what it does.> |
Copyright (C) <year> <name of author> |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation; either version 2 of the License, or |
(at your option) any later version. |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Also add information on how to contact you by electronic and paper mail. |
If the program is interactive, make it output a short notice like this |
when it starts in an interactive mode: |
Gnomovision version 69, Copyright (C) year name of author |
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
This is free software, and you are welcome to redistribute it |
under certain conditions; type `show c' for details. |
The hypothetical commands `show w' and `show c' should show the appropriate |
parts of the General Public License. Of course, the commands you use may |
be called something other than `show w' and `show c'; they could even be |
mouse-clicks or menu items--whatever suits your program. |
You should also get your employer (if you work as a programmer) or your |
school, if any, to sign a "copyright disclaimer" for the program, if |
necessary. Here is a sample; alter the names: |
Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
`Gnomovision' (which makes passes at compilers) written by James Hacker. |
<signature of Ty Coon>, 1 April 1989 |
Ty Coon, President of Vice |
This General Public License does not permit incorporating your program into |
proprietary programs. If your program is a subroutine library, you may |
consider it more useful to permit linking proprietary applications with the |
library. If this is what you want to do, use the GNU Library General |
Public License instead of this License. |
/branches/arm/boot/arch/ia32/grub/README |
---|
0,0 → 1,5 |
For licensing terms of GRUB boot loader see the file COPYING contained |
in this directory. Full version of GRUB, including its source code, |
can be downloaded from GRUB's project page: |
http://www.gnu.org/software/grub/ |
/branches/arm/boot/arch/ia32xen/grub/menu.lst |
---|
0,0 → 1,20 |
default 0 |
timeout 10 |
title=HelenOS/ia32xen |
root (cd) |
kernel /boot/xen.gz |
module /boot/kernel.bin |
module /boot/ns |
module /boot/init |
module /boot/pci |
module /boot/fb |
module /boot/kbd |
module /boot/console |
module /boot/vfs |
module /boot/tmpfs |
module /boot/fat |
module /boot/devmap |
module /boot/tetris |
module /boot/tester |
module /boot/klog |
/branches/arm/boot/arch/ia32xen/grub/menu.debug.lst |
---|
0,0 → 1,16 |
default 0 |
timeout 10 |
title=HelenOS/ia32xen |
root (cd) |
kernel /boot/xen.debug.gz noreboot console=com1,vga com1=auto,8n1,0x3f8 |
module /boot/kernel.bin |
module /boot/ns |
module /boot/init |
module /boot/pci |
module /boot/fb |
module /boot/kbd |
module /boot/console |
module /boot/tetris |
module /boot/tester |
module /boot/klog |
/branches/arm/boot/arch/ia32xen/grub/xen.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/boot/arch/ia32xen/grub/xen.debug.gz |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/boot/arch/ia32xen/grub/stage2_eltorito |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/boot/arch/ia32xen/grub/COPYING |
---|
0,0 → 1,340 |
GNU GENERAL PUBLIC LICENSE |
Version 2, June 1991 |
Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Everyone is permitted to copy and distribute verbatim copies |
of this license document, but changing it is not allowed. |
Preamble |
The licenses for most software are designed to take away your |
freedom to share and change it. By contrast, the GNU General Public |
License is intended to guarantee your freedom to share and change free |
software--to make sure the software is free for all its users. This |
General Public License applies to most of the Free Software |
Foundation's software and to any other program whose authors commit to |
using it. (Some other Free Software Foundation software is covered by |
the GNU Library General Public License instead.) You can apply it to |
your programs, too. |
When we speak of free software, we are referring to freedom, not |
price. Our General Public Licenses are designed to make sure that you |
have the freedom to distribute copies of free software (and charge for |
this service if you wish), that you receive source code or can get it |
if you want it, that you can change the software or use pieces of it |
in new free programs; and that you know you can do these things. |
To protect your rights, we need to make restrictions that forbid |
anyone to deny you these rights or to ask you to surrender the rights. |
These restrictions translate to certain responsibilities for you if you |
distribute copies of the software, or if you modify it. |
For example, if you distribute copies of such a program, whether |
gratis or for a fee, you must give the recipients all the rights that |
you have. You must make sure that they, too, receive or can get the |
source code. And you must show them these terms so they know their |
rights. |
We protect your rights with two steps: (1) copyright the software, and |
(2) offer you this license which gives you legal permission to copy, |
distribute and/or modify the software. |
Also, for each author's protection and ours, we want to make certain |
that everyone understands that there is no warranty for this free |
software. If the software is modified by someone else and passed on, we |
want its recipients to know that what they have is not the original, so |
that any problems introduced by others will not reflect on the original |
authors' reputations. |
Finally, any free program is threatened constantly by software |
patents. We wish to avoid the danger that redistributors of a free |
program will individually obtain patent licenses, in effect making the |
program proprietary. To prevent this, we have made it clear that any |
patent must be licensed for everyone's free use or not licensed at all. |
The precise terms and conditions for copying, distribution and |
modification follow. |
GNU GENERAL PUBLIC LICENSE |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
0. This License applies to any program or other work which contains |
a notice placed by the copyright holder saying it may be distributed |
under the terms of this General Public License. The "Program", below, |
refers to any such program or work, and a "work based on the Program" |
means either the Program or any derivative work under copyright law: |
that is to say, a work containing the Program or a portion of it, |
either verbatim or with modifications and/or translated into another |
language. (Hereinafter, translation is included without limitation in |
the term "modification".) Each licensee is addressed as "you". |
Activities other than copying, distribution and modification are not |
covered by this License; they are outside its scope. The act of |
running the Program is not restricted, and the output from the Program |
is covered only if its contents constitute a work based on the |
Program (independent of having been made by running the Program). |
Whether that is true depends on what the Program does. |
1. You may copy and distribute verbatim copies of the Program's |
source code as you receive it, in any medium, provided that you |
conspicuously and appropriately publish on each copy an appropriate |
copyright notice and disclaimer of warranty; keep intact all the |
notices that refer to this License and to the absence of any warranty; |
and give any other recipients of the Program a copy of this License |
along with the Program. |
You may charge a fee for the physical act of transferring a copy, and |
you may at your option offer warranty protection in exchange for a fee. |
2. You may modify your copy or copies of the Program or any portion |
of it, thus forming a work based on the Program, and copy and |
distribute such modifications or work under the terms of Section 1 |
above, provided that you also meet all of these conditions: |
a) You must cause the modified files to carry prominent notices |
stating that you changed the files and the date of any change. |
b) You must cause any work that you distribute or publish, that in |
whole or in part contains or is derived from the Program or any |
part thereof, to be licensed as a whole at no charge to all third |
parties under the terms of this License. |
c) If the modified program normally reads commands interactively |
when run, you must cause it, when started running for such |
interactive use in the most ordinary way, to print or display an |
announcement including an appropriate copyright notice and a |
notice that there is no warranty (or else, saying that you provide |
a warranty) and that users may redistribute the program under |
these conditions, and telling the user how to view a copy of this |
License. (Exception: if the Program itself is interactive but |
does not normally print such an announcement, your work based on |
the Program is not required to print an announcement.) |
These requirements apply to the modified work as a whole. If |
identifiable sections of that work are not derived from the Program, |
and can be reasonably considered independent and separate works in |
themselves, then this License, and its terms, do not apply to those |
sections when you distribute them as separate works. But when you |
distribute the same sections as part of a whole which is a work based |
on the Program, the distribution of the whole must be on the terms of |
this License, whose permissions for other licensees extend to the |
entire whole, and thus to each and every part regardless of who wrote it. |
Thus, it is not the intent of this section to claim rights or contest |
your rights to work written entirely by you; rather, the intent is to |
exercise the right to control the distribution of derivative or |
collective works based on the Program. |
In addition, mere aggregation of another work not based on the Program |
with the Program (or with a work based on the Program) on a volume of |
a storage or distribution medium does not bring the other work under |
the scope of this License. |
3. You may copy and distribute the Program (or a work based on it, |
under Section 2) in object code or executable form under the terms of |
Sections 1 and 2 above provided that you also do one of the following: |
a) Accompany it with the complete corresponding machine-readable |
source code, which must be distributed under the terms of Sections |
1 and 2 above on a medium customarily used for software interchange; or, |
b) Accompany it with a written offer, valid for at least three |
years, to give any third party, for a charge no more than your |
cost of physically performing source distribution, a complete |
machine-readable copy of the corresponding source code, to be |
distributed under the terms of Sections 1 and 2 above on a medium |
customarily used for software interchange; or, |
c) Accompany it with the information you received as to the offer |
to distribute corresponding source code. (This alternative is |
allowed only for noncommercial distribution and only if you |
received the program in object code or executable form with such |
an offer, in accord with Subsection b above.) |
The source code for a work means the preferred form of the work for |
making modifications to it. For an executable work, complete source |
code means all the source code for all modules it contains, plus any |
associated interface definition files, plus the scripts used to |
control compilation and installation of the executable. However, as a |
special exception, the source code distributed need not include |
anything that is normally distributed (in either source or binary |
form) with the major components (compiler, kernel, and so on) of the |
operating system on which the executable runs, unless that component |
itself accompanies the executable. |
If distribution of executable or object code is made by offering |
access to copy from a designated place, then offering equivalent |
access to copy the source code from the same place counts as |
distribution of the source code, even though third parties are not |
compelled to copy the source along with the object code. |
4. You may not copy, modify, sublicense, or distribute the Program |
except as expressly provided under this License. Any attempt |
otherwise to copy, modify, sublicense or distribute the Program is |
void, and will automatically terminate your rights under this License. |
However, parties who have received copies, or rights, from you under |
this License will not have their licenses terminated so long as such |
parties remain in full compliance. |
5. You are not required to accept this License, since you have not |
signed it. However, nothing else grants you permission to modify or |
distribute the Program or its derivative works. These actions are |
prohibited by law if you do not accept this License. Therefore, by |
modifying or distributing the Program (or any work based on the |
Program), you indicate your acceptance of this License to do so, and |
all its terms and conditions for copying, distributing or modifying |
the Program or works based on it. |
6. Each time you redistribute the Program (or any work based on the |
Program), the recipient automatically receives a license from the |
original licensor to copy, distribute or modify the Program subject to |
these terms and conditions. You may not impose any further |
restrictions on the recipients' exercise of the rights granted herein. |
You are not responsible for enforcing compliance by third parties to |
this License. |
7. If, as a consequence of a court judgment or allegation of patent |
infringement or for any other reason (not limited to patent issues), |
conditions are imposed on you (whether by court order, agreement or |
otherwise) that contradict the conditions of this License, they do not |
excuse you from the conditions of this License. If you cannot |
distribute so as to satisfy simultaneously your obligations under this |
License and any other pertinent obligations, then as a consequence you |
may not distribute the Program at all. For example, if a patent |
license would not permit royalty-free redistribution of the Program by |
all those who receive copies directly or indirectly through you, then |
the only way you could satisfy both it and this License would be to |
refrain entirely from distribution of the Program. |
If any portion of this section is held invalid or unenforceable under |
any particular circumstance, the balance of the section is intended to |
apply and the section as a whole is intended to apply in other |
circumstances. |
It is not the purpose of this section to induce you to infringe any |
patents or other property right claims or to contest validity of any |
such claims; this section has the sole purpose of protecting the |
integrity of the free software distribution system, which is |
implemented by public license practices. Many people have made |
generous contributions to the wide range of software distributed |
through that system in reliance on consistent application of that |
system; it is up to the author/donor to decide if he or she is willing |
to distribute software through any other system and a licensee cannot |
impose that choice. |
This section is intended to make thoroughly clear what is believed to |
be a consequence of the rest of this License. |
8. If the distribution and/or use of the Program is restricted in |
certain countries either by patents or by copyrighted interfaces, the |
original copyright holder who places the Program under this License |
may add an explicit geographical distribution limitation excluding |
those countries, so that distribution is permitted only in or among |
countries not thus excluded. In such case, this License incorporates |
the limitation as if written in the body of this License. |
9. The Free Software Foundation may publish revised and/or new versions |
of the General Public License from time to time. Such new versions will |
be similar in spirit to the present version, but may differ in detail to |
address new problems or concerns. |
Each version is given a distinguishing version number. If the Program |
specifies a version number of this License which applies to it and "any |
later version", you have the option of following the terms and conditions |
either of that version or of any later version published by the Free |
Software Foundation. If the Program does not specify a version number of |
this License, you may choose any version ever published by the Free Software |
Foundation. |
10. If you wish to incorporate parts of the Program into other free |
programs whose distribution conditions are different, write to the author |
to ask for permission. For software which is copyrighted by the Free |
Software Foundation, write to the Free Software Foundation; we sometimes |
make exceptions for this. Our decision will be guided by the two goals |
of preserving the free status of all derivatives of our free software and |
of promoting the sharing and reuse of software generally. |
NO WARRANTY |
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
REPAIR OR CORRECTION. |
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
POSSIBILITY OF SUCH DAMAGES. |
END OF TERMS AND CONDITIONS |
How to Apply These Terms to Your New Programs |
If you develop a new program, and you want it to be of the greatest |
possible use to the public, the best way to achieve this is to make it |
free software which everyone can redistribute and change under these terms. |
To do so, attach the following notices to the program. It is safest |
to attach them to the start of each source file to most effectively |
convey the exclusion of warranty; and each file should have at least |
the "copyright" line and a pointer to where the full notice is found. |
<one line to give the program's name and a brief idea of what it does.> |
Copyright (C) <year> <name of author> |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation; either version 2 of the License, or |
(at your option) any later version. |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Also add information on how to contact you by electronic and paper mail. |
If the program is interactive, make it output a short notice like this |
when it starts in an interactive mode: |
Gnomovision version 69, Copyright (C) year name of author |
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
This is free software, and you are welcome to redistribute it |
under certain conditions; type `show c' for details. |
The hypothetical commands `show w' and `show c' should show the appropriate |
parts of the General Public License. Of course, the commands you use may |
be called something other than `show w' and `show c'; they could even be |
mouse-clicks or menu items--whatever suits your program. |
You should also get your employer (if you work as a programmer) or your |
school, if any, to sign a "copyright disclaimer" for the program, if |
necessary. Here is a sample; alter the names: |
Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
`Gnomovision' (which makes passes at compilers) written by James Hacker. |
<signature of Ty Coon>, 1 April 1989 |
Ty Coon, President of Vice |
This General Public License does not permit incorporating your program into |
proprietary programs. If your program is a subroutine library, you may |
consider it more useful to permit linking proprietary applications with the |
library. If this is what you want to do, use the GNU Library General |
Public License instead of this License. |
/branches/arm/boot/arch/ia32xen/grub/README |
---|
0,0 → 1,5 |
For licensing terms of GRUB boot loader see the file COPYING contained |
in this directory. Full version of GRUB, including its source code, |
can be downloaded from GRUB's project page: |
http://www.gnu.org/software/grub/ |
/branches/arm/boot/arch/ia32xen/Makefile.inc |
---|
0,0 → 1,64 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
TASKS = \ |
$(USPACEDIR)/srv/ns/ns \ |
$(USPACEDIR)/srv/pci/pci \ |
$(USPACEDIR)/srv/fb/fb \ |
$(USPACEDIR)/srv/kbd/kbd \ |
$(USPACEDIR)/srv/console/console \ |
$(USPACEDIR)/srv/vfs/vfs \ |
$(USPACEDIR)/srv/fs/tmpfs/tmpfs \ |
$(USPACEDIR)/srv/fs/fat/fat \ |
$(USPACEDIR)/srv/devmap/devmap \ |
$(USPACEDIR)/app/init/init \ |
$(USPACEDIR)/app/tetris/tetris \ |
$(USPACEDIR)/app/tester/tester \ |
$(USPACEDIR)/app/klog/klog |
build: $(BASE)/image.iso |
$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/grub/menu.debug.lst arch/$(ARCH)/grub/xen.gz arch/$(ARCH)/grub/xen.debug.gz $(KERNELDIR)/kernel.bin $(TASKS) |
mkdir -p arch/$(ARCH)/iso/boot/grub |
cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/ |
ifeq ($(CONFIG_DEBUG),y) |
cp arch/$(ARCH)/grub/menu.debug.lst arch/$(ARCH)/iso/boot/grub/menu.lst |
cp arch/$(ARCH)/grub/xen.debug.gz arch/$(ARCH)/iso/boot/ |
else |
cp arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/iso/boot/grub/ |
cp arch/$(ARCH)/grub/xen.gz arch/$(ARCH)/iso/boot/ |
endif |
cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/ |
for task in $(TASKS) ; do \ |
cp $$task arch/$(ARCH)/iso/boot/ ; \ |
done |
mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/ |
clean: |
-rm -fr arch/$(ARCH)/iso |
-rm -f $(BASE)/image.iso |
/branches/arm/boot/generic/macros.h |
---|
File deleted |
/branches/arm/boot/generic/align.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
/branches/arm/boot/generic/printf.c |
---|
83,16 → 83,14 |
*/ |
static void print_number(const unative_t num, const unsigned int base) |
{ |
int val = num; |
/* This is enough even for base 2. */ |
char d[sizeof(unative_t) * 8 + 1]; |
int val = num; |
char d[sizeof(unative_t) * 8 + 1]; /* this is good enough even for base == 2 */ |
int i = sizeof(unative_t) * 8 - 1; |
do { |
d[i--] = digits[val % base]; |
} while (val /= base); |
d[sizeof(unative_t) * 8] = 0; |
puts(&d[i + 1]); |
} |
158,89 → 156,89 |
int i = 0; |
va_list ap; |
char c; |
va_start(ap, fmt); |
while ((c = fmt[i++])) { |
switch (c) { |
/* control character */ |
case '%': |
switch (c = fmt[i++]) { |
/* percentile itself */ |
/* control character */ |
case '%': |
break; |
/* |
* String and character conversions. |
*/ |
case 's': |
puts(va_arg(ap, char_ptr)); |
goto loop; |
case 'c': |
c = (char) va_arg(ap, int); |
break; |
/* |
* Hexadecimal conversions with fixed width. |
*/ |
case 'P': |
puts("0x"); |
case 'p': |
print_fixed_hex(va_arg(ap, unative_t), |
sizeof(unative_t)); |
goto loop; |
case 'Q': |
puts("0x"); |
case 'q': |
print_fixed_hex(va_arg(ap, uint64_t), INT64); |
goto loop; |
case 'L': |
puts("0x"); |
case 'l': |
print_fixed_hex(va_arg(ap, unative_t), INT32); |
goto loop; |
case 'W': |
puts("0x"); |
case 'w': |
print_fixed_hex(va_arg(ap, unative_t), INT16); |
goto loop; |
case 'B': |
puts("0x"); |
case 'b': |
print_fixed_hex(va_arg(ap, unative_t), INT8); |
goto loop; |
/* |
* Decimal and hexadecimal conversions. |
*/ |
case 'd': |
print_number(va_arg(ap, unative_t), 10); |
goto loop; |
case 'X': |
puts("0x"); |
case 'x': |
print_number(va_arg(ap, unative_t), 16); |
goto loop; |
/* |
* Bad formatting. |
*/ |
switch (c = fmt[i++]) { |
/* percentile itself */ |
case '%': |
break; |
/* |
* String and character conversions. |
*/ |
case 's': |
puts(va_arg(ap, char_ptr)); |
goto loop; |
case 'c': |
c = (char) va_arg(ap, int); |
break; |
/* |
* Hexadecimal conversions with fixed width. |
*/ |
case 'P': |
puts("0x"); |
case 'p': |
print_fixed_hex(va_arg(ap, unative_t), sizeof(unative_t)); |
goto loop; |
case 'Q': |
puts("0x"); |
case 'q': |
print_fixed_hex(va_arg(ap, uint64_t), INT64); |
goto loop; |
case 'L': |
puts("0x"); |
case 'l': |
print_fixed_hex(va_arg(ap, unative_t), INT32); |
goto loop; |
case 'W': |
puts("0x"); |
case 'w': |
print_fixed_hex(va_arg(ap, unative_t), INT16); |
goto loop; |
case 'B': |
puts("0x"); |
case 'b': |
print_fixed_hex(va_arg(ap, unative_t), INT8); |
goto loop; |
/* |
* Decimal and hexadecimal conversions. |
*/ |
case 'd': |
print_number(va_arg(ap, unative_t), 10); |
goto loop; |
case 'X': |
puts("0x"); |
case 'x': |
print_number(va_arg(ap, unative_t), 16); |
goto loop; |
/* |
* Bad formatting. |
*/ |
default: |
goto out; |
} |
default: |
goto out; |
} |
default: |
write(&c, 1); |
write(&c, 1); |
} |
loop: |
; |
} |
/branches/arm/boot/tools/ia32/gen_vga323.c |
---|
1,36 → 1,8 |
/* |
* Copyright (c) 2008 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <stdio.h> |
#define RED(i) (((i) >> 5) & ((1 << 3) - 1)) |
#define GREEN(i) (((i) >> 3) & ((1 << 2) - 1)) |
#define BLUE(i) ((i) & ((1 << 3) - 1)) |
#define RED(i) ((i >> 5) & ((1 << 3) - 1)) |
#define GREEN(i) ((i >> 3) & ((1 << 2) - 1)) |
#define BLUE(i) (i & ((1 << 3) - 1)) |
int main(int argc, char *argv[]) { |
unsigned int i; |
/branches/arm/boot/tools/ppc32/font-8x16.h |
---|
0,0 → 1,38 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#ifndef __FONT_8X16_H__ |
#define __FONT_8X16_H__ |
#define FONT_GLIPHS 256 |
#define FONT_SCANLINES 16 |
#define FONT_WIDTH 8 |
extern unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES]; |
#endif |
/branches/arm/boot/tools/ppc32/font-8x16.c |
---|
0,0 → 1,4641 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include "font-8x16.h" |
unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES] = { |
/* 0 0x00 '^@' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 1 0x01 '^A' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x81, /* 10000001 */ |
0xa5, /* 10100101 */ |
0x81, /* 10000001 */ |
0x81, /* 10000001 */ |
0xbd, /* 10111101 */ |
0x99, /* 10011001 */ |
0x81, /* 10000001 */ |
0x81, /* 10000001 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 2 0x02 '^B' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xff, /* 11111111 */ |
0xdb, /* 11011011 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xc3, /* 11000011 */ |
0xe7, /* 11100111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 3 0x03 '^C' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 4 0x04 '^D' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 5 0x05 '^E' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0xe7, /* 11100111 */ |
0xe7, /* 11100111 */ |
0xe7, /* 11100111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 6 0x06 '^F' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 7 0x07 '^G' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 8 0x08 '^H' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xe7, /* 11100111 */ |
0xc3, /* 11000011 */ |
0xc3, /* 11000011 */ |
0xe7, /* 11100111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 9 0x09 '^I' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x42, /* 01000010 */ |
0x42, /* 01000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 10 0x0a '^J' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xc3, /* 11000011 */ |
0x99, /* 10011001 */ |
0xbd, /* 10111101 */ |
0xbd, /* 10111101 */ |
0x99, /* 10011001 */ |
0xc3, /* 11000011 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 11 0x0b '^K' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x0e, /* 00001110 */ |
0x1a, /* 00011010 */ |
0x32, /* 00110010 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 12 0x0c '^L' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 13 0x0d '^M' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x33, /* 00110011 */ |
0x3f, /* 00111111 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x70, /* 01110000 */ |
0xf0, /* 11110000 */ |
0xe0, /* 11100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 14 0x0e '^N' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7f, /* 01111111 */ |
0x63, /* 01100011 */ |
0x7f, /* 01111111 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x67, /* 01100111 */ |
0xe7, /* 11100111 */ |
0xe6, /* 11100110 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 15 0x0f '^O' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xdb, /* 11011011 */ |
0x3c, /* 00111100 */ |
0xe7, /* 11100111 */ |
0x3c, /* 00111100 */ |
0xdb, /* 11011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 16 0x10 '^P' */ |
0x00, /* 00000000 */ |
0x80, /* 10000000 */ |
0xc0, /* 11000000 */ |
0xe0, /* 11100000 */ |
0xf0, /* 11110000 */ |
0xf8, /* 11111000 */ |
0xfe, /* 11111110 */ |
0xf8, /* 11111000 */ |
0xf0, /* 11110000 */ |
0xe0, /* 11100000 */ |
0xc0, /* 11000000 */ |
0x80, /* 10000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 17 0x11 '^Q' */ |
0x00, /* 00000000 */ |
0x02, /* 00000010 */ |
0x06, /* 00000110 */ |
0x0e, /* 00001110 */ |
0x1e, /* 00011110 */ |
0x3e, /* 00111110 */ |
0xfe, /* 11111110 */ |
0x3e, /* 00111110 */ |
0x1e, /* 00011110 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x02, /* 00000010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 18 0x12 '^R' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 19 0x13 '^S' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 20 0x14 '^T' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7f, /* 01111111 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0x7b, /* 01111011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 21 0x15 '^U' */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 22 0x16 '^V' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 23 0x17 '^W' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 24 0x18 '^X' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 25 0x19 '^Y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 26 0x1a '^Z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0xfe, /* 11111110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 27 0x1b '^[' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xfe, /* 11111110 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 28 0x1c '^\' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 29 0x1d '^]' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x28, /* 00101000 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x28, /* 00101000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 30 0x1e '^^' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0x7c, /* 01111100 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 31 0x1f '^_' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 32 0x20 ' ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 33 0x21 '!' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 34 0x22 '"' */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x24, /* 00100100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 35 0x23 '#' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 36 0x24 '$' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0x7c, /* 01111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x86, /* 10000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 37 0x25 '%' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc2, /* 11000010 */ |
0xc6, /* 11000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0x86, /* 10000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 38 0x26 '&' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 39 0x27 ''' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 40 0x28 '(' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 41 0x29 ')' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 42 0x2a '*' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0xff, /* 11111111 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 43 0x2b '+' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 44 0x2c ',' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 45 0x2d '-' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 46 0x2e '.' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 47 0x2f '/' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x02, /* 00000010 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x80, /* 10000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 48 0x30 '0' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 49 0x31 '1' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x38, /* 00111000 */ |
0x78, /* 01111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 50 0x32 '2' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 51 0x33 '3' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x3c, /* 00111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 52 0x34 '4' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x1c, /* 00011100 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xfe, /* 11111110 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x1e, /* 00011110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 53 0x35 '5' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfc, /* 11111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 54 0x36 '6' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfc, /* 11111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 55 0x37 '7' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 56 0x38 '8' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 57 0x39 '9' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 58 0x3a ':' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 59 0x3b ';' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 60 0x3c '<' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 61 0x3d '=' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 62 0x3e '>' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 63 0x3f '?' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 64 0x40 '@' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xde, /* 11011110 */ |
0xde, /* 11011110 */ |
0xde, /* 11011110 */ |
0xdc, /* 11011100 */ |
0xc0, /* 11000000 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 65 0x41 'A' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 66 0x42 'B' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xfc, /* 11111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 67 0x43 'C' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc2, /* 11000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 68 0x44 'D' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 69 0x45 'E' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x60, /* 01100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 70 0x46 'F' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 71 0x47 'G' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xde, /* 11011110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x66, /* 01100110 */ |
0x3a, /* 00111010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 72 0x48 'H' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 73 0x49 'I' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 74 0x4a 'J' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 75 0x4b 'K' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe6, /* 11100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x78, /* 01111000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 76 0x4c 'L' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf0, /* 11110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 77 0x4d 'M' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xee, /* 11101110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 78 0x4e 'N' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xe6, /* 11100110 */ |
0xf6, /* 11110110 */ |
0xfe, /* 11111110 */ |
0xde, /* 11011110 */ |
0xce, /* 11001110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 79 0x4f 'O' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 80 0x50 'P' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 81 0x51 'Q' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xde, /* 11011110 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0x0e, /* 00001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 82 0x52 'R' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 83 0x53 'S' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 84 0x54 'T' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x5a, /* 01011010 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 85 0x55 'U' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 86 0x56 'V' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 87 0x57 'W' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xfe, /* 11111110 */ |
0xee, /* 11101110 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 88 0x58 'X' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 89 0x59 'Y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 90 0x5a 'Z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x86, /* 10000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc2, /* 11000010 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 91 0x5b '[' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 92 0x5c '\' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x80, /* 10000000 */ |
0xc0, /* 11000000 */ |
0xe0, /* 11100000 */ |
0x70, /* 01110000 */ |
0x38, /* 00111000 */ |
0x1c, /* 00011100 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x02, /* 00000010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 93 0x5d ']' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 94 0x5e '^' */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 95 0x5f '_' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 96 0x60 '`' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 97 0x61 'a' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 98 0x62 'b' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 99 0x63 'c' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 100 0x64 'd' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 101 0x65 'e' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 102 0x66 'f' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x36, /* 00110110 */ |
0x32, /* 00110010 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 103 0x67 'g' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
/* 104 0x68 'h' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x6c, /* 01101100 */ |
0x76, /* 01110110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 105 0x69 'i' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 106 0x6a 'j' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
/* 107 0x6b 'k' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x78, /* 01111000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 108 0x6c 'l' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 109 0x6d 'm' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xec, /* 11101100 */ |
0xfe, /* 11111110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 110 0x6e 'n' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 111 0x6f 'o' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 112 0x70 'p' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
/* 113 0x71 'q' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x1e, /* 00011110 */ |
0x00, /* 00000000 */ |
/* 114 0x72 'r' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x76, /* 01110110 */ |
0x66, /* 01100110 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 115 0x73 's' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 116 0x74 't' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0xfc, /* 11111100 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x36, /* 00110110 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 117 0x75 'u' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 118 0x76 'v' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 119 0x77 'w' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 120 0x78 'x' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 121 0x79 'y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
/* 122 0x7a 'z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xcc, /* 11001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 123 0x7b '{' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x0e, /* 00001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 124 0x7c '|' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 125 0x7d '}' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x70, /* 01110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x0e, /* 00001110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 126 0x7e '~' */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 127 0x7f '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 128 0x80 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc2, /* 11000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 129 0x81 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 130 0x82 '' */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 131 0x83 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 132 0x84 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 133 0x85 ' ' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 134 0x86 '' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 135 0x87 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 136 0x88 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 137 0x89 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 138 0x8a '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 139 0x8b '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 140 0x8c '' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 141 0x8d '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 142 0x8e '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 143 0x8f '' */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 144 0x90 '' */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 145 0x91 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xec, /* 11101100 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x7e, /* 01111110 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x6e, /* 01101110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 146 0x92 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3e, /* 00111110 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xfe, /* 11111110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xce, /* 11001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 147 0x93 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 148 0x94 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 149 0x95 '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 150 0x96 '' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 151 0x97 '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 152 0x98 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
/* 153 0x99 '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 154 0x9a '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 155 0x9b '' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 156 0x9c '' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x64, /* 01100100 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xe6, /* 11100110 */ |
0xfc, /* 11111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 157 0x9d '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 158 0x9e '' */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xf8, /* 11111000 */ |
0xc4, /* 11000100 */ |
0xcc, /* 11001100 */ |
0xde, /* 11011110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 159 0x9f '' */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x1b, /* 00011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 160 0xa0 ' ' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 161 0xa1 '¡' */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 162 0xa2 '¢' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 163 0xa3 '£' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 164 0xa4 '¤' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 165 0xa5 '¥' */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xe6, /* 11100110 */ |
0xf6, /* 11110110 */ |
0xfe, /* 11111110 */ |
0xde, /* 11011110 */ |
0xce, /* 11001110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 166 0xa6 '¦' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x3e, /* 00111110 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 167 0xa7 '§' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 168 0xa8 '¨' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 169 0xa9 '©' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 170 0xaa 'ª' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 171 0xab '«' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0xe0, /* 11100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xdc, /* 11011100 */ |
0x86, /* 10000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x3e, /* 00111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 172 0xac '¬' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0xe0, /* 11100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x66, /* 01100110 */ |
0xce, /* 11001110 */ |
0x9a, /* 10011010 */ |
0x3f, /* 00111111 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 173 0xad '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 174 0xae '®' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x36, /* 00110110 */ |
0x6c, /* 01101100 */ |
0xd8, /* 11011000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 175 0xaf '¯' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xd8, /* 11011000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x6c, /* 01101100 */ |
0xd8, /* 11011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 176 0xb0 '°' */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
/* 177 0xb1 '±' */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
/* 178 0xb2 '²' */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
/* 179 0xb3 '³' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 180 0xb4 '´' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 181 0xb5 'µ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 182 0xb6 '¶' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 183 0xb7 '·' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 184 0xb8 '¸' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 185 0xb9 '¹' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x06, /* 00000110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 186 0xba 'º' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 187 0xbb '»' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x06, /* 00000110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 188 0xbc '¼' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x06, /* 00000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 189 0xbd '½' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 190 0xbe '¾' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 191 0xbf '¿' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 192 0xc0 'À' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 193 0xc1 'Á' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 194 0xc2 'Â' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 195 0xc3 'Ã' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 196 0xc4 'Ä' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 197 0xc5 'Å' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 198 0xc6 'Æ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 199 0xc7 'Ç' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 200 0xc8 'È' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x30, /* 00110000 */ |
0x3f, /* 00111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 201 0xc9 'É' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x30, /* 00110000 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 202 0xca 'Ê' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf7, /* 11110111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 203 0xcb 'Ë' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xf7, /* 11110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 204 0xcc 'Ì' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x30, /* 00110000 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 205 0xcd 'Í' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 206 0xce 'Î' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf7, /* 11110111 */ |
0x00, /* 00000000 */ |
0xf7, /* 11110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 207 0xcf 'Ï' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 208 0xd0 'Ð' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 209 0xd1 'Ñ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 210 0xd2 'Ò' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 211 0xd3 'Ó' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x3f, /* 00111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 212 0xd4 'Ô' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 213 0xd5 'Õ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 214 0xd6 'Ö' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 215 0xd7 '×' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xff, /* 11111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 216 0xd8 'Ø' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 217 0xd9 'Ù' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 218 0xda 'Ú' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 219 0xdb 'Û' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 220 0xdc 'Ü' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 221 0xdd 'Ý' */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
/* 222 0xde 'Þ' */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
/* 223 0xdf 'ß' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 224 0xe0 'à' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xdc, /* 11011100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 225 0xe1 'á' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xd8, /* 11011000 */ |
0xcc, /* 11001100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 226 0xe2 'â' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 227 0xe3 'ã' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 228 0xe4 'ä' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 229 0xe5 'å' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 230 0xe6 'æ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
/* 231 0xe7 'ç' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 232 0xe8 'è' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 233 0xe9 'é' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 234 0xea 'ê' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xee, /* 11101110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 235 0xeb 'ë' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x3e, /* 00111110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 236 0xec 'ì' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 237 0xed 'í' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x03, /* 00000011 */ |
0x06, /* 00000110 */ |
0x7e, /* 01111110 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xf3, /* 11110011 */ |
0x7e, /* 01111110 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 238 0xee 'î' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 239 0xef 'ï' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 240 0xf0 'ð' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 241 0xf1 'ñ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 242 0xf2 'ò' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 243 0xf3 'ó' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 244 0xf4 'ô' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 245 0xf5 'õ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 246 0xf6 'ö' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 247 0xf7 '÷' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 248 0xf8 'ø' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 249 0xf9 'ù' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 250 0xfa 'ú' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 251 0xfb 'û' */ |
0x00, /* 00000000 */ |
0x0f, /* 00001111 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0xec, /* 11101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x3c, /* 00111100 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 252 0xfc 'ü' */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 253 0xfd 'ý' */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x32, /* 00110010 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 254 0xfe 'þ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 255 0xff 'ÿ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
}; |
/branches/arm/boot/tools/ppc32/debug.c |
---|
0,0 → 1,68 |
#include "font-8x16.h" |
#define FB_REG "r8" |
#define SCAN_REG "r9" |
#define ADDR_REG "r10" |
#define FG_REG "r11" |
#define BG_REG "r12" |
#define FG_COLOR 0xffffffff |
#define BG_COLOR 0x00000000 |
#define BPP 4 |
void print_macro_init(void) { |
printf(".macro DEBUG_INIT\n"); |
printf("#ifdef CONFIG_DEBUG\n"); |
printf("\tlis %s, %d\n", FG_REG, FG_COLOR >> 16); |
printf("\tori %s, %s, %d\n", FG_REG, FG_REG, FG_COLOR & 0xffff); |
printf("\t\n"); |
printf("\tlis %s, %d\n", BG_REG, BG_COLOR >> 16); |
printf("\tori %s, %s, %d\n", BG_REG, BG_REG, BG_COLOR & 0xffff); |
printf("\t\n"); |
printf("\tmr %s, %s\n", ADDR_REG, FB_REG); |
printf("#endif\n"); |
printf(".endm\n"); |
} |
void print_macro(const char *name) { |
printf(".macro DEBUG_%s\n", name); |
printf("#ifdef CONFIG_DEBUG\n"); |
unsigned int y; |
for (y = 0; y < FONT_SCANLINES; y++) { |
printf("\t\n"); |
if (y > 0) |
printf("\tadd %s, %s, %s\n", ADDR_REG, ADDR_REG, SCAN_REG); |
unsigned int i; |
for (i = 0; name[i] != 0; i++) { |
char c = name[i]; |
unsigned int x; |
for (x = 0; x < FONT_WIDTH; x++) { |
if (((fb_font[c * FONT_SCANLINES + y] >> (FONT_WIDTH - x)) & 1) == 1) |
printf("\tstw %s, %d(%s)\n", FG_REG, (i * FONT_WIDTH + x) * BPP, ADDR_REG); |
else |
printf("\tstw %s, %d(%s)\n", BG_REG, (i * FONT_WIDTH + x) * BPP, ADDR_REG); |
} |
} |
} |
printf("#endif\n"); |
printf(".endm\n"); |
} |
int main(int argc, char *argv[]) { |
print_macro_init(); |
int i; |
for (i = 1; i < argc; i++) { |
printf("\n"); |
print_macro(argv[i]); |
} |
return 0; |
} |
/branches/arm/boot/tools/ppc32/Makefile |
---|
0,0 → 1,8 |
debug: debug.o font-8x16.o |
gcc -o debug debug.o font-8x16.o |
debug.o: debug.c font-8x16.h |
gcc -c -o debug.o debug.c |
font-8x16.o: font-8x16.c font-8x16.h |
gcc -c -o font-8x16.o font-8x16.c |
/branches/arm/boot/boot.config |
---|
0,0 → 1,84 |
# |
# Copyright (c) 2006 Ondrej Palkovsky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## General configuration directives |
# Architecture |
@ "amd64" AMD64/Intel EM64T |
@ "arm32" ARM 32-bit |
@ "ia32" Intel IA-32 |
@ "ia32xen" Intel IA-32 on Xen hypervisor |
@ "ia64" Intel IA-64 |
@ "mips32" MIPS 32-bit |
@ "ppc32" PowerPC 32-bit |
@ "ppc64" PowerPC 64-bit |
@ "sparc64" Sun UltraSPARC |
! ARCH (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "icc_native" ICC Native |
@ "suncc_native" Sun Studio C Compiler |
! [ARCH=amd64|ARCH=ia32|ARCH=ia32xen] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "icc_native" ICC Native |
! [ARCH=ia64] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "suncc_native" Sun Studio C Compiler |
! [ARCH=sparc64] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
! [ARCH=arm32|ARCH=mips32|ARCH=ppc32|ARCH=ppc64] COMPILER (choice) |
# Start AP processors by the loader |
! [ARCH=sparc64] CONFIG_SMP (y/n) |
# Debug bootloader |
! [ARCH=ppc32] CONFIG_DEBUG (n/y) |
# Use Block Address Translation |
! [ARCH=ppc32] CONFIG_BAT (y/n) |
# Target image |
@ "binary" Binary image (MSIM) |
@ "ecoff" Ecoff image (GXEmul) |
! [ARCH=mips32] IMAGE (choice) |
# Ramdisk format |
@ "tmpfs" TMPFS image |
@ "fat" FAT16 image |
! RDFMT (choice) |
/branches/arm/boot/genarch/ofw.h |
---|
74,7 → 74,7 |
typedef struct { |
void *addr; |
uint32_t size; |
} macio_t; |
} keyboard_t; |
typedef struct { |
uint32_t info; |
122,8 → 122,7 |
extern int ofw_map(const void *phys, const void *virt, const int size, const int mode); |
extern int ofw_memmap(memmap_t *map); |
extern int ofw_screen(screen_t *screen); |
extern int ofw_macio(macio_t *macio); |
extern int ofw_setup_palette(void); |
extern int ofw_keyboard(keyboard_t *keyboard); |
extern void ofw_quiesce(void); |
#endif |
/branches/arm/boot/genarch/balloc.h |
---|
31,7 → 31,7 |
#include <types.h> |
#define BALLOC_MAX_SIZE (128 * 1024) |
#define BALLOC_MAX_SIZE (1024 * 1024) |
typedef struct { |
uintptr_t base; |
/branches/arm/boot/genarch/ofw.c |
---|
25,7 → 25,7 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <ofw.h> |
#include <ofwarch.h> |
#include <printf.h> |
48,8 → 48,7 |
if (ofw_chosen == -1) |
halt(); |
if (ofw_get_property(ofw_chosen, "stdout", &ofw_stdout, |
sizeof(ofw_stdout)) <= 0) |
if (ofw_get_property(ofw_chosen, "stdout", &ofw_stdout, sizeof(ofw_stdout)) <= 0) |
ofw_stdout = 0; |
ofw_root = ofw_find_device("/"); |
58,13 → 57,11 |
halt(); |
} |
if (ofw_get_property(ofw_chosen, "mmu", &ofw_mmu, |
sizeof(ofw_mmu)) <= 0) { |
if (ofw_get_property(ofw_chosen, "mmu", &ofw_mmu, sizeof(ofw_mmu)) <= 0) { |
puts("\r\nError: Unable to get mmu property, halted.\r\n"); |
halt(); |
} |
if (ofw_get_property(ofw_chosen, "memory", &ofw_memory_prop, |
sizeof(ofw_memory_prop)) <= 0) { |
if (ofw_get_property(ofw_chosen, "memory", &ofw_memory_prop, sizeof(ofw_memory_prop)) <= 0) { |
puts("\r\nError: Unable to get memory property, halted.\r\n"); |
halt(); |
} |
84,18 → 81,14 |
/** Perform a call to OpenFirmware client interface. |
* |
* @param service String identifying the service requested. |
* @param nargs Number of input arguments. |
* @param nret Number of output arguments. This includes the return |
* value. |
* @param rets Buffer for output arguments or NULL. The buffer must |
* accommodate nret - 1 items. |
* @param service String identifying the service requested. |
* @param nargs Number of input arguments. |
* @param nret Number of output arguments. This includes the return value. |
* @param rets Buffer for output arguments or NULL. The buffer must accommodate nret - 1 items. |
* |
* @return Return value returned by the client interface. |
* @return Return value returned by the client interface. |
*/ |
unsigned long |
ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, |
...) |
unsigned long ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, ...) |
{ |
va_list list; |
ofw_args_t args; |
126,9 → 119,7 |
return ofw_call("finddevice", 1, 1, NULL, name); |
} |
int |
ofw_get_property(const phandle device, const char *name, void *buf, |
const int buflen) |
int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen) |
{ |
return ofw_call("getprop", 4, 1, NULL, device, name, buf, buflen); |
} |
153,8 → 144,7 |
unsigned int ret = 1; |
if (ofw_get_property(device, "#address-cells", &ret, sizeof(ret)) <= 0) |
if (ofw_get_property(ofw_root, "#address-cells", &ret, |
sizeof(ret)) <= 0) |
if (ofw_get_property(ofw_root, "#address-cells", &ret, sizeof(ret)) <= 0) |
ret = OFW_ADDRESS_CELLS; |
return ret; |
166,8 → 156,7 |
unsigned int ret; |
if (ofw_get_property(device, "#size-cells", &ret, sizeof(ret)) <= 0) |
if (ofw_get_property(ofw_root, "#size-cells", &ret, |
sizeof(ret)) <= 0) |
if (ofw_get_property(ofw_root, "#size-cells", &ret, sizeof(ret)) <= 0) |
ret = OFW_SIZE_CELLS; |
return ret; |
203,8 → 192,7 |
ofw_arg_t result[4]; |
int shift; |
if (ofw_call("call-method", 4, 5, result, "translate", ofw_mmu, |
virt, 0) != 0) { |
if (ofw_call("call-method", 3, 5, result, "translate", ofw_mmu, virt) != 0) { |
puts("Error: MMU method translate() failed, halting.\n"); |
halt(); |
} |
224,8 → 212,7 |
{ |
ofw_arg_t retaddr; |
if (ofw_call("call-method", 5, 2, &retaddr, "claim", ofw_mmu, 0, len, |
virt) != 0) { |
if (ofw_call("call-method", 5, 2, &retaddr, "claim", ofw_mmu, 0, len, virt) != 0) { |
puts("Error: MMU method claim() failed, halting.\n"); |
halt(); |
} |
282,8 → 269,8 |
phys_lo = (uintptr_t) phys; |
} |
return ofw_call("call-method", 7, 1, NULL, "map", ofw_mmu, mode, size, |
virt, phys_hi, phys_lo); |
return ofw_call("call-method", 7, 1, NULL, "map", ofw_mmu, mode, size, virt, |
phys_hi, phys_lo); |
} |
/** Save OpenFirmware physical memory map. |
294,12 → 281,10 |
*/ |
int ofw_memmap(memmap_t *map) |
{ |
unsigned int ac = ofw_get_address_cells(ofw_memory) / |
(sizeof(uintptr_t) / sizeof(uint32_t)); |
unsigned int sc = ofw_get_size_cells(ofw_memory) / |
(sizeof(uintptr_t) / sizeof(uint32_t)); |
unsigned int ac = ofw_get_address_cells(ofw_memory); |
unsigned int sc = ofw_get_size_cells(ofw_memory); |
uintptr_t buf[((ac + sc) * MEMMAP_MAX_RECORDS)]; |
uint32_t buf[((ac + sc) * MEMMAP_MAX_RECORDS)]; |
int ret = ofw_get_property(ofw_memory, "reg", buf, sizeof(buf)); |
if (ret <= 0) /* ret is the number of written bytes */ |
return false; |
307,22 → 292,11 |
int pos; |
map->total = 0; |
map->count = 0; |
for (pos = 0; (pos < ret / sizeof(uintptr_t)) && |
for (pos = 0; (pos < ret / sizeof(uint32_t)) && |
(map->count < MEMMAP_MAX_RECORDS); pos += ac + sc) { |
void *start = (void *) (buf[pos + ac - 1]); |
void * start = (void *) ((uintptr_t) buf[pos + ac - 1]); |
unsigned int size = buf[pos + ac + sc - 1]; |
/* |
* This is a hot fix of the issue which occurs on machines |
* where there are holes in the physical memory (such as |
* SunBlade 1500). Should we detect a hole in the physical |
* memory, we will ignore any memory detected behind |
* the hole and pretend the hole does not exist. |
*/ |
if ((map->count > 0) && (map->zones[map->count - 1].start + |
map->zones[map->count - 1].size < start)) |
break; |
if (size > 0) { |
map->zones[map->count].start = start; |
map->zones[map->count].size = size; |
334,13 → 308,13 |
return true; |
} |
int ofw_screen(screen_t *screen) |
{ |
char device_name[BUF_SIZE]; |
uint32_t virtaddr; |
if (ofw_get_property(ofw_aliases, "screen", device_name, |
sizeof(device_name)) <= 0) |
if (ofw_get_property(ofw_aliases, "screen", device_name, sizeof(device_name)) <= 0) |
return false; |
phandle device = ofw_find_device(device_name); |
347,78 → 321,27 |
if (device == -1) |
return false; |
if (ofw_get_property(device, "address", &virtaddr, |
sizeof(virtaddr)) <= 0) |
if (ofw_get_property(device, "address", &virtaddr, sizeof(virtaddr)) <= 0) |
return false; |
screen->addr = (void *) ((uintptr_t) virtaddr); |
if (ofw_get_property(device, "width", &screen->width, |
sizeof(screen->width)) <= 0) |
if (ofw_get_property(device, "width", &screen->width, sizeof(screen->width)) <= 0) |
return false; |
if (ofw_get_property(device, "height", &screen->height, |
sizeof(screen->height)) <= 0) |
if (ofw_get_property(device, "height", &screen->height, sizeof(screen->height)) <= 0) |
return false; |
if (ofw_get_property(device, "depth", &screen->bpp, |
sizeof(screen->bpp)) <= 0) |
if (ofw_get_property(device, "depth", &screen->bpp, sizeof(screen->bpp)) <= 0) |
return false; |
if (ofw_get_property(device, "linebytes", &screen->scanline, |
sizeof(screen->scanline)) <= 0) |
if (ofw_get_property(device, "linebytes", &screen->scanline, sizeof(screen->scanline)) <= 0) |
return false; |
return true; |
} |
#define RED(i) (((i) >> 5) & ((1 << 3) - 1)) |
#define GREEN(i) (((i) >> 3) & ((1 << 2) - 1)) |
#define BLUE(i) ((i) & ((1 << 3) - 1)) |
#define CLIP(i) ((i) <= 255 ? (i) : 255) |
/** |
* Sets up the palette for the 8-bit color depth configuration so that the |
* 3:2:3 color scheme can be used. Checks that setting the palette makes sense |
* (appropriate nodes exist in the OBP tree and the color depth is not greater |
* than 8). |
* |
* @return true if the palette has been set, false otherwise |
* |
*/ |
int ofw_setup_palette(void) |
{ |
char device_name[BUF_SIZE]; |
/* resolve alias */ |
if (ofw_get_property(ofw_aliases, "screen", device_name, |
sizeof(device_name)) <= 0) |
return false; |
/* for depth greater than 8 it makes no sense to set up the palette */ |
uint32_t depth; |
phandle device = ofw_find_device(device_name); |
if (device == -1) |
return false; |
if (ofw_get_property(device, "depth", &depth, sizeof(uint32_t)) <= 0) |
return false; |
if (depth != 8) |
return false; |
/* required in order to be able to make a method call */ |
ihandle screen = ofw_open(device_name); |
if (screen == -1) |
return false; |
/* setup the palette so that the (inverted) 3:2:3 scheme is usable */ |
unsigned int i; |
for (i = 0; i < 256; i++) |
ofw_call("call-method", 6, 1, NULL, "color!", screen, |
255 - i, CLIP(BLUE(i) * 37), GREEN(i) * 85, CLIP(RED(i) * 37)); |
return true; |
} |
void ofw_quiesce(void) |
{ |
ofw_call("quiesce", 0, 0, NULL); |
/branches/arm/boot/genarch/ofw_tree.c |
---|
42,11 → 42,10 |
static ofw_tree_property_t *ofw_tree_properties_alloc(unsigned count) |
{ |
return balloc(count * sizeof(ofw_tree_property_t), |
sizeof(ofw_tree_property_t)); |
return balloc(count * sizeof(ofw_tree_property_t), sizeof(ofw_tree_property_t)); |
} |
static void *ofw_tree_space_alloc(size_t size) |
static void * ofw_tree_space_alloc(size_t size) |
{ |
char *addr; |
66,26 → 65,23 |
return addr; |
} |
/** Transfer information from one OpenFirmware node into its memory |
* representation. |
/** Transfer information from one OpenFirmware node into its memory representation. |
* |
* Transfer entire information from the OpenFirmware device tree 'current' node |
* to its memory representation in 'current_node'. This function recursively |
* processes all node's children. Node's peers are processed iteratively in |
* order to prevent stack from overflowing. |
* Transfer entire information from the OpenFirmware device tree 'current' node to |
* its memory representation in 'current_node'. This function recursively processes |
* all node's children. Node's peers are processed iteratively in order to prevent |
* stack from overflowing. |
* |
* @param current_node Pointer to uninitialized ofw_tree_node structure that |
* will become the memory represenation of 'current'. |
* @param parent_node Parent ofw_tree_node structure or NULL in case of root |
* node. |
* @param current_node Pointer to uninitialized ofw_tree_node structure that will |
* become the memory represenation of 'current'. |
* @param parent_node Parent ofw_tree_node structure or NULL in case of root node. |
* @param current OpenFirmware phandle to the current device tree node. |
*/ |
static void ofw_tree_node_process(ofw_tree_node_t *current_node, |
ofw_tree_node_t *parent_node, phandle current) |
ofw_tree_node_t *parent_node, phandle current) |
{ |
static char path[MAX_PATH_LEN + 1]; |
static char path[MAX_PATH_LEN+1]; |
static char name[OFW_TREE_PROPERTY_MAX_NAMELEN]; |
static char name2[OFW_TREE_PROPERTY_MAX_NAMELEN]; |
phandle peer; |
phandle child; |
size_t len; |
125,6 → 121,7 |
memcpy(current_node->da_name, &path[i], len); |
current_node->da_name[len] = '\0'; |
/* |
* Recursively process the potential child node. |
*/ |
134,8 → 131,7 |
child_node = ofw_tree_node_alloc(); |
if (child_node) { |
ofw_tree_node_process(child_node, current_node, |
child); |
ofw_tree_node_process(child_node, current_node, child); |
current_node->child = child_node; |
} |
} |
144,11 → 140,9 |
* Count properties. |
*/ |
name[0] = '\0'; |
while (ofw_next_property(current, name, name2) == 1) { |
while (ofw_next_property(current, name, name) == 1) |
current_node->properties++; |
memcpy(name, name2, OFW_TREE_PROPERTY_MAX_NAMELEN); |
} |
if (!current_node->properties) |
return; |
155,23 → 149,20 |
/* |
* Copy properties. |
*/ |
current_node->property = |
ofw_tree_properties_alloc(current_node->properties); |
current_node->property = ofw_tree_properties_alloc(current_node->properties); |
if (!current_node->property) |
return; |
name[0] = '\0'; |
for (i = 0; ofw_next_property(current, name, name2) == 1; i++) { |
for (i = 0; ofw_next_property(current, name, name) == 1; i++) { |
size_t size; |
if (i == current_node->properties) |
break; |
memcpy(name, name2, OFW_TREE_PROPERTY_MAX_NAMELEN); |
memcpy(current_node->property[i].name, name, |
OFW_TREE_PROPERTY_MAX_NAMELEN); |
current_node->property[i].name[ |
OFW_TREE_PROPERTY_MAX_NAMELEN] = '\0'; |
OFW_TREE_PROPERTY_MAX_NAMELEN); |
current_node->property[i].name[OFW_TREE_PROPERTY_MAX_NAMELEN] = '\0'; |
size = ofw_get_proplen(current, name); |
current_node->property[i].size = size; |
183,8 → 174,7 |
/* |
* Copy property value to memory node. |
*/ |
(void) ofw_get_property(current, name, |
buf, size); |
(void) ofw_get_property(current, name, buf, size); |
} |
} else { |
current_node->property[i].value = NULL; |
191,8 → 181,7 |
} |
} |
/* Just in case we ran out of memory. */ |
current_node->properties = i; |
current_node->properties = i; /* Just in case we ran out of memory. */ |
/* |
* Iteratively process the next peer node. |
225,33 → 214,15 |
/** Construct memory representation of OpenFirmware device tree. |
* |
* @return NULL on failure or pointer to the root node. |
* @return NULL on failure or pointer to the root node. |
*/ |
ofw_tree_node_t *ofw_tree_build(void) |
{ |
ofw_tree_node_t *root; |
phandle ssm_node; |
ofw_tree_node_t *ssm; |
root = ofw_tree_node_alloc(); |
if (root) |
ofw_tree_node_process(root, NULL, ofw_root); |
/* |
* The firmware client interface does not automatically include the |
* "ssm" node in the list of children of "/". A nasty yet working |
* solution is to explicitly stick "ssm" to the OFW tree. |
*/ |
ssm_node = ofw_find_device("/ssm@0,0"); |
if (ssm_node != -1) { |
ssm = ofw_tree_node_alloc(); |
if (ssm) { |
ofw_tree_node_process(ssm, root, |
ofw_find_device("/ssm@0,0")); |
ssm->peer = root->child; |
root->child = ssm; |
} |
} |
return root; |
} |
/branches/arm/boot/Makefile |
---|
29,8 → 29,7 |
## Include configuration |
# |
-include ../Makefile.config |
-include ../config.defs |
-include Makefile.config |
## Paths |
# |
39,11 → 38,31 |
KERNELDIR = $(BASE)/kernel |
USPACEDIR = $(BASE)/uspace |
.PHONY: all build clean generic_clean |
ifeq ($(CONFIG_DEBUG),y) |
DEFS += -DCONFIG_DEBUG |
endif |
all: ../Makefile.config ../config.h ../config.defs build |
ifeq ($(CONFIG_BAT),y) |
DEFS += -DCONFIG_BAT |
endif |
-include arch/$(BARCH)/Makefile.inc |
ifeq ($(CONFIG_SMP),y) |
DEFS += -DCONFIG_SMP |
endif |
.PHONY: all build config distclean clean generic_clean |
all: |
../tools/config.py boot.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG) $(IMAGE) |
$(MAKE) -C . build |
-include arch/$(ARCH)/Makefile.inc |
config: |
../tools/config.py boot.config |
distclean: clean |
-rm Makefile.config |
generic_clean: |
-rm generic/*.o genarch/*.o |
/branches/arm/Makefile |
---|
29,21 → 29,112 |
## Include configuration |
# |
.PHONY: all config distclean clean cscope |
-include Makefile.config |
all: Makefile.config config.h config.defs |
$(MAKE) -C kernel |
$(MAKE) -C uspace |
$(MAKE) -C boot |
## Setup platform configuration |
# |
Makefile.config config.h config.defs: HelenOS.config |
tools/config.py HelenOS.config default |
ifeq ($(PLATFORM),amd64) |
KARCH = amd64 |
MACHINE = opteron |
UARCH = amd64 |
BARCH = amd64 |
endif |
ifeq ($(PLATFORM),arm32) |
KARCH = arm32 |
UARCH = arm32 |
BARCH = arm32 |
endif |
ifeq ($(PLATFORM),ia32) |
KARCH = ia32 |
UARCH = ia32 |
BARCH = ia32 |
endif |
ifeq ($(PLATFORM),ia64) |
KARCH = ia64 |
UARCH = ia64 |
BARCH = ia64 |
endif |
ifeq ($(PLATFORM),mips32) |
KARCH = mips32 |
BARCH = mips32 |
ifeq ($(MACHINE),msim) |
UARCH = mips32 |
IMAGE = binary |
endif |
ifeq ($(MACHINE),simics) |
UARCH = mips32 |
IMAGE = ecoff |
endif |
ifeq ($(MACHINE),bgxemul) |
UARCH = mips32eb |
IMAGE = ecoff |
endif |
ifeq ($(MACHINE),lgxemul) |
UARCH = mips32 |
IMAGE = ecoff |
endif |
endif |
ifeq ($(PLATFORM),ppc32) |
KARCH = ppc32 |
UARCH = ppc32 |
BARCH = ppc32 |
endif |
ifeq ($(PLATFORM),ppc64) |
KARCH = ppc64 |
UARCH = ppc64 |
BARCH = ppc64 |
endif |
ifeq ($(PLATFORM),sparc64) |
KARCH = sparc64 |
UARCH = sparc64 |
BARCH = sparc64 |
endif |
ifeq ($(PLATFORM),ia32xen) |
KARCH = ia32xen |
UARCH = ia32 |
BARCH = ia32xen |
endif |
.PHONY: all build config distclean clean cscope |
all: |
tools/config.py HelenOS.config default $(PLATFORM) $(COMPILER) $(CONFIG_DEBUG) |
$(MAKE) -C . build |
build: |
ifneq ($(MACHINE),) |
$(MAKE) -C kernel ARCH=$(KARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) MACHINE=$(MACHINE) |
else |
$(MAKE) -C kernel ARCH=$(KARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) |
endif |
$(MAKE) -C uspace ARCH=$(UARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) |
ifneq ($(IMAGE),) |
$(MAKE) -C boot ARCH=$(BARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) IMAGE=$(IMAGE) MACHINE=$(MACHINE) |
else |
$(MAKE) -C boot ARCH=$(BARCH) COMPILER=$(COMPILER) CONFIG_DEBUG=$(CONFIG_DEBUG) MACHINE=$(MACHINE) |
endif |
config: |
tools/config.py HelenOS.config |
distclean: clean |
rm -f Makefile.config config.h config.defs tools/*.pyc |
distclean: |
-$(MAKE) -C kernel distclean |
-$(MAKE) -C uspace distclean |
-$(MAKE) -C boot distclean |
rm -f Makefile.config tools/*.pyc |
clean: |
-$(MAKE) -C kernel clean |
/branches/arm/uspace/lib/libblock/libblock.h |
---|
File deleted |
/branches/arm/uspace/lib/libblock/Makefile |
---|
File deleted |
/branches/arm/uspace/lib/libblock/libblock.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/event.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/devmap.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/fibril_sync.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/macros.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/mem.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/uspace/lib/libc/include/adt/gcdlcm.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/adt/hash_table.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/adt/list.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/adt/fifo.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/loader/loader.h |
---|
37,7 → 37,6 |
#define LIBC_LOADER_H_ |
#include <task.h> |
#include <vfs/vfs.h> |
/** Abstraction of a loader connection */ |
typedef struct { |
45,12 → 44,10 |
int phone_id; |
} loader_t; |
extern int loader_spawn(const char *); |
extern loader_t *loader_connect(void); |
extern loader_t *loader_spawn(void); |
extern int loader_get_task_id(loader_t *, task_id_t *); |
extern int loader_set_pathname(loader_t *, const char *); |
extern int loader_set_args(loader_t *, char *const[]); |
extern int loader_set_files(loader_t *, fdi_node_t *const[]); |
extern int loader_set_args(loader_t *, char *const []); |
extern int loader_load_program(loader_t *); |
extern int loader_run(loader_t *); |
extern void loader_abort(loader_t *); |
/branches/arm/uspace/lib/libc/include/loader/pcb.h |
---|
37,7 → 37,6 |
#define LIBC_PCB_H_ |
#include <sys/types.h> |
#include <vfs/vfs.h> |
typedef void (*entry_point_t)(void); |
46,34 → 45,27 |
* Holds pointers to data passed from the program loader to the program |
* and/or to the dynamic linker. This includes the program entry point, |
* arguments, environment variables etc. |
* |
*/ |
typedef struct { |
/** Program entry point. */ |
/** Program entry point */ |
entry_point_t entry; |
/** Number of command-line arguments. */ |
/** Number of command-line arguments */ |
int argc; |
/** Command-line arguments. */ |
/** Command-line arguments */ |
char **argv; |
/** Number of preset files. */ |
int filc; |
/** Preset files. */ |
fdi_node_t **filv; |
/* |
* ELF-specific data. |
* ELF-specific data |
*/ |
/** Pointer to ELF dynamic section of the program. */ |
/** Pointer to ELF dynamic section of the program */ |
void *dynamic; |
/** Pointer to dynamic section of the runtime linker */ |
void *rtld_dynamic; |
/** Runtime-linker load bias */ |
uintptr_t rtld_bias; |
} pcb_t; |
/** |
* A pointer to the program control block. Having received the PCB pointer, |
* the C library startup code stores it here for later use. |
*/ |
extern pcb_t *__pcb; |
#endif |
/branches/arm/uspace/lib/libc/include/ipc/bus.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/ipc/console.h |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/uspace/lib/libc/include/ipc/vfs.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/ipc/bd.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/ipc/loader.h |
---|
42,10 → 42,9 |
LOADER_GET_TASKID, |
LOADER_SET_PATHNAME, |
LOADER_SET_ARGS, |
LOADER_SET_FILES, |
LOADER_LOAD, |
LOADER_RUN |
} loader_request_t; |
} fb_request_t; |
#endif |
/branches/arm/uspace/lib/libc/include/ipc/ipc.h |
---|
30,29 → 30,25 |
* @{ |
*/ |
/** @file |
*/ |
*/ |
#ifndef LIBIPC_IPC_H_ |
#define LIBIPC_IPC_H_ |
#include <task.h> |
#include <kernel/ipc/ipc.h> |
#include <kernel/ddi/irq.h> |
#include <sys/types.h> |
#include <kernel/synch/synch.h> |
#define IPC_FLAG_BLOCKING 0x01 |
typedef sysarg_t ipcarg_t; |
typedef struct { |
ipcarg_t args[IPC_CALL_LEN]; |
ipcarg_t in_phone_hash; |
} ipc_call_t; |
typedef sysarg_t ipc_callid_t; |
typedef void (* ipc_async_callback_t)(void *, int, ipc_call_t *); |
typedef void (* ipc_async_callback_t)(void *private, int retval, |
ipc_call_t *data); |
/* |
* User-friendly wrappers for ipc_call_sync_fast() and ipc_call_sync_slow(). |
61,51 → 57,49 |
* possible, the fast version is used. |
*/ |
#define ipc_call_sync_0_0(phoneid, method) \ |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0) |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0) |
#define ipc_call_sync_0_1(phoneid, method, res1) \ |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0) |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0) |
#define ipc_call_sync_0_2(phoneid, method, res1, res2) \ |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0) |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0) |
#define ipc_call_sync_0_3(phoneid, method, res1, res2, res3) \ |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ |
0, 0) |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ |
0, 0) |
#define ipc_call_sync_0_4(phoneid, method, res1, res2, res3, res4) \ |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ |
(res4), 0) |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ |
(res4), 0) |
#define ipc_call_sync_0_5(phoneid, method, res1, res2, res3, res4, res5) \ |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ |
(res4), (res5)) |
ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ |
(res4), (res5)) |
#define ipc_call_sync_1_0(phoneid, method, arg1) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0) |
#define ipc_call_sync_1_1(phoneid, method, arg1, res1) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0) |
#define ipc_call_sync_1_2(phoneid, method, arg1, res1, res2) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \ |
0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \ |
0, 0) |
#define ipc_call_sync_1_3(phoneid, method, arg1, res1, res2, res3) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \ |
(res3), 0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \ |
(res3), 0, 0) |
#define ipc_call_sync_1_4(phoneid, method, arg1, res1, res2, res3, res4) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \ |
(res3), (res4), 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \ |
(res3), (res4), 0) |
#define ipc_call_sync_1_5(phoneid, method, arg1, res1, res2, res3, res4, \ |
res5) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \ |
(res3), (res4), (res5)) |
#define ipc_call_sync_2_0(phoneid, method, arg1, arg2) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \ |
0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \ |
0, 0) |
#define ipc_call_sync_2_1(phoneid, method, arg1, arg2, res1) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \ |
0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \ |
0, 0) |
#define ipc_call_sync_2_2(phoneid, method, arg1, arg2, res1, res2) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ |
(res2), 0, 0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ |
(res2), 0, 0, 0) |
#define ipc_call_sync_2_3(phoneid, method, arg1, arg2, res1, res2, res3) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ |
(res2), (res3), 0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ |
(res2), (res3), 0, 0) |
#define ipc_call_sync_2_4(phoneid, method, arg1, arg2, res1, res2, res3, \ |
res4) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ |
114,16 → 108,15 |
res4, res5)\ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ |
(res2), (res3), (res4), (res5)) |
#define ipc_call_sync_3_0(phoneid, method, arg1, arg2, arg3) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \ |
0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \ |
0, 0) |
#define ipc_call_sync_3_1(phoneid, method, arg1, arg2, arg3, res1) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \ |
0, 0, 0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \ |
0, 0, 0, 0) |
#define ipc_call_sync_3_2(phoneid, method, arg1, arg2, arg3, res1, res2) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \ |
(res2), 0, 0, 0) |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \ |
(res2), 0, 0, 0) |
#define ipc_call_sync_3_3(phoneid, method, arg1, arg2, arg3, res1, res2, \ |
res3) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \ |
136,16 → 129,15 |
res3, res4, res5) \ |
ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \ |
(res1), (res2), (res3), (res4), (res5)) |
#define ipc_call_sync_4_0(phoneid, method, arg1, arg2, arg3, arg4) \ |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ |
0, 0, 0, 0, 0) |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ |
0, 0, 0, 0, 0) |
#define ipc_call_sync_4_1(phoneid, method, arg1, arg2, arg3, arg4, res1) \ |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ |
(res1), 0, 0, 0, 0) |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ |
(res1), 0, 0, 0, 0) |
#define ipc_call_sync_4_2(phoneid, method, arg1, arg2, arg3, arg4, res1, res2) \ |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ |
(res1), (res2), 0, 0, 0) |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ |
(res1), (res2), 0, 0, 0) |
#define ipc_call_sync_4_3(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \ |
res3) \ |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \ |
158,13 → 150,12 |
res3, res4, res5) \ |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \ |
(arg4), 0, (res1), (res2), (res3), (res4), (res5)) |
#define ipc_call_sync_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \ |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), 0, 0, 0, 0, 0) |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), 0, 0, 0, 0, 0) |
#define ipc_call_sync_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1) \ |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), (res1), 0, 0, 0, 0) |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), (res1), 0, 0, 0, 0) |
#define ipc_call_sync_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \ |
res2) \ |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \ |
182,23 → 173,23 |
ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \ |
(arg4), (arg5), (res1), (res2), (res3), (res4), (res5)) |
extern int ipc_call_sync_fast(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t, |
ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *); |
extern int ipc_call_sync_fast(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *result1, ipcarg_t *result2, |
ipcarg_t *result3, ipcarg_t *result4, ipcarg_t *result5); |
extern int ipc_call_sync_slow(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t, |
ipcarg_t, ipcarg_t, ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *, |
ipcarg_t *); |
extern int ipc_call_sync_slow(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, |
ipcarg_t *result1, ipcarg_t *result2, ipcarg_t *result3, ipcarg_t *result4, |
ipcarg_t *result5); |
extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, uint32_t, int); |
extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, uint32_t); |
extern ipc_callid_t ipc_wait_cycle(ipc_call_t *call, uint32_t usec, int flags); |
extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *data, uint32_t usec); |
static inline ipc_callid_t ipc_wait_for_call(ipc_call_t *data) |
{ |
return ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT); |
} |
extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *data); |
extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *); |
/* |
* User-friendly wrappers for ipc_answer_fast() and ipc_answer_slow(). |
* They are in the form of ipc_answer_m(), where m is the number of return |
206,22 → 197,22 |
* to m. |
*/ |
#define ipc_answer_0(callid, retval) \ |
ipc_answer_fast((callid), (retval), 0, 0, 0, 0) |
ipc_answer_fast((callid), (retval), 0, 0, 0, 0) |
#define ipc_answer_1(callid, retval, arg1) \ |
ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0) |
ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0) |
#define ipc_answer_2(callid, retval, arg1, arg2) \ |
ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0) |
ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0) |
#define ipc_answer_3(callid, retval, arg1, arg2, arg3) \ |
ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0) |
ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0) |
#define ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4) \ |
ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4)) |
ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4)) |
#define ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5) \ |
ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5)) |
ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5)) |
extern ipcarg_t ipc_answer_fast(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t, |
ipcarg_t, ipcarg_t); |
extern ipcarg_t ipc_answer_slow(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t, |
ipcarg_t, ipcarg_t, ipcarg_t); |
extern ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval, |
ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4); |
extern ipcarg_t ipc_answer_slow(ipc_callid_t callid, ipcarg_t retval, |
ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5); |
/* |
* User-friendly wrappers for ipc_call_async_fast() and ipc_call_async_slow(). |
229,7 → 220,8 |
* arguments. The macros decide between the fast and the slow version according |
* to m. |
*/ |
#define ipc_call_async_0(phoneid, method, private, callback, can_preempt) \ |
#define ipc_call_async_0(phoneid, method, private, callback, \ |
can_preempt) \ |
ipc_call_async_fast((phoneid), (method), 0, 0, 0, 0, (private), \ |
(callback), (can_preempt)) |
#define ipc_call_async_1(phoneid, method, arg1, private, callback, \ |
253,48 → 245,53 |
ipc_call_async_slow((phoneid), (method), (arg1), (arg2), (arg3), \ |
(arg4), (arg5), (private), (callback), (can_preempt)) |
extern void ipc_call_async_fast(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t, |
ipcarg_t, void *, ipc_async_callback_t, int); |
extern void ipc_call_async_slow(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t, |
ipcarg_t, ipcarg_t, void *, ipc_async_callback_t, int); |
extern void ipc_call_async_fast(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, void *private, |
ipc_async_callback_t callback, int can_preempt); |
extern void ipc_call_async_slow(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, void *private, |
ipc_async_callback_t callback, int can_preempt); |
extern int ipc_connect_to_me(int, int, int, int, ipcarg_t *); |
extern int ipc_connect_me_to(int, int, int, int); |
extern int ipc_connect_me_to_blocking(int, int, int, int); |
extern int ipc_hangup(int); |
extern int ipc_register_irq(int, int, int, irq_code_t *); |
extern int ipc_unregister_irq(int, int); |
extern int ipc_forward_fast(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, int); |
extern int ipc_forward_slow(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, |
ipcarg_t, ipcarg_t, ipcarg_t, int); |
extern int ipc_connect_to_me(int phoneid, int arg1, int arg2, int arg3, |
ipcarg_t *phone); |
extern int ipc_connect_me_to(int phoneid, int arg1, int arg2, int arg3); |
extern int ipc_hangup(int phoneid); |
extern int ipc_register_irq(int inr, int devno, int method, irq_code_t *code); |
extern int ipc_unregister_irq(int inr, int devno); |
extern int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method, |
ipcarg_t arg1, ipcarg_t arg2, int mode); |
/* |
* User-friendly wrappers for ipc_share_in_start(). |
*/ |
#define ipc_share_in_start_0_0(phoneid, dst, size) \ |
ipc_share_in_start((phoneid), (dst), (size), 0, NULL) |
ipc_share_in_start((phoneid), (dst), (size), 0, NULL) |
#define ipc_share_in_start_0_1(phoneid, dst, size, flags) \ |
ipc_share_in_start((phoneid), (dst), (size), 0, (flags)) |
ipc_share_in_start((phoneid), (dst), (size), 0, (flags)) |
#define ipc_share_in_start_1_0(phoneid, dst, size, arg) \ |
ipc_share_in_start((phoneid), (dst), (size), (arg), NULL) |
ipc_share_in_start((phoneid), (dst), (size), (arg), NULL) |
#define ipc_share_in_start_1_1(phoneid, dst, size, arg, flags) \ |
ipc_share_in_start((phoneid), (dst), (size), (arg), (flags)) |
ipc_share_in_start((phoneid), (dst), (size), (arg), (flags)) |
extern int ipc_share_in_start(int, void *, size_t, ipcarg_t, int *); |
extern int ipc_share_in_receive(ipc_callid_t *, size_t *); |
extern int ipc_share_in_finalize(ipc_callid_t, void *, int ); |
extern int ipc_share_out_start(int, void *, int); |
extern int ipc_share_out_receive(ipc_callid_t *, size_t *, int *); |
extern int ipc_share_out_finalize(ipc_callid_t, void *); |
extern int ipc_data_read_start(int, void *, size_t); |
extern int ipc_data_read_receive(ipc_callid_t *, size_t *); |
extern int ipc_data_read_finalize(ipc_callid_t, const void *, size_t); |
extern int ipc_data_write_start(int, const void *, size_t); |
extern int ipc_data_write_receive(ipc_callid_t *, size_t *); |
extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t); |
extern int ipc_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg, |
int *flags); |
extern int ipc_share_in_receive(ipc_callid_t *callid, size_t *size); |
extern int ipc_share_in_finalize(ipc_callid_t callid, void *src, int flags); |
extern int ipc_share_out_start(int phoneid, void *src, int flags); |
extern int ipc_share_out_receive(ipc_callid_t *callid, size_t *size, int *flags); |
extern int ipc_share_out_finalize(ipc_callid_t callid, void *dst); |
extern int ipc_data_read_start(int phoneid, void *dst, size_t size); |
extern int ipc_data_read_receive(ipc_callid_t *callid, size_t *size); |
extern int ipc_data_read_finalize(ipc_callid_t callid, void *src, size_t size); |
extern int ipc_data_write_start(int phoneid, void *src, size_t size); |
extern int ipc_data_write_receive(ipc_callid_t *callid, size_t *size); |
extern int ipc_data_write_finalize(ipc_callid_t callid, void *dst, size_t size); |
extern int ipc_connect_kbox(task_id_t); |
#include <task.h> |
extern int ipc_connect_kbox(task_id_t id); |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/ipc/devmap.h |
---|
28,19 → 28,16 |
/** @addtogroup devmap |
* @{ |
*/ |
*/ |
#ifndef DEVMAP_DEVMAP_H_ |
#define DEVMAP_DEVMAP_H_ |
#include <atomic.h> |
#include <ipc/ipc.h> |
#include <adt/list.h> |
#include <libadt/list.h> |
#define DEVMAP_NAME_MAXLEN 255 |
#define DEVMAP_NAME_MAXLEN 512 |
typedef ipcarg_t dev_handle_t; |
typedef enum { |
DEVMAP_DRIVER_REGISTER = IPC_FIRST_USER_METHOD, |
DEVMAP_DRIVER_UNREGISTER, |
47,32 → 44,56 |
DEVMAP_DEVICE_REGISTER, |
DEVMAP_DEVICE_UNREGISTER, |
DEVMAP_DEVICE_GET_NAME, |
DEVMAP_DEVICE_GET_HANDLE, |
DEVMAP_DEVICE_NULL_CREATE, |
DEVMAP_DEVICE_NULL_DESTROY, |
DEVMAP_DEVICE_GET_COUNT, |
DEVMAP_DEVICE_GET_DEVICES |
DEVMAP_DEVICE_GET_HANDLE |
} devmap_request_t; |
/** Interface provided by devmap. |
/** Representation of device driver. |
* Each driver is responsible for a set of devices. |
*/ |
typedef struct { |
/** Pointers to previous and next drivers in linked list */ |
link_t drivers; |
/** Pointer to the linked list of devices controlled by |
* this driver */ |
link_t devices; |
/** Phone asociated with this driver */ |
ipcarg_t phone; |
/** Device driver name */ |
char *name; |
/** Futex for list of devices owned by this driver */ |
atomic_t devices_futex; |
} devmap_driver_t; |
/** Info about registered device |
* |
*/ |
typedef struct { |
/** Pointer to the previous and next device in the list of all devices */ |
link_t devices; |
/** Pointer to the previous and next device in the list of devices |
owned by one driver */ |
link_t driver_devices; |
/** Unique device identifier */ |
int handle; |
/** Device name */ |
char *name; |
/** Device driver handling this device */ |
devmap_driver_t *driver; |
} devmap_device_t; |
/** Interface provided by devmap. |
* Every process that connects to devmap must ask one of following |
* interfaces otherwise connection will be refused. |
* |
*/ |
typedef enum { |
/** Connect as device driver */ |
DEVMAP_DRIVER = 1, |
/** Connect as client */ |
/** Connect as device driver */ |
DEVMAP_DRIVER = 1, |
/** Connect as client */ |
DEVMAP_CLIENT, |
/** Create new connection to instance of device that |
is specified by second argument of call. */ |
/** Create new connection to instance of device that |
* is specified by second argument of call. */ |
DEVMAP_CONNECT_TO_DEVICE |
} devmap_interface_t; |
typedef struct { |
dev_handle_t handle; |
char name[DEVMAP_NAME_MAXLEN + 1]; |
} dev_desc_t; |
#endif |
#endif |
/branches/arm/uspace/lib/libc/include/ipc/services.h |
---|
30,8 → 30,8 |
* @{ |
*/ |
/** |
* @file services.h |
* @brief List of all known services and their codes. |
* @file services.h |
* @brief List of all known services and their codes. |
*/ |
#ifndef LIBIPC_SERVICES_H_ |
38,15 → 38,12 |
#define LIBIPC_SERVICES_H_ |
typedef enum { |
SERVICE_LOAD = 1, |
SERVICE_PCI, |
SERVICE_PCI = 1, |
SERVICE_KEYBOARD, |
SERVICE_VIDEO, |
SERVICE_CONSOLE, |
SERVICE_VFS, |
SERVICE_DEVMAP, |
SERVICE_FHC, |
SERVICE_OBIO |
SERVICE_DEVMAP |
} services_t; |
/* Memory area to be received from NS */ |
/branches/arm/uspace/lib/libc/include/ipc/fb.h |
---|
41,7 → 41,6 |
FB_PUTCHAR = IPC_FIRST_USER_METHOD, |
FB_CLEAR, |
FB_GET_CSIZE, |
FB_GET_COLOR_CAP, |
FB_CURSOR_VISIBILITY, |
FB_CURSOR_GOTO, |
FB_SCROLL, |
49,11 → 48,10 |
FB_VIEWPORT_CREATE, |
FB_VIEWPORT_DELETE, |
FB_SET_STYLE, |
FB_SET_COLOR, |
FB_SET_RGB_COLOR, |
FB_GET_RESOLUTION, |
FB_DRAW_TEXT_DATA, |
FB_FLUSH, |
FB_VIEWPORT_DB, |
FB_DRAW_PPM, |
FB_PREPARE_SHM, |
FB_DROP_SHM, |
61,6 → 59,7 |
FB_VP_DRAW_PIXMAP, |
FB_VP2PIXMAP, |
FB_DROP_PIXMAP, |
FB_TRANS_PUTCHAR, |
FB_ANIM_CREATE, |
FB_ANIM_DROP, |
FB_ANIM_ADDPIXMAP, |
67,17 → 66,9 |
FB_ANIM_CHGVP, |
FB_ANIM_START, |
FB_ANIM_STOP, |
FB_POINTER_MOVE, |
FB_SCREEN_YIELD, |
FB_SCREEN_RECLAIM |
FB_POINTER_MOVE |
} fb_request_t; |
enum { |
FB_CCAP_NONE = 0, |
FB_CCAP_STYLE, |
FB_CCAP_INDEXED, |
FB_CCAP_RGB |
}; |
#endif |
/branches/arm/uspace/lib/libc/include/ipc/ns.h |
---|
35,15 → 35,6 |
#ifndef LIBIPC_NS_H_ |
#define LIBIPC_NS_H_ |
#include <ipc/ipc.h> |
typedef enum { |
NS_PING = IPC_FIRST_USER_METHOD, |
NS_TASK_WAIT, |
NS_ID_INTRO, |
NS_RETVAL |
} ns_request_t; |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/task.h |
---|
39,18 → 39,9 |
typedef uint64_t task_id_t; |
typedef enum { |
TASK_EXIT_NORMAL, |
TASK_EXIT_UNEXPECTED |
} task_exit_t; |
extern task_id_t task_get_id(void); |
extern int task_set_name(const char *name); |
extern task_id_t task_spawn(const char *path, char *const argv[]); |
extern int task_wait(task_id_t id, task_exit_t *texit, int *retval); |
extern int task_retval(int val); |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/string.h |
---|
35,59 → 35,32 |
#ifndef LIBC_STRING_H_ |
#define LIBC_STRING_H_ |
#include <mem.h> |
#include <sys/types.h> |
#include <bool.h> |
#define U_SPECIAL '?' |
#define bzero(ptr, len) memset((ptr), 0, (len)) |
/** No size limit constant */ |
#define STR_NO_LIMIT ((size_t) -1) |
extern void * memset(void *, int, size_t); |
extern void * memcpy(void *, const void *, size_t); |
extern void * memmove(void *, const void *, size_t); |
/** Maximum size of a string containing @c length characters */ |
#define STR_BOUNDS(length) ((length) << 2) |
extern int bcmp(const char *, const char *, size_t); |
extern wchar_t str_decode(const char *str, size_t *offset, size_t sz); |
extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz); |
extern int strcmp(const char *, const char *); |
extern int strncmp(const char *, const char *, size_t); |
extern int stricmp(const char *, const char *); |
extern size_t str_size(const char *str); |
extern size_t wstr_size(const wchar_t *str); |
extern char *strcpy(char *, const char *); |
extern char *strncpy(char *, const char *, size_t); |
extern size_t str_lsize(const char *str, size_t max_len); |
extern size_t wstr_lsize(const wchar_t *str, size_t max_len); |
extern char *strcat(char *, const char *); |
extern size_t str_length(const char *str); |
extern size_t wstr_length(const wchar_t *wstr); |
extern size_t strlen(const char *); |
extern size_t str_nlength(const char *str, size_t size); |
extern size_t wstr_nlength(const wchar_t *str, size_t size); |
extern char *strdup(const char *); |
extern bool ascii_check(wchar_t ch); |
extern bool chr_check(wchar_t ch); |
extern char *strchr(const char *, int); |
extern char *strrchr(const char *, int); |
extern int str_cmp(const char *s1, const char *s2); |
extern int str_lcmp(const char *s1, const char *s2, size_t max_len); |
extern void str_cpy(char *dest, size_t size, const char *src); |
extern void str_ncpy(char *dest, size_t size, const char *src, size_t n); |
extern void str_append(char *dest, size_t size, const char *src); |
extern void wstr_nstr(char *dst, const wchar_t *src, size_t size); |
extern const char *str_chr(const char *str, wchar_t ch); |
extern const char *str_rchr(const char *str, wchar_t ch); |
extern bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos); |
extern bool wstr_remove(wchar_t *str, size_t pos); |
extern char *str_dup(const char *); |
/* |
* TODO: Get rid of this. |
*/ |
extern int stricmp(const char *, const char *); |
extern long int strtol(const char *, char **, int); |
extern unsigned long strtoul(const char *, char **, int); |
/branches/arm/uspace/lib/libc/include/stdio.h |
---|
37,115 → 37,37 |
#include <sys/types.h> |
#include <stdarg.h> |
#include <string.h> |
#include <adt/list.h> |
#define EOF (-1) |
#define EOF (-1) |
/** Default size for stream I/O buffers */ |
#define BUFSIZ 4096 |
#include <string.h> |
#include <io/stream.h> |
#define DEBUG(fmt, ...) \ |
{ \ |
char _buf[256]; \ |
int _n = snprintf(_buf, sizeof(_buf), fmt, ##__VA_ARGS__); \ |
if (_n > 0) \ |
(void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) _buf, str_size(_buf)); \ |
} |
{ \ |
char buf[256]; \ |
int n; \ |
n = snprintf(buf, sizeof(buf), fmt, ##__VA_ARGS__); \ |
if (n > 0) \ |
(void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, strlen(buf)); \ |
} |
#ifndef SEEK_SET |
#define SEEK_SET 0 |
#define SEEK_CUR 1 |
#define SEEK_END 2 |
#endif |
enum _buffer_type { |
/** No buffering */ |
_IONBF, |
/** Line buffering */ |
_IOLBF, |
/** Full buffering */ |
_IOFBF |
}; |
typedef struct { |
/** Linked list pointer. */ |
link_t link; |
/** Underlying file descriptor. */ |
int fd; |
/** Error indicator. */ |
int error; |
/** End-of-file indicator. */ |
int eof; |
/** Klog indicator */ |
int klog; |
/** Phone to the file provider */ |
int phone; |
/** Buffering type */ |
enum _buffer_type btype; |
/** Buffer */ |
uint8_t *buf; |
/** Buffer size */ |
size_t buf_size; |
/** Buffer I/O pointer */ |
uint8_t *buf_head; |
} FILE; |
extern FILE *stdin; |
extern FILE *stdout; |
extern FILE *stderr; |
/* Character and string input functions */ |
extern int fgetc(FILE *); |
extern char *fgets(char *, size_t, FILE *); |
extern int getchar(void); |
extern char *gets(char *, size_t); |
/* Character and string output functions */ |
extern int fputc(wchar_t, FILE *); |
extern int fputs(const char *, FILE *); |
extern int putchar(wchar_t); |
extern int puts(const char *); |
extern int putchar(int); |
/* Formatted string output functions */ |
extern int fprintf(FILE *, const char*, ...); |
extern int vfprintf(FILE *, const char *, va_list); |
extern int printf(const char *, ...); |
extern int asprintf(char **, const char *, ...); |
extern int sprintf(char *, const char *fmt, ...); |
extern int snprintf(char *, size_t , const char *, ...); |
extern int printf(const char *, ...); |
extern int vprintf(const char *, va_list); |
extern int snprintf(char *, size_t , const char *, ...); |
extern int asprintf(char **, const char *, ...); |
extern int vsprintf(char *, const char *, va_list); |
extern int vsnprintf(char *, size_t, const char *, va_list); |
/* File stream functions */ |
extern FILE *fopen(const char *, const char *); |
extern FILE *fdopen(int, const char *); |
extern int fclose(FILE *); |
#define fprintf(f, fmt, ...) printf(fmt, ##__VA_ARGS__) |
extern size_t fread(void *, size_t, size_t, FILE *); |
extern size_t fwrite(const void *, size_t, size_t, FILE *); |
extern int fseek(FILE *, long, int); |
extern void rewind(FILE *); |
extern int ftell(FILE *); |
extern int feof(FILE *); |
extern int fflush(FILE *); |
extern int ferror(FILE *); |
extern void clearerr(FILE *); |
extern void setvbuf(FILE *, void *, int, size_t); |
/* Misc file functions */ |
extern int rename(const char *, const char *); |
#endif |
/branches/arm/uspace/lib/libc/include/getopt.h |
---|
58,7 → 58,7 |
}; |
/* HelenOS Port - These need to be exposed for legacy getopt() */ |
extern const char *optarg; |
extern char *optarg; |
extern int optind, opterr, optopt; |
extern int optreset; |
/branches/arm/uspace/lib/libc/include/vfs/vfs.h |
---|
36,36 → 36,11 |
#define LIBC_VFS_H_ |
#include <sys/types.h> |
#include <ipc/vfs.h> |
#include <ipc/devmap.h> |
#include <stdio.h> |
/** |
* This type is a libc version of the VFS triplet. |
* It uniquelly identifies a file system node within a file system instance. |
*/ |
typedef struct { |
fs_handle_t fs_handle; |
dev_handle_t dev_handle; |
fs_index_t index; |
} fdi_node_t; |
extern char *absolutize(const char *, size_t *); |
extern int mount(const char *, const char *, const char *, const char *, |
unsigned int); |
extern int mount(const char *, const char *, const char *); |
extern void __stdio_init(int filc, fdi_node_t *filv[]); |
extern void __stdio_done(void); |
extern int open_node(fdi_node_t *, int); |
extern int fd_phone(int); |
extern int fd_node(int, fdi_node_t *); |
extern FILE *fopen_node(fdi_node_t *, const char *); |
extern int fphone(FILE *); |
extern int fnode(FILE *, fdi_node_t *); |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/ctype.h |
---|
79,19 → 79,11 |
static inline int tolower(int c) |
{ |
if (isupper(c)) |
return (c + ('a' - 'A')); |
return (c + ('a' - 'A' > 0 ? 'a' - 'A' : 'A' - 'a')); |
else |
return c; |
} |
static inline int toupper(int c) |
{ |
if (islower(c)) |
return (c + ('A' - 'a')); |
else |
return c; |
} |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/libc.h |
---|
39,20 → 39,14 |
#include <kernel/syscall/syscall.h> |
#include <libarch/syscall.h> |
#define __SYSCALL0(id) \ |
__syscall0(0, 0, 0, 0, 0, 0, id) |
#define __SYSCALL1(id, p1) \ |
__syscall1(p1, 0, 0, 0, 0, 0, id) |
#define __SYSCALL2(id, p1, p2) \ |
__syscall2(p1, p2, 0, 0, 0, 0, id) |
#define __SYSCALL3(id, p1, p2, p3) \ |
__syscall3(p1, p2, p3, 0, 0, 0, id) |
#define __SYSCALL4(id, p1, p2, p3, p4) \ |
__syscall4(p1, p2, p3, p4, 0, 0, id) |
#define __SYSCALL5(id, p1, p2, p3, p4, p5) \ |
__syscall5(p1, p2, p3, p4, p5, 0, id) |
#define __SYSCALL0(id) __syscall(0, 0, 0, 0, 0, 0, id) |
#define __SYSCALL1(id, p1) __syscall(p1, 0, 0, 0, 0, 0, id) |
#define __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, 0, 0, 0, id) |
#define __SYSCALL3(id, p1, p2, p3) __syscall(p1, p2, p3, 0, 0, 0, id) |
#define __SYSCALL4(id, p1, p2, p3, p4) __syscall(p1, p2, p3, p4, 0, 0, id) |
#define __SYSCALL5(id, p1, p2, p3, p4, p5) __syscall(p1, p2, p3, p4, p5, 0, id) |
#define __SYSCALL6(id, p1, p2, p3, p4, p5, p6) \ |
__syscall6(p1, p2, p3, p4, p5, p6, id) |
__syscall(p1, p2, p3, p4, p5, p6,id) |
extern void __main(void *pcb_ptr); |
extern void __exit(void); |
/branches/arm/uspace/lib/libc/include/io/keycode.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/io/color.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/io/console.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/io/klog.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/io/style.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/include/io/stream.h |
---|
0,0 → 1,55 |
/* |
* Copyright (c) 2006 Jakub Vana |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_STREAM_H_ |
#define LIBC_STREAM_H_ |
#include <libarch/types.h> |
#define EMFILE -17 |
extern void open_console(void); |
extern void close_console(void); |
extern void klog_update(void); |
extern ssize_t read_stdin(void *, size_t); |
extern ssize_t write_stdout(const void *, size_t); |
extern ssize_t write_stderr(const void *, size_t); |
extern int get_cons_phone(void); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/include/io/printf_core.h |
---|
39,20 → 39,19 |
#include <stdarg.h> |
/** Structure for specifying output methods for different printf clones. */ |
typedef struct printf_spec { |
/* String output function, returns number of printed characters or EOF */ |
int (*str_write)(const char *, size_t, void *); |
/* Wide string output function, returns number of printed characters or EOF */ |
int (*wstr_write)(const wchar_t *, size_t, void *); |
/* User data - output stream specification, state, locks, etc. */ |
struct printf_spec { |
/* Output function, returns count of printed characters or EOF */ |
int (*write)(void *, size_t, void *); |
/* Support data - output stream specification, its state, locks,... */ |
void *data; |
} printf_spec_t; |
int printf_core(const char *fmt, printf_spec_t *ps, va_list ap); |
}; |
int printf_core(const char *fmt, struct printf_spec *ps ,va_list ap); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/include/io/io.h |
---|
0,0 → 1,50 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_IO_H_ |
#define LIBC_IO_H_ |
#include <sys/types.h> |
int putnchars(const char * buf, size_t count); |
int putstr(const char * str); |
int putchar(int c); |
int getchar(void); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/include/libadt/list.h |
---|
0,0 → 1,206 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_LIST_H_ |
#define LIBC_LIST_H_ |
#include <unistd.h> |
#ifndef true |
# define true 1 |
#endif |
#ifndef false |
# define false 0 |
#endif |
typedef struct link link_t; |
/** Doubly linked list head and link type. */ |
struct link { |
link_t *prev; /**< Pointer to the previous item in the list. */ |
link_t *next; /**< Pointer to the next item in the list. */ |
}; |
/** Declare and initialize statically allocated list. |
* |
* @param name Name of the new statically allocated list. |
*/ |
#define LIST_INITIALIZE(name) link_t name = { .prev = &name, .next = &name } |
/** Initialize doubly-linked circular list link |
* |
* Initialize doubly-linked list link. |
* |
* @param link Pointer to link_t structure to be initialized. |
*/ |
static inline void link_initialize(link_t *link) |
{ |
link->prev = NULL; |
link->next = NULL; |
} |
/** Initialize doubly-linked circular list |
* |
* Initialize doubly-linked circular list. |
* |
* @param head Pointer to link_t structure representing head of the list. |
*/ |
static inline void list_initialize(link_t *head) |
{ |
head->prev = head; |
head->next = head; |
} |
/** Add item to the beginning of doubly-linked circular list |
* |
* Add item to the beginning of doubly-linked circular list. |
* |
* @param link Pointer to link_t structure to be added. |
* @param head Pointer to link_t structure representing head of the list. |
*/ |
static inline void list_prepend(link_t *link, link_t *head) |
{ |
link->next = head->next; |
link->prev = head; |
head->next->prev = link; |
head->next = link; |
} |
/** Add item to the end of doubly-linked circular list |
* |
* Add item to the end of doubly-linked circular list. |
* |
* @param link Pointer to link_t structure to be added. |
* @param head Pointer to link_t structure representing head of the list. |
*/ |
static inline void list_append(link_t *link, link_t *head) |
{ |
link->prev = head->prev; |
link->next = head; |
head->prev->next = link; |
head->prev = link; |
} |
/** Insert item before another item in doubly-linked circular list. */ |
static inline void list_insert_before(link_t *l, link_t *r) |
{ |
list_append(l, r); |
} |
/** Insert item after another item in doubly-linked circular list. */ |
static inline void list_insert_after(link_t *r, link_t *l) |
{ |
list_prepend(l, r); |
} |
/** Remove item from doubly-linked circular list |
* |
* Remove item from doubly-linked circular list. |
* |
* @param link Pointer to link_t structure to be removed from the list it is contained in. |
*/ |
static inline void list_remove(link_t *link) |
{ |
link->next->prev = link->prev; |
link->prev->next = link->next; |
link_initialize(link); |
} |
/** Query emptiness of doubly-linked circular list |
* |
* Query emptiness of doubly-linked circular list. |
* |
* @param head Pointer to link_t structure representing head of the list. |
*/ |
static inline int list_empty(link_t *head) |
{ |
return head->next == head ? true : false; |
} |
/** Split or concatenate headless doubly-linked circular list |
* |
* Split or concatenate headless doubly-linked circular list. |
* |
* Note that the algorithm works both directions: |
* concatenates splitted lists and splits concatenated lists. |
* |
* @param part1 Pointer to link_t structure leading the first (half of the headless) list. |
* @param part2 Pointer to link_t structure leading the second (half of the headless) list. |
*/ |
static inline void headless_list_split_or_concat(link_t *part1, link_t *part2) |
{ |
link_t *hlp; |
part1->prev->next = part2; |
part2->prev->next = part1; |
hlp = part1->prev; |
part1->prev = part2->prev; |
part2->prev = hlp; |
} |
/** Split headless doubly-linked circular list |
* |
* Split headless doubly-linked circular list. |
* |
* @param part1 Pointer to link_t structure leading the first half of the headless list. |
* @param part2 Pointer to link_t structure leading the second half of the headless list. |
*/ |
static inline void headless_list_split(link_t *part1, link_t *part2) |
{ |
headless_list_split_or_concat(part1, part2); |
} |
/** Concatenate two headless doubly-linked circular lists |
* |
* Concatenate two headless doubly-linked circular lists. |
* |
* @param part1 Pointer to link_t structure leading the first headless list. |
* @param part2 Pointer to link_t structure leading the second headless list. |
*/ |
static inline void headless_list_concat(link_t *part1, link_t *part2) |
{ |
headless_list_split_or_concat(part1, part2); |
} |
#define list_get_instance(link,type,member) (type *)(((char *)(link))-((char *)&(((type *)NULL)->member))) |
extern int list_member(const link_t *link, const link_t *head); |
extern void list_concat(link_t *head1, link_t *head2); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/include/libadt/hash_table.h |
---|
0,0 → 1,94 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_HASH_TABLE_H_ |
#define LIBC_HASH_TABLE_H_ |
#include <libadt/list.h> |
#include <unistd.h> |
typedef unsigned long hash_count_t; |
typedef unsigned long hash_index_t; |
typedef struct hash_table hash_table_t; |
typedef struct hash_table_operations hash_table_operations_t; |
/** Hash table structure. */ |
struct hash_table { |
link_t *entry; |
hash_count_t entries; |
hash_count_t max_keys; |
hash_table_operations_t *op; |
}; |
/** Set of operations for hash table. */ |
struct hash_table_operations { |
/** Hash function. |
* |
* @param key Array of keys needed to compute hash index. All keys |
* must be passed. |
* |
* @return Index into hash table. |
*/ |
hash_index_t (* hash)(unsigned long key[]); |
/** Hash table item comparison function. |
* |
* @param key Array of keys that will be compared with item. It is |
* not necessary to pass all keys. |
* |
* @return true if the keys match, false otherwise. |
*/ |
int (*compare)(unsigned long key[], hash_count_t keys, link_t *item); |
/** Hash table item removal callback. |
* |
* @param item Item that was removed from the hash table. |
*/ |
void (*remove_callback)(link_t *item); |
}; |
#define hash_table_get_instance(item, type, member) \ |
list_get_instance((item), type, member) |
extern int hash_table_create(hash_table_t *, hash_count_t, hash_count_t, |
hash_table_operations_t *); |
extern void hash_table_insert(hash_table_t *, unsigned long [], link_t *); |
extern link_t *hash_table_find(hash_table_t *, unsigned long []); |
extern void hash_table_remove(hash_table_t *, unsigned long [], hash_count_t); |
extern void hash_table_destroy(hash_table_t *); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/include/libadt/fifo.h |
---|
0,0 → 1,127 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
/* |
* This implementation of FIFO stores values in an array |
* (static or dynamic). As such, these FIFOs have upper bound |
* on number of values they can store. Push and pop operations |
* are done via accessing the array through head and tail indices. |
* Because of better operation ordering in fifo_pop(), the access |
* policy for these two indices is to 'increment (mod size of FIFO) |
* and use'. |
*/ |
#ifndef LIBC_FIFO_H_ |
#define LIBC_FIFO_H_ |
#include <malloc.h> |
typedef unsigned long fifo_count_t; |
typedef unsigned long fifo_index_t; |
#define FIFO_CREATE_STATIC(name, t, itms) \ |
struct { \ |
t fifo[(itms)]; \ |
fifo_count_t items; \ |
fifo_index_t head; \ |
fifo_index_t tail; \ |
} name |
/** Create and initialize static FIFO. |
* |
* FIFO is allocated statically. |
* This macro is suitable for creating smaller FIFOs. |
* |
* @param name Name of FIFO. |
* @param t Type of values stored in FIFO. |
* @param itms Number of items that can be stored in FIFO. |
*/ |
#define FIFO_INITIALIZE_STATIC(name, t, itms) \ |
FIFO_CREATE_STATIC(name, t, itms) = { \ |
.items = (itms), \ |
.head = 0, \ |
.tail = 0 \ |
} |
/** Create and prepare dynamic FIFO. |
* |
* FIFO is allocated dynamically. |
* This macro is suitable for creating larger FIFOs. |
* |
* @param name Name of FIFO. |
* @param t Type of values stored in FIFO. |
* @param itms Number of items that can be stored in FIFO. |
*/ |
#define FIFO_INITIALIZE_DYNAMIC(name, t, itms) \ |
struct { \ |
t *fifo; \ |
fifo_count_t items; \ |
fifo_index_t head; \ |
fifo_index_t tail; \ |
} name = { \ |
.fifo = NULL, \ |
.items = (itms), \ |
.head = 0, \ |
.tail = 0 \ |
} |
/** Pop value from head of FIFO. |
* |
* @param name FIFO name. |
* |
* @return Leading value in FIFO. |
*/ |
#define fifo_pop(name) \ |
name.fifo[name.head = (name.head + 1) < name.items ? (name.head + 1) : 0] |
/** Push value to tail of FIFO. |
* |
* @param name FIFO name. |
* @param value Value to be appended to FIFO. |
* |
*/ |
#define fifo_push(name, value) \ |
name.fifo[name.tail = (name.tail + 1) < name.items ? (name.tail + 1) : 0] = (value) |
/** Allocate memory for dynamic FIFO. |
* |
* @param name FIFO name. |
*/ |
#define fifo_create(name) \ |
name.fifo = malloc(sizeof(*name.fifo) * name.items) |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/include/byteorder.h |
---|
35,48 → 35,33 |
#ifndef LIBC_BYTEORDER_H_ |
#define LIBC_BYTEORDER_H_ |
#include <libarch/byteorder.h> |
#include <stdint.h> |
#if !(defined(__BE__) ^ defined(__LE__)) |
#error The architecture must be either big-endian or little-endian. |
#if !(defined(ARCH_IS_BIG_ENDIAN) ^ defined(ARCH_IS_LITTLE_ENDIAN)) |
#error The architecture must be either big-endian or little-endian. |
#endif |
#ifdef __BE__ |
#ifdef ARCH_IS_BIG_ENDIAN |
#define uint16_t_le2host(n) (uint16_t_byteorder_swap(n)) |
#define uint32_t_le2host(n) (uint32_t_byteorder_swap(n)) |
#define uint64_t_le2host(n) (uint64_t_byteorder_swap(n)) |
#define uint16_t_le2host(n) uint16_t_byteorder_swap(n) |
#define uint32_t_le2host(n) uint32_t_byteorder_swap(n) |
#define uint64_t_le2host(n) uint64_t_byteorder_swap(n) |
#define uint16_t_be2host(n) (n) |
#define uint32_t_be2host(n) (n) |
#define uint64_t_be2host(n) (n) |
#define uint16_t_be2host(n) (n) |
#define uint32_t_be2host(n) (n) |
#define uint64_t_be2host(n) (n) |
#define host2uint16_t_le(n) (uint16_t_byteorder_swap(n)) |
#define host2uint32_t_le(n) (uint32_t_byteorder_swap(n)) |
#define host2uint64_t_le(n) (uint64_t_byteorder_swap(n)) |
#define host2uint16_t_be(n) (n) |
#define host2uint32_t_be(n) (n) |
#define host2uint64_t_be(n) (n) |
#else |
#define uint16_t_le2host(n) (n) |
#define uint32_t_le2host(n) (n) |
#define uint64_t_le2host(n) (n) |
#define uint16_t_le2host(n) (n) |
#define uint32_t_le2host(n) (n) |
#define uint64_t_le2host(n) (n) |
#define uint16_t_be2host(n) (uint16_t_byteorder_swap(n)) |
#define uint32_t_be2host(n) (uint32_t_byteorder_swap(n)) |
#define uint64_t_be2host(n) (uint64_t_byteorder_swap(n)) |
#define uint16_t_be2host(n) uint16_t_byteorder_swap(n) |
#define uint32_t_be2host(n) uint32_t_byteorder_swap(n) |
#define uint64_t_be2host(n) uint64_t_byteorder_swap(n) |
#define host2uint16_t_le(n) (n) |
#define host2uint32_t_le(n) (n) |
#define host2uint64_t_le(n) (n) |
#define host2uint16_t_be(n) (uint16_t_byteorder_swap(n)) |
#define host2uint32_t_be(n) (uint32_t_byteorder_swap(n)) |
#define host2uint64_t_be(n) (uint64_t_byteorder_swap(n)) |
#endif |
static inline uint64_t uint64_t_byteorder_swap(uint64_t n) |
/branches/arm/uspace/lib/libc/include/unistd.h |
---|
39,32 → 39,27 |
#include <libarch/config.h> |
#ifndef NULL |
#define NULL 0 |
#define NULL 0 |
#endif |
#define getpagesize() (PAGE_SIZE) |
#define getpagesize() (PAGE_SIZE) |
#ifndef SEEK_SET |
#define SEEK_SET 0 |
#define SEEK_CUR 1 |
#define SEEK_END 2 |
#endif |
#define SEEK_SET 0 |
#define SEEK_CUR 1 |
#define SEEK_END 2 |
extern ssize_t write(int, const void *, size_t); |
extern ssize_t read(int, void *, size_t); |
extern off_t lseek(int, off_t, int); |
extern int ftruncate(int, off_t); |
extern int close(int); |
extern int fsync(int); |
extern int unlink(const char *); |
extern char *getcwd(char *buf, size_t); |
extern int rmdir(const char *); |
extern int chdir(const char *); |
extern char *getcwd(char *buf, size_t); |
extern void _exit(int status) __attribute__ ((noreturn)); |
extern void _exit(int status); |
extern void *sbrk(ssize_t incr); |
extern int usleep(unsigned long usec); |
extern unsigned int sleep(unsigned int seconds); |
/branches/arm/uspace/lib/libc/include/errno.h |
---|
36,25 → 36,17 |
#define LIBC_ERRNO_H_ |
#include <kernel/errno.h> |
#include <fibril.h> |
extern int _errno; |
#define ENAMETOOLONG (-256) |
#define EISDIR (-257) |
#define ENOTDIR (-258) |
#define ENOSPC (-259) |
#define EEXIST (-260) |
#define ENOTEMPTY (-261) |
#define EBADF (-262) |
#define ERANGE (-263) |
#define EXDEV (-264) |
#define errno _errno |
#define EMFILE (-17) |
#define ENAMETOOLONG (-256) |
#define EISDIR (-257) |
#define ENOTDIR (-258) |
#define ENOSPC (-259) |
#define EEXIST (-260) |
#define ENOTEMPTY (-261) |
#define EBADF (-262) |
#define ERANGE (-263) |
#define EXDEV (-264) |
#define EIO (-265) |
#define EMLINK (-266) |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/fcntl.h |
---|
35,13 → 35,13 |
#ifndef LIBC_FCNTL_H_ |
#define LIBC_FCNTL_H_ |
#define O_CREAT 1 |
#define O_EXCL 2 |
#define O_TRUNC 4 |
#define O_APPEND 8 |
#define O_RDONLY 16 |
#define O_RDWR 32 |
#define O_WRONLY 64 |
#define O_CREAT 1 |
#define O_EXCL 2 |
#define O_TRUNC 4 |
#define O_APPEND 8 |
#define O_RDONLY 16 |
#define O_RDWR 32 |
#define O_WRONLY 64 |
extern int open(const char *, int, ...); |
/branches/arm/uspace/lib/libc/include/sys/stat.h |
---|
36,26 → 36,7 |
#define LIBC_SYS_STAT_H_ |
#include <sys/types.h> |
#include <bool.h> |
#include <ipc/vfs.h> |
#include <ipc/devmap.h> |
struct stat { |
fs_handle_t fs_handle; |
dev_handle_t dev_handle; |
fs_index_t index; |
unsigned lnkcnt; |
bool is_file; |
off_t size; |
union { |
struct { |
dev_handle_t device; |
} devfs_stat; |
}; |
}; |
extern int fstat(int, struct stat *); |
extern int stat(const char *, struct stat *); |
extern int mkdir(const char *, mode_t); |
#endif |
/branches/arm/uspace/lib/libc/include/sys/types.h |
---|
37,15 → 37,11 |
#include <libarch/types.h> |
typedef unsigned long size_t; |
typedef signed long ssize_t; |
typedef long off_t; |
typedef int mode_t; |
typedef int32_t wchar_t; |
typedef volatile uint8_t ioport8_t; |
typedef volatile uint16_t ioport16_t; |
typedef volatile uint32_t ioport32_t; |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/dirent.h |
---|
35,7 → 35,7 |
#ifndef LIBC_DIRENT_H_ |
#define LIBC_DIRENT_H_ |
#define NAME_MAX 256 |
#define NAME_MAX 256 |
struct dirent { |
char d_name[NAME_MAX + 1]; |
46,6 → 46,7 |
struct dirent res; |
} DIR; |
extern DIR *opendir(const char *); |
extern struct dirent *readdir(DIR *); |
extern void rewinddir(DIR *); |
/branches/arm/uspace/lib/libc/include/async.h |
---|
44,21 → 44,17 |
typedef ipc_callid_t aid_t; |
typedef void (*async_client_conn_t)(ipc_callid_t callid, ipc_call_t *call); |
extern atomic_t async_futex; |
static inline void async_manager(void) |
{ |
fibril_switch(FIBRIL_TO_MANAGER); |
} |
extern int __async_init(void); |
extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs); |
ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs); |
static inline ipc_callid_t async_get_call(ipc_call_t *data) |
{ |
return async_get_call_timeout(data, 0); |
} |
static inline void async_manager(void) |
{ |
fibril_switch(FIBRIL_TO_MANAGER); |
} |
/* |
* User-friendly wrappers for async_send_fast() and async_send_slow(). The |
* macros are in the form async_send_m(), where m denotes the number of payload |
67,20 → 63,20 |
*/ |
#define async_send_0(phoneid, method, dataptr) \ |
async_send_fast((phoneid), (method), 0, 0, 0, 0, (dataptr)) |
async_send_fast((phoneid), (method), 0, 0, 0, 0, (dataptr)) |
#define async_send_1(phoneid, method, arg1, dataptr) \ |
async_send_fast((phoneid), (method), (arg1), 0, 0, 0, (dataptr)) |
async_send_fast((phoneid), (method), (arg1), 0, 0, 0, (dataptr)) |
#define async_send_2(phoneid, method, arg1, arg2, dataptr) \ |
async_send_fast((phoneid), (method), (arg1), (arg2), 0, 0, (dataptr)) |
async_send_fast((phoneid), (method), (arg1), (arg2), 0, 0, (dataptr)) |
#define async_send_3(phoneid, method, arg1, arg2, arg3, dataptr) \ |
async_send_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (dataptr)) |
async_send_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (dataptr)) |
#define async_send_4(phoneid, method, arg1, arg2, arg3, arg4, dataptr) \ |
async_send_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(dataptr)) |
async_send_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(dataptr)) |
#define async_send_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, dataptr) \ |
async_send_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), (dataptr)) |
async_send_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), (dataptr)) |
extern aid_t async_send_fast(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr); |
extern aid_t async_send_slow(int phoneid, ipcarg_t method, ipcarg_t arg1, |
90,11 → 86,12 |
extern int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, |
suseconds_t timeout); |
extern fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid, |
ipc_call_t *call, void (*cthread)(ipc_callid_t, ipc_call_t *)); |
extern void async_usleep(suseconds_t timeout); |
extern void async_create_manager(void); |
extern void async_destroy_manager(void); |
fid_t async_new_connection(ipcarg_t in_phone_hash,ipc_callid_t callid, |
ipc_call_t *call, void (*cthread)(ipc_callid_t,ipc_call_t *)); |
void async_usleep(suseconds_t timeout); |
void async_create_manager(void); |
void async_destroy_manager(void); |
int _async_init(void); |
extern void async_set_client_connection(async_client_conn_t conn); |
extern void async_set_interrupt_received(async_client_conn_t conn); |
101,114 → 98,114 |
/* Wrappers for simple communication */ |
#define async_msg_0(phone, method) \ |
ipc_call_async_0((phone), (method), NULL, NULL, true) |
ipc_call_async_0((phone), (method), NULL, NULL, !in_interrupt_handler()) |
#define async_msg_1(phone, method, arg1) \ |
ipc_call_async_1((phone), (method), (arg1), NULL, NULL, \ |
true) |
ipc_call_async_1((phone), (method), (arg1), NULL, NULL, \ |
!in_interrupt_handler()) |
#define async_msg_2(phone, method, arg1, arg2) \ |
ipc_call_async_2((phone), (method), (arg1), (arg2), NULL, NULL, \ |
true) |
ipc_call_async_2((phone), (method), (arg1), (arg2), NULL, NULL, \ |
!in_interrupt_handler()) |
#define async_msg_3(phone, method, arg1, arg2, arg3) \ |
ipc_call_async_3((phone), (method), (arg1), (arg2), (arg3), NULL, NULL, \ |
true) |
ipc_call_async_3((phone), (method), (arg1), (arg2), (arg3), NULL, NULL, \ |
!in_interrupt_handler()) |
#define async_msg_4(phone, method, arg1, arg2, arg3, arg4) \ |
ipc_call_async_4((phone), (method), (arg1), (arg2), (arg3), (arg4), NULL, \ |
NULL, true) |
ipc_call_async_4((phone), (method), (arg1), (arg2), (arg3), (arg4), NULL, \ |
NULL, !in_interrupt_handler()) |
#define async_msg_5(phone, method, arg1, arg2, arg3, arg4, arg5) \ |
ipc_call_async_5((phone), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), NULL, NULL, true) |
ipc_call_async_5((phone), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), NULL, NULL, !in_interrupt_handler()) |
/* |
* User-friendly wrappers for async_req_fast() and async_req_slow(). The macros |
* are in the form async_req_m_n(), where m is the number of payload arguments |
* and n is the number of return arguments. The macros decide between the fast |
* and n is the number of return arguments. The macros decidce between the fast |
* and slow verion based on m. |
*/ |
#define async_req_0_0(phoneid, method) \ |
async_req_fast((phoneid), (method), 0, 0, 0, 0, NULL, NULL, NULL, NULL, \ |
NULL) |
async_req_fast((phoneid), (method), 0, 0, 0, 0, NULL, NULL, NULL, NULL, \ |
NULL) |
#define async_req_0_1(phoneid, method, r1) \ |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), NULL, NULL, NULL, \ |
NULL) |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), NULL, NULL, NULL, \ |
NULL) |
#define async_req_0_2(phoneid, method, r1, r2) \ |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), NULL, NULL, \ |
NULL) |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), NULL, NULL, \ |
NULL) |
#define async_req_0_3(phoneid, method, r1, r2, r3) \ |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), NULL, \ |
NULL) |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), NULL, \ |
NULL) |
#define async_req_0_4(phoneid, method, r1, r2, r3, r4) \ |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \ |
NULL) |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \ |
NULL) |
#define async_req_0_5(phoneid, method, r1, r2, r3, r4, r5) \ |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \ |
(r5)) |
async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \ |
(r5)) |
#define async_req_1_0(phoneid, method, arg1) \ |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, NULL, NULL, NULL, \ |
NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, NULL, NULL, NULL, \ |
NULL, NULL) |
#define async_req_1_1(phoneid, method, arg1, rc1) \ |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), NULL, NULL, \ |
NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), NULL, NULL, \ |
NULL, NULL) |
#define async_req_1_2(phoneid, method, arg1, rc1, rc2) \ |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), NULL, \ |
NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), NULL, \ |
NULL, NULL) |
#define async_req_1_3(phoneid, method, arg1, rc1, rc2, rc3) \ |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \ |
NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \ |
NULL, NULL) |
#define async_req_1_4(phoneid, method, arg1, rc1, rc2, rc3, rc4) \ |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \ |
(rc4), NULL) |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \ |
(rc4), NULL) |
#define async_req_1_5(phoneid, method, arg1, rc1, rc2, rc3, rc4, rc5) \ |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \ |
(rc4), (rc5)) |
async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \ |
(rc4), (rc5)) |
#define async_req_2_0(phoneid, method, arg1, arg2) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL, NULL, \ |
NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL, NULL, \ |
NULL, NULL, NULL) |
#define async_req_2_1(phoneid, method, arg1, arg2, rc1) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), NULL, \ |
NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), NULL, \ |
NULL, NULL, NULL) |
#define async_req_2_2(phoneid, method, arg1, arg2, rc1, rc2) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \ |
NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \ |
NULL, NULL, NULL) |
#define async_req_2_3(phoneid, method, arg1, arg2, rc1, rc2, rc3) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \ |
(rc3), NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \ |
(rc3), NULL, NULL) |
#define async_req_2_4(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \ |
(rc3), (rc4), NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \ |
(rc3), (rc4), NULL) |
#define async_req_2_5(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4, rc5) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \ |
(rc3), (rc4), (rc5)) |
async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \ |
(rc3), (rc4), (rc5)) |
#define async_req_3_0(phoneid, method, arg1, arg2, arg3) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, NULL, NULL, \ |
NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, NULL, NULL, \ |
NULL, NULL, NULL) |
#define async_req_3_1(phoneid, method, arg1, arg2, arg3, rc1) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
NULL, NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
NULL, NULL, NULL, NULL) |
#define async_req_3_2(phoneid, method, arg1, arg2, arg3, rc1, rc2) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
(rc2), NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
(rc2), NULL, NULL, NULL) |
#define async_req_3_3(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
(rc2), (rc3), NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
(rc2), (rc3), NULL, NULL) |
#define async_req_3_4(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
(rc2), (rc3), (rc4), NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
(rc2), (rc3), (rc4), NULL) |
#define async_req_3_5(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4, \ |
rc5) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \ |
(rc2), (rc3), (rc4), (rc5)) |
#define async_req_4_0(phoneid, method, arg1, arg2, arg3, arg4) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), NULL, \ |
NULL, NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), NULL, \ |
NULL, NULL, NULL, NULL) |
#define async_req_4_1(phoneid, method, arg1, arg2, arg3, arg4, rc1) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \ |
NULL, NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \ |
NULL, NULL, NULL, NULL) |
#define async_req_4_2(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \ |
(rc2), NULL, NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \ |
(rc2), NULL, NULL, NULL) |
#define async_req_4_3(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \ |
(rc2), (rc3), NULL, NULL) |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \ |
(rc2), (rc3), NULL, NULL) |
#define async_req_4_4(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \ |
rc4) \ |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
218,14 → 215,14 |
async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(rc1), (rc2), (rc3), (rc4), (rc5)) |
#define async_req_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \ |
async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), NULL, NULL, NULL, NULL, NULL) |
async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), NULL, NULL, NULL, NULL, NULL) |
#define async_req_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1) \ |
async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), (rc1), NULL, NULL, NULL, NULL) |
async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), (rc1), NULL, NULL, NULL, NULL) |
#define async_req_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2) \ |
async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), (rc1), (rc2), NULL, NULL, NULL) |
async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
(arg5), (rc1), (rc2), NULL, NULL, NULL) |
#define async_req_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \ |
rc3) \ |
async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ |
256,6 → 253,10 |
fibril_dec_sercount(); |
} |
extern bool in_interrupt_handler(void); |
extern atomic_t async_futex; |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/syscall.h |
---|
32,28 → 32,15 |
/** |
* @file |
* @brief Syscall function declaration for architectures that don't |
* inline syscalls or architectures that handle syscalls |
* according to the number of arguments. |
* inline syscalls. |
*/ |
#ifndef LIBC_SYSCALL_H_ |
#define LIBC_SYSCALL_H_ |
#ifndef LIBARCH_SYSCALL_GENERIC |
#error "You can't include this file directly." |
#endif |
#include <sys/types.h> |
#include <kernel/syscall/syscall.h> |
#define __syscall0 __syscall |
#define __syscall1 __syscall |
#define __syscall2 __syscall |
#define __syscall3 __syscall |
#define __syscall4 __syscall |
#define __syscall5 __syscall |
#define __syscall6 __syscall |
extern sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, |
const sysarg_t p3, const sysarg_t p4, const sysarg_t p5, const sysarg_t p6, |
const syscall_t id); |
/branches/arm/uspace/lib/libc/include/thread.h |
---|
45,7 → 45,7 |
extern void __thread_main(uspace_arg_t *); |
extern int thread_create(void (*)(void *), void *, char *, thread_id_t *); |
extern void thread_exit(int) __attribute__ ((noreturn)); |
extern void thread_exit(int); |
extern void thread_detach(thread_id_t); |
extern int thread_join(thread_id_t); |
extern thread_id_t thread_get_id(void); |
/branches/arm/uspace/lib/libc/include/fibril.h |
---|
36,18 → 36,17 |
#define LIBC_FIBRIL_H_ |
#include <libarch/fibril.h> |
#include <adt/list.h> |
#include <libadt/list.h> |
#include <libarch/tls.h> |
#ifndef context_set |
#define context_set(c, _pc, stack, size, ptls) \ |
(c)->pc = (sysarg_t) (_pc); \ |
(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ |
(c)->tls = (sysarg_t) (ptls); |
#define context_set(c, _pc, stack, size, ptls) \ |
(c)->pc = (sysarg_t) (_pc); \ |
(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ |
(c)->tls = (sysarg_t) (ptls); |
#endif /* context_set */ |
#define FIBRIL_SERIALIZED 1 |
#define FIBRIL_WRITER 2 |
#define FIBRIL_SERIALIZED 1 |
typedef enum { |
FIBRIL_PREEMPT, |
72,10 → 71,7 |
}; |
typedef struct fibril fibril_t; |
/** Fibril-local variable specifier */ |
#define fibril_local __thread |
extern int context_save(context_t *c) __attribute__ ((returns_twice)); |
extern int context_save(context_t *c); |
extern void context_restore(context_t *c) __attribute__ ((noreturn)); |
extern fid_t fibril_create(int (*func)(void *), void *arg); |
/branches/arm/uspace/lib/libc/include/bitops.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup generic |
* @{ |
*/ |
/** @file |
42,10 → 42,10 |
* |
* If number is zero, it returns 0 |
*/ |
static inline unsigned int fnzb32(uint32_t arg) |
static inline int fnzb32(uint32_t arg) |
{ |
unsigned int n = 0; |
int n = 0; |
if (arg >> 16) { |
arg >>= 16; |
n += 16; |
74,22 → 74,19 |
return n; |
} |
static inline unsigned int fnzb64(uint64_t arg) |
static inline int fnzb64(uint64_t arg) |
{ |
unsigned int n = 0; |
int n = 0; |
if (arg >> 32) { |
arg >>= 32; |
n += 32; |
} |
return (n + fnzb32((uint32_t) arg)); |
return n + fnzb32((uint32_t) arg); |
} |
static inline unsigned int fnzb(size_t arg) |
{ |
return fnzb64(arg); |
} |
#define fnzb(x) fnzb32(x) |
#endif |
/branches/arm/uspace/lib/libc/include/align.h |
---|
35,28 → 35,21 |
#ifndef LIBC_ALIGN_H_ |
#define LIBC_ALIGN_H_ |
/** Align to the nearest lower address which is a power of two. |
/** Align to the nearest lower address. |
* |
* @param s Address or size to be aligned. |
* @param a Size of alignment, must be power of 2. |
* @param s Address or size to be aligned. |
* @param a Size of alignment, must be power of 2. |
*/ |
#define ALIGN_DOWN(s, a) ((s) & ~((a) - 1)) |
/** Align to the nearest higher address which is a power of two. |
/** Align to the nearest higher address. |
* |
* @param s Address or size to be aligned. |
* @param a Size of alignment, must be power of 2. |
* @param s Address or size to be aligned. |
* @param a Size of alignment, must be power of 2. |
*/ |
#define ALIGN_UP(s, a) ((long)((s) + ((a) - 1)) & ~((long) (a) - 1)) |
/** Round up to the nearest higher boundary. |
* |
* @param n Number to be aligned. |
* @param b Boundary, arbitrary unsigned number. |
*/ |
#define ROUND_UP(n, b) (((n) / (b) + ((n) % (b) != 0)) * (b)) |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/include/ddi.h |
---|
37,11 → 37,9 |
#include <task.h> |
extern int device_assign_devno(void); |
extern int physmem_map(void *, void *, unsigned long, int); |
extern int iospace_enable(task_id_t, void *, unsigned long); |
extern int preemption_control(int); |
extern int pio_enable(void *, size_t, void **); |
extern int physmem_map(void *pf, void *vp, unsigned long pages, int flags); |
extern int iospace_enable(task_id_t id, void *ioaddr, unsigned long size); |
extern int preemption_control(int enable); |
#endif |
/branches/arm/uspace/lib/libc/include/stdlib.h |
---|
38,10 → 38,10 |
#include <unistd.h> |
#include <malloc.h> |
#define abort() _exit(1) |
#define exit(status) _exit((status)) |
#define abort() _exit(1) |
#define exit(status) _exit((status)) |
#define RAND_MAX 714025 |
#define RAND_MAX 714025 |
extern long int random(void); |
extern void srandom(unsigned int seed); |
50,7 → 50,6 |
{ |
return random(); |
} |
static inline void srand(unsigned int seed) |
{ |
srandom(seed); |
/branches/arm/uspace/lib/libc/include/malloc.h |
---|
1,51 → 1,537 |
/* |
* Copyright (c) 2009 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
Default header file for malloc-2.8.x, written by Doug Lea |
and released to the public domain, as explained at |
http://creativecommons.org/licenses/publicdomain. |
last update: Mon Aug 15 08:55:52 2005 Doug Lea (dl at gee) |
/** @addtogroup libc |
* @{ |
This header is for ANSI C/C++ only. You can set any of |
the following #defines before including: |
* If USE_DL_PREFIX is defined, it is assumed that malloc.c |
was also compiled with this option, so all routines |
have names starting with "dl". |
* If HAVE_USR_INCLUDE_MALLOC_H is defined, it is assumed that this |
file will be #included AFTER <malloc.h>. This is needed only if |
your system defines a struct mallinfo that is incompatible with the |
standard one declared here. Otherwise, you can include this file |
INSTEAD of your system system <malloc.h>. At least on ANSI, all |
declarations should be compatible with system versions |
* If MSPACES is defined, declarations for mspace versions are included. |
*/ |
#ifndef MALLOC_280_H |
#define MALLOC_280_H |
#ifdef __cplusplus |
extern "C" { |
#endif |
#include <stddef.h> /* for size_t */ |
#if !ONLY_MSPACES |
#ifndef USE_DL_PREFIX |
#define dlcalloc calloc |
#define dlfree free |
#define dlmalloc malloc |
#define dlmemalign memalign |
#define dlrealloc realloc |
#define dlvalloc valloc |
#define dlpvalloc pvalloc |
#define dlmallinfo mallinfo |
#define dlmallopt mallopt |
#define dlmalloc_trim malloc_trim |
#define dlmalloc_stats malloc_stats |
#define dlmalloc_usable_size malloc_usable_size |
#define dlmalloc_footprint malloc_footprint |
#define dlmalloc_max_footprint malloc_max_footprint |
#define dlindependent_calloc independent_calloc |
#define dlindependent_comalloc independent_comalloc |
#endif /* USE_DL_PREFIX */ |
/* |
malloc(size_t n) |
Returns a pointer to a newly allocated chunk of at least n bytes, or |
null if no space is available, in which case errno is set to ENOMEM |
on ANSI C systems. |
If n is zero, malloc returns a minimum-sized chunk. (The minimum |
size is 16 bytes on most 32bit systems, and 32 bytes on 64bit |
systems.) Note that size_t is an unsigned type, so calls with |
arguments that would be negative if signed are interpreted as |
requests for huge amounts of space, which will often fail. The |
maximum supported value of n differs across systems, but is in all |
cases less than the maximum representable value of a size_t. |
*/ |
void* dlmalloc(size_t); |
/* |
free(void* p) |
Releases the chunk of memory pointed to by p, that had been previously |
allocated using malloc or a related routine such as realloc. |
It has no effect if p is null. If p was not malloced or already |
freed, free(p) will by default cuase the current program to abort. |
*/ |
void dlfree(void*); |
/* |
calloc(size_t n_elements, size_t element_size); |
Returns a pointer to n_elements * element_size bytes, with all locations |
set to zero. |
*/ |
void* dlcalloc(size_t, size_t); |
/* |
realloc(void* p, size_t n) |
Returns a pointer to a chunk of size n that contains the same data |
as does chunk p up to the minimum of (n, p's size) bytes, or null |
if no space is available. |
The returned pointer may or may not be the same as p. The algorithm |
prefers extending p in most cases when possible, otherwise it |
employs the equivalent of a malloc-copy-free sequence. |
If p is null, realloc is equivalent to malloc. |
If space is not available, realloc returns null, errno is set (if on |
ANSI) and p is NOT freed. |
if n is for fewer bytes than already held by p, the newly unused |
space is lopped off and freed if possible. realloc with a size |
argument of zero (re)allocates a minimum-sized chunk. |
The old unix realloc convention of allowing the last-free'd chunk |
to be used as an argument to realloc is not supported. |
*/ |
void* dlrealloc(void*, size_t); |
/* |
memalign(size_t alignment, size_t n); |
Returns a pointer to a newly allocated chunk of n bytes, aligned |
in accord with the alignment argument. |
The alignment argument should be a power of two. If the argument is |
not a power of two, the nearest greater power is used. |
8-byte alignment is guaranteed by normal malloc calls, so don't |
bother calling memalign with an argument of 8 or less. |
Overreliance on memalign is a sure way to fragment space. |
*/ |
void* dlmemalign(size_t, size_t); |
/* |
valloc(size_t n); |
Equivalent to memalign(pagesize, n), where pagesize is the page |
size of the system. If the pagesize is unknown, 4096 is used. |
*/ |
void* dlvalloc(size_t); |
/* |
mallopt(int parameter_number, int parameter_value) |
Sets tunable parameters The format is to provide a |
(parameter-number, parameter-value) pair. mallopt then sets the |
corresponding parameter to the argument value if it can (i.e., so |
long as the value is meaningful), and returns 1 if successful else |
0. SVID/XPG/ANSI defines four standard param numbers for mallopt, |
normally defined in malloc.h. None of these are use in this malloc, |
so setting them has no effect. But this malloc also supports other |
options in mallopt: |
Symbol param # default allowed param values |
M_TRIM_THRESHOLD -1 2*1024*1024 any (-1U disables trimming) |
M_GRANULARITY -2 page size any power of 2 >= page size |
M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support) |
*/ |
int dlmallopt(int, int); |
#define M_TRIM_THRESHOLD (-1) |
#define M_GRANULARITY (-2) |
#define M_MMAP_THRESHOLD (-3) |
/* |
malloc_footprint(); |
Returns the number of bytes obtained from the system. The total |
number of bytes allocated by malloc, realloc etc., is less than this |
value. Unlike mallinfo, this function returns only a precomputed |
result, so can be called frequently to monitor memory consumption. |
Even if locks are otherwise defined, this function does not use them, |
so results might not be up to date. |
*/ |
size_t dlmalloc_footprint(void); |
size_t dlmalloc_max_footprint(void); |
#if !NO_MALLINFO |
/* |
mallinfo() |
Returns (by copy) a struct containing various summary statistics: |
arena: current total non-mmapped bytes allocated from system |
ordblks: the number of free chunks |
smblks: always zero. |
hblks: current number of mmapped regions |
hblkhd: total bytes held in mmapped regions |
usmblks: the maximum total allocated space. This will be greater |
than current total if trimming has occurred. |
fsmblks: always zero |
uordblks: current total allocated space (normal or mmapped) |
fordblks: total free space |
keepcost: the maximum number of bytes that could ideally be released |
back to system via malloc_trim. ("ideally" means that |
it ignores page restrictions etc.) |
Because these fields are ints, but internal bookkeeping may |
be kept as longs, the reported values may wrap around zero and |
thus be inaccurate. |
*/ |
#ifndef HAVE_USR_INCLUDE_MALLOC_H |
#ifndef _MALLOC_H |
#ifndef MALLINFO_FIELD_TYPE |
#define MALLINFO_FIELD_TYPE size_t |
#endif /* MALLINFO_FIELD_TYPE */ |
struct mallinfo { |
MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */ |
MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */ |
MALLINFO_FIELD_TYPE smblks; /* always 0 */ |
MALLINFO_FIELD_TYPE hblks; /* always 0 */ |
MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */ |
MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */ |
MALLINFO_FIELD_TYPE fsmblks; /* always 0 */ |
MALLINFO_FIELD_TYPE uordblks; /* total allocated space */ |
MALLINFO_FIELD_TYPE fordblks; /* total free space */ |
MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */ |
}; |
#endif /* _MALLOC_H */ |
#endif /* HAVE_USR_INCLUDE_MALLOC_H */ |
struct mallinfo dlmallinfo(void); |
#endif /* NO_MALLINFO */ |
/* |
independent_calloc(size_t n_elements, size_t element_size, void* chunks[]); |
independent_calloc is similar to calloc, but instead of returning a |
single cleared space, it returns an array of pointers to n_elements |
independent elements that can hold contents of size elem_size, each |
of which starts out cleared, and can be independently freed, |
realloc'ed etc. The elements are guaranteed to be adjacently |
allocated (this is not guaranteed to occur with multiple callocs or |
mallocs), which may also improve cache locality in some |
applications. |
The "chunks" argument is optional (i.e., may be null, which is |
probably the most typical usage). If it is null, the returned array |
is itself dynamically allocated and should also be freed when it is |
no longer needed. Otherwise, the chunks array must be of at least |
n_elements in length. It is filled in with the pointers to the |
chunks. |
In either case, independent_calloc returns this pointer array, or |
null if the allocation failed. If n_elements is zero and "chunks" |
is null, it returns a chunk representing an array with zero elements |
(which should be freed if not wanted). |
Each element must be individually freed when it is no longer |
needed. If you'd like to instead be able to free all at once, you |
should instead use regular calloc and assign pointers into this |
space to represent elements. (In this case though, you cannot |
independently free elements.) |
independent_calloc simplifies and speeds up implementations of many |
kinds of pools. It may also be useful when constructing large data |
structures that initially have a fixed number of fixed-sized nodes, |
but the number is not known at compile time, and some of the nodes |
may later need to be freed. For example: |
struct Node { int item; struct Node* next; }; |
struct Node* build_list() { |
struct Node** pool; |
int n = read_number_of_nodes_needed(); |
if (n <= 0) return 0; |
pool = (struct Node**)(independent_calloc(n, sizeof(struct Node), 0); |
if (pool == 0) die(); |
// organize into a linked list... |
struct Node* first = pool[0]; |
for (i = 0; i < n-1; ++i) |
pool[i]->next = pool[i+1]; |
free(pool); // Can now free the array (or not, if it is needed later) |
return first; |
} |
*/ |
void** dlindependent_calloc(size_t, size_t, void**); |
/* |
independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]); |
independent_comalloc allocates, all at once, a set of n_elements |
chunks with sizes indicated in the "sizes" array. It returns |
an array of pointers to these elements, each of which can be |
independently freed, realloc'ed etc. The elements are guaranteed to |
be adjacently allocated (this is not guaranteed to occur with |
multiple callocs or mallocs), which may also improve cache locality |
in some applications. |
The "chunks" argument is optional (i.e., may be null). If it is null |
the returned array is itself dynamically allocated and should also |
be freed when it is no longer needed. Otherwise, the chunks array |
must be of at least n_elements in length. It is filled in with the |
pointers to the chunks. |
In either case, independent_comalloc returns this pointer array, or |
null if the allocation failed. If n_elements is zero and chunks is |
null, it returns a chunk representing an array with zero elements |
(which should be freed if not wanted). |
Each element must be individually freed when it is no longer |
needed. If you'd like to instead be able to free all at once, you |
should instead use a single regular malloc, and assign pointers at |
particular offsets in the aggregate space. (In this case though, you |
cannot independently free elements.) |
independent_comallac differs from independent_calloc in that each |
element may have a different size, and also that it does not |
automatically clear elements. |
independent_comalloc can be used to speed up allocation in cases |
where several structs or objects must always be allocated at the |
same time. For example: |
struct Head { ... } |
struct Foot { ... } |
void send_message(char* msg) { |
int msglen = strlen(msg); |
size_t sizes[3] = { sizeof(struct Head), msglen, sizeof(struct Foot) }; |
void* chunks[3]; |
if (independent_comalloc(3, sizes, chunks) == 0) |
die(); |
struct Head* head = (struct Head*)(chunks[0]); |
char* body = (char*)(chunks[1]); |
struct Foot* foot = (struct Foot*)(chunks[2]); |
// ... |
} |
In general though, independent_comalloc is worth using only for |
larger values of n_elements. For small values, you probably won't |
detect enough difference from series of malloc calls to bother. |
Overuse of independent_comalloc can increase overall memory usage, |
since it cannot reuse existing noncontiguous small chunks that |
might be available for some of the elements. |
*/ |
void** dlindependent_comalloc(size_t, size_t*, void**); |
/* |
pvalloc(size_t n); |
Equivalent to valloc(minimum-page-that-holds(n)), that is, |
round up n to nearest pagesize. |
*/ |
/** @file |
*/ |
void* dlpvalloc(size_t); |
#ifndef LIBC_MALLOC_H_ |
#define LIBC_MALLOC_H_ |
/* |
malloc_trim(size_t pad); |
#include <sys/types.h> |
If possible, gives memory back to the system (via negative arguments |
to sbrk) if there is unused memory at the `high' end of the malloc |
pool or in unused MMAP segments. You can call this after freeing |
large blocks of memory to potentially reduce the system-level memory |
requirements of a program. However, it cannot guarantee to reduce |
memory. Under some allocation patterns, some large free blocks of |
memory will be locked between two used chunks, so they cannot be |
given back to the system. |
extern void __heap_init(void); |
extern uintptr_t get_max_heap_addr(void); |
The `pad' argument to malloc_trim represents the amount of free |
trailing space to leave untrimmed. If this argument is zero, only |
the minimum amount of memory to maintain internal data structures |
will be left. Non-zero arguments can be supplied to maintain enough |
trailing space to service future expected allocations without having |
to re-obtain memory from the system. |
extern void *malloc(const size_t size); |
extern void *memalign(const size_t align, const size_t size); |
extern void *realloc(const void *addr, const size_t size); |
extern void free(const void *addr); |
Malloc_trim returns 1 if it actually released any memory, else 0. |
*/ |
int dlmalloc_trim(size_t); |
/* |
malloc_usable_size(void* p); |
Returns the number of bytes you can actually use in |
an allocated chunk, which may be more than you requested (although |
often not) due to alignment and minimum size constraints. |
You can use this many bytes without worrying about |
overwriting other allocated objects. This is not a particularly great |
programming practice. malloc_usable_size can be more useful in |
debugging and assertions, for example: |
p = malloc(n); |
assert(malloc_usable_size(p) >= 256); |
*/ |
size_t dlmalloc_usable_size(void*); |
/* |
malloc_stats(); |
Prints on stderr the amount of space obtained from the system (both |
via sbrk and mmap), the maximum amount (which may be more than |
current if malloc_trim and/or munmap got called), and the current |
number of bytes allocated via malloc (or realloc, etc) but not yet |
freed. Note that this is the number of bytes allocated, not the |
number requested. It will be larger than the number requested |
because of alignment and bookkeeping overhead. Because it includes |
alignment wastage as being in use, this figure may be greater than |
zero even when no user-level chunks are allocated. |
The reported current and maximum system memory can be inaccurate if |
a program makes other calls to system memory allocation functions |
(normally sbrk) outside of malloc. |
malloc_stats prints only the most commonly interesting statistics. |
More information can be obtained by calling mallinfo. |
*/ |
void dlmalloc_stats(void); |
#endif /* !ONLY_MSPACES */ |
#if MSPACES |
/* |
mspace is an opaque type representing an independent |
region of space that supports mspace_malloc, etc. |
*/ |
typedef void* mspace; |
/* |
create_mspace creates and returns a new independent space with the |
given initial capacity, or, if 0, the default granularity size. It |
returns null if there is no system memory available to create the |
space. If argument locked is non-zero, the space uses a separate |
lock to control access. The capacity of the space will grow |
dynamically as needed to service mspace_malloc requests. You can |
control the sizes of incremental increases of this space by |
compiling with a different DEFAULT_GRANULARITY or dynamically |
setting with mallopt(M_GRANULARITY, value). |
*/ |
mspace create_mspace(size_t capacity, int locked); |
/* |
destroy_mspace destroys the given space, and attempts to return all |
of its memory back to the system, returning the total number of |
bytes freed. After destruction, the results of access to all memory |
used by the space become undefined. |
*/ |
size_t destroy_mspace(mspace msp); |
/* |
create_mspace_with_base uses the memory supplied as the initial base |
of a new mspace. Part (less than 128*sizeof(size_t) bytes) of this |
space is used for bookkeeping, so the capacity must be at least this |
large. (Otherwise 0 is returned.) When this initial space is |
exhausted, additional memory will be obtained from the system. |
Destroying this space will deallocate all additionally allocated |
space (if possible) but not the initial base. |
*/ |
mspace create_mspace_with_base(void* base, size_t capacity, int locked); |
/* |
mspace_malloc behaves as malloc, but operates within |
the given space. |
*/ |
void* mspace_malloc(mspace msp, size_t bytes); |
/* |
mspace_free behaves as free, but operates within |
the given space. |
If compiled with FOOTERS==1, mspace_free is not actually needed. |
free may be called instead of mspace_free because freed chunks from |
any space are handled by their originating spaces. |
*/ |
void mspace_free(mspace msp, void* mem); |
/* |
mspace_realloc behaves as realloc, but operates within |
the given space. |
If compiled with FOOTERS==1, mspace_realloc is not actually |
needed. realloc may be called instead of mspace_realloc because |
realloced chunks from any space are handled by their originating |
spaces. |
*/ |
void* mspace_realloc(mspace msp, void* mem, size_t newsize); |
/* |
mspace_calloc behaves as calloc, but operates within |
the given space. |
*/ |
void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size); |
/* |
mspace_memalign behaves as memalign, but operates within |
the given space. |
*/ |
void* mspace_memalign(mspace msp, size_t alignment, size_t bytes); |
/* |
mspace_independent_calloc behaves as independent_calloc, but |
operates within the given space. |
*/ |
void** mspace_independent_calloc(mspace msp, size_t n_elements, |
size_t elem_size, void* chunks[]); |
/* |
mspace_independent_comalloc behaves as independent_comalloc, but |
operates within the given space. |
*/ |
void** mspace_independent_comalloc(mspace msp, size_t n_elements, |
size_t sizes[], void* chunks[]); |
/* |
mspace_footprint() returns the number of bytes obtained from the |
system for this space. |
*/ |
size_t mspace_footprint(mspace msp); |
#if !NO_MALLINFO |
/* |
mspace_mallinfo behaves as mallinfo, but reports properties of |
the given space. |
*/ |
struct mallinfo mspace_mallinfo(mspace msp); |
#endif /* NO_MALLINFO */ |
/* |
mspace_malloc_stats behaves as malloc_stats, but reports |
properties of the given space. |
*/ |
void mspace_malloc_stats(mspace msp); |
/* |
mspace_trim behaves as malloc_trim, but |
operates within the given space. |
*/ |
int mspace_trim(mspace msp, size_t pad); |
/* |
An alias for mallopt. |
*/ |
int mspace_mallopt(int, int); |
#endif /* MSPACES */ |
#ifdef __cplusplus |
}; /* end of extern "C" */ |
#endif |
/** @} |
#endif /* MALLOC_280_H */ |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/mem.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/uspace/lib/libc/generic/malloc.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/devmap.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/adt/hash_table.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/adt/list.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/fibril_sync.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/event.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/errno.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/loader.c |
---|
30,11 → 30,10 |
* @{ |
*/ |
/** @file |
*/ |
*/ |
#include <ipc/ipc.h> |
#include <ipc/loader.h> |
#include <ipc/services.h> |
#include <libc.h> |
#include <task.h> |
#include <string.h> |
47,29 → 46,33 |
/** Connect to a new program loader. |
* |
* Spawns a new program loader task and returns the connection structure. |
* |
* @param name Symbolic name to set on the newly created task. |
* |
* @return Pointer to the loader connection structure (should be |
* deallocated using free() after use). |
* |
* @return Pointer to the loader connection structure (should be |
* de-allocated using free() after use). |
*/ |
int loader_spawn(const char *name) |
loader_t *loader_spawn(void) |
{ |
return __SYSCALL2(SYS_PROGRAM_SPAWN_LOADER, |
(sysarg_t) name, str_size(name)); |
} |
int phone_id, rc; |
loader_t *ldr; |
loader_t *loader_connect(void) |
{ |
int phone_id = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_LOAD, 0, 0); |
if (phone_id < 0) |
/* |
* Ask kernel to spawn a new loader task. |
*/ |
rc = __SYSCALL1(SYS_PROGRAM_SPAWN_LOADER, (sysarg_t) &phone_id); |
if (rc != 0) |
return NULL; |
loader_t *ldr = malloc(sizeof(loader_t)); |
/* |
* Say hello so that the loader knows the incoming connection's |
* phone hash. |
*/ |
rc = async_req_0_0(phone_id, LOADER_HELLO); |
if (rc != EOK) |
return NULL; |
ldr = malloc(sizeof(loader_t)); |
if (ldr == NULL) |
return NULL; |
ldr->phone_id = phone_id; |
return ldr; |
} |
78,26 → 81,27 |
* |
* Retrieves the ID of the new task from the loader. |
* |
* @param ldr Loader connection structure. |
* @param task_id Points to a variable where the ID should be stored. |
* |
* @return Zero on success or negative error code. |
* |
* @param ldr Loader connection structure. |
* @param task_id Points to a variable where the ID should be stored. |
* @return Zero on success or negative error code. |
*/ |
int loader_get_task_id(loader_t *ldr, task_id_t *task_id) |
{ |
ipc_call_t answer; |
aid_t req; |
int rc; |
ipcarg_t retval; |
/* Get task ID. */ |
ipc_call_t answer; |
aid_t req = async_send_0(ldr->phone_id, LOADER_GET_TASKID, &answer); |
int rc = ipc_data_read_start(ldr->phone_id, task_id, sizeof(task_id_t)); |
req = async_send_0(ldr->phone_id, LOADER_GET_TASKID, &answer); |
rc = ipc_data_read_start(ldr->phone_id, task_id, sizeof(task_id_t)); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
return rc; |
} |
ipcarg_t retval; |
async_wait_for(req, &retval); |
return (int) retval; |
return (int)retval; |
} |
/** Set pathname of the program to load. |
106,35 → 110,39 |
* to the current working directory (it will be absolutized before |
* sending to the loader). |
* |
* @param ldr Loader connection structure. |
* @param path Pathname of the program file. |
* |
* @return Zero on success or negative error code. |
* |
* @param ldr Loader connection structure. |
* @param path Pathname of the program file. |
* @return Zero on success or negative error code. |
*/ |
int loader_set_pathname(loader_t *ldr, const char *path) |
{ |
ipc_call_t answer; |
aid_t req; |
int rc; |
ipcarg_t retval; |
char *pa; |
size_t pa_len; |
char *pa = absolutize(path, &pa_len); |
pa = absolutize(path, &pa_len); |
if (!pa) |
return 0; |
/* Send program pathname */ |
ipc_call_t answer; |
aid_t req = async_send_0(ldr->phone_id, LOADER_SET_PATHNAME, &answer); |
int rc = ipc_data_write_start(ldr->phone_id, (void *) pa, pa_len); |
req = async_send_0(ldr->phone_id, LOADER_SET_PATHNAME, &answer); |
rc = ipc_data_write_start(ldr->phone_id, (void *)pa, pa_len); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
return rc; |
} |
free(pa); |
ipcarg_t retval; |
async_wait_for(req, &retval); |
return (int) retval; |
return (int)retval; |
} |
/** Set command-line arguments for the program. |
* |
* Sets the vector of command-line arguments to be passed to the loaded |
141,110 → 149,60 |
* program. By convention, the very first argument is typically the same as |
* the command used to execute the program. |
* |
* @param ldr Loader connection structure. |
* @param argv NULL-terminated array of pointers to arguments. |
* |
* @return Zero on success or negative error code. |
* |
* @param ldr Loader connection structure. |
* @param argv NULL-terminated array of pointers to arguments. |
* @return Zero on success or negative error code. |
*/ |
int loader_set_args(loader_t *ldr, char *const argv[]) |
{ |
/* |
aid_t req; |
ipc_call_t answer; |
ipcarg_t rc; |
char *const *ap; |
char *dp; |
char *arg_buf; |
size_t buffer_size; |
/* |
* Serialize the arguments into a single array. First |
* compute size of the buffer needed. |
*/ |
char *const *ap = argv; |
size_t buffer_size = 0; |
ap = argv; |
buffer_size = 0; |
while (*ap != NULL) { |
buffer_size += str_size(*ap) + 1; |
ap++; |
buffer_size += strlen(*ap) + 1; |
++ap; |
} |
char *arg_buf = malloc(buffer_size); |
if (arg_buf == NULL) |
return ENOMEM; |
arg_buf = malloc(buffer_size); |
if (arg_buf == NULL) return ENOMEM; |
/* Now fill the buffer with null-terminated argument strings */ |
ap = argv; |
char *dp = arg_buf; |
dp = arg_buf; |
while (*ap != NULL) { |
str_cpy(dp, buffer_size - (dp - arg_buf), *ap); |
dp += str_size(*ap) + 1; |
ap++; |
strcpy(dp, *ap); |
dp += strlen(*ap) + 1; |
++ap; |
} |
/* Send serialized arguments to the loader */ |
ipc_call_t answer; |
aid_t req = async_send_0(ldr->phone_id, LOADER_SET_ARGS, &answer); |
ipcarg_t rc = ipc_data_write_start(ldr->phone_id, (void *) arg_buf, buffer_size); |
req = async_send_0(ldr->phone_id, LOADER_SET_ARGS, &answer); |
rc = ipc_data_write_start(ldr->phone_id, (void *)arg_buf, buffer_size); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
return rc; |
} |
async_wait_for(req, &rc); |
if (rc != EOK) |
return rc; |
if (rc != EOK) return rc; |
/* Free temporary buffer */ |
free(arg_buf); |
return EOK; |
} |
/** Set preset files for the program. |
* |
* Sets the vector of preset files to be passed to the loaded |
* program. By convention, the first three files represent stdin, |
* stdout and stderr respectively. |
* |
* @param ldr Loader connection structure. |
* @param files NULL-terminated array of pointers to files. |
* |
* @return Zero on success or negative error code. |
* |
*/ |
int loader_set_files(loader_t *ldr, fdi_node_t *const files[]) |
{ |
/* |
* Serialize the arguments into a single array. First |
* compute size of the buffer needed. |
*/ |
fdi_node_t *const *ap = files; |
size_t count = 0; |
while (*ap != NULL) { |
count++; |
ap++; |
} |
fdi_node_t *files_buf; |
files_buf = (fdi_node_t *) malloc(count * sizeof(fdi_node_t)); |
if (files_buf == NULL) |
return ENOMEM; |
/* Fill the buffer */ |
size_t i; |
for (i = 0; i < count; i++) |
files_buf[i] = *files[i]; |
/* Send serialized files to the loader */ |
ipc_call_t answer; |
aid_t req = async_send_0(ldr->phone_id, LOADER_SET_FILES, &answer); |
ipcarg_t rc = ipc_data_write_start(ldr->phone_id, (void *) files_buf, |
count * sizeof(fdi_node_t)); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
return rc; |
} |
async_wait_for(req, &rc); |
if (rc != EOK) |
return rc; |
/* Free temporary buffer */ |
free(files_buf); |
return EOK; |
} |
253,14 → 211,18 |
* If this function succeeds, the program has been successfully loaded |
* and is ready to be executed. |
* |
* @param ldr Loader connection structure. |
* |
* @return Zero on success or negative error code. |
* |
* @param ldr Loader connection structure. |
* @return Zero on success or negative error code. |
*/ |
int loader_load_program(loader_t *ldr) |
{ |
return (int) async_req_0_0(ldr->phone_id, LOADER_LOAD); |
int rc; |
rc = async_req_0_0(ldr->phone_id, LOADER_LOAD); |
if (rc != EOK) |
return rc; |
return EOK; |
} |
/** Instruct loader to execute the program. |
272,19 → 234,17 |
* After using this function, no further operations must be performed |
* on the loader structure. It should be de-allocated using free(). |
* |
* @param ldr Loader connection structure. |
* |
* @return Zero on success or negative error code. |
* |
* @param ldr Loader connection structure. |
* @return Zero on success or negative error code. |
*/ |
int loader_run(loader_t *ldr) |
{ |
int rc = async_req_0_0(ldr->phone_id, LOADER_RUN); |
int rc; |
rc = async_req_0_0(ldr->phone_id, LOADER_RUN); |
if (rc != EOK) |
return rc; |
ipc_hangup(ldr->phone_id); |
ldr->phone_id = 0; |
return EOK; |
} |
294,10 → 254,8 |
* After using this function, no further operations must be performed |
* on the loader structure. It should be de-allocated using free(). |
* |
* @param ldr Loader connection structure. |
* |
* @return Zero on success or negative error code. |
* |
* @param ldr Loader connection structure. |
* @return Zero on success or negative error code. |
*/ |
void loader_abort(loader_t *ldr) |
{ |
/branches/arm/uspace/lib/libc/generic/task.c |
---|
31,7 → 31,7 |
* @{ |
*/ |
/** @file |
*/ |
*/ |
#include <task.h> |
#include <libc.h> |
38,133 → 38,74 |
#include <stdlib.h> |
#include <errno.h> |
#include <loader/loader.h> |
#include <string.h> |
#include <ipc/ns.h> |
#include <macros.h> |
#include <async.h> |
task_id_t task_get_id(void) |
{ |
task_id_t task_id; |
(void) __SYSCALL1(SYS_TASK_GET_ID, (sysarg_t) &task_id); |
return task_id; |
} |
/** Set the task name. |
* |
* @param name The new name, typically the command used to execute the |
* program. |
* |
* @return Zero on success or negative error code. |
* |
*/ |
int task_set_name(const char *name) |
{ |
return __SYSCALL2(SYS_TASK_SET_NAME, (sysarg_t) name, str_size(name)); |
} |
/** Create a new task by running an executable from the filesystem. |
* |
* This is really just a convenience wrapper over the more complicated |
* loader API. |
* |
* @param path pathname of the binary to execute |
* @param argv command-line arguments |
* |
* @return ID of the newly created task or zero on error. |
* |
* @param path pathname of the binary to execute |
* @param argv command-line arguments |
* @return ID of the newly created task or zero on error. |
*/ |
task_id_t task_spawn(const char *path, char *const args[]) |
task_id_t task_spawn(const char *path, char *const argv[]) |
{ |
/* Connect to a program loader. */ |
loader_t *ldr = loader_connect(); |
loader_t *ldr; |
task_id_t task_id; |
int rc; |
/* Spawn a program loader. */ |
ldr = loader_spawn(); |
if (ldr == NULL) |
return 0; |
/* Get task ID. */ |
task_id_t task_id; |
int rc = loader_get_task_id(ldr, &task_id); |
rc = loader_get_task_id(ldr, &task_id); |
if (rc != EOK) |
goto error; |
/* Send program pathname. */ |
rc = loader_set_pathname(ldr, path); |
if (rc != EOK) |
goto error; |
/* Send arguments. */ |
rc = loader_set_args(ldr, args); |
rc = loader_set_args(ldr, argv); |
if (rc != EOK) |
goto error; |
/* Send default files */ |
fdi_node_t *files[4]; |
fdi_node_t stdin_node; |
fdi_node_t stdout_node; |
fdi_node_t stderr_node; |
if ((stdin != NULL) && (fnode(stdin, &stdin_node) == EOK)) |
files[0] = &stdin_node; |
else |
files[0] = NULL; |
if ((stdout != NULL) && (fnode(stdout, &stdout_node) == EOK)) |
files[1] = &stdout_node; |
else |
files[1] = NULL; |
if ((stderr != NULL) && (fnode(stderr, &stderr_node) == EOK)) |
files[2] = &stderr_node; |
else |
files[2] = NULL; |
files[3] = NULL; |
rc = loader_set_files(ldr, files); |
if (rc != EOK) |
goto error; |
/* Load the program. */ |
rc = loader_load_program(ldr); |
if (rc != EOK) |
goto error; |
/* Run it. */ |
/* Load the program. */ |
rc = loader_run(ldr); |
if (rc != EOK) |
goto error; |
/* Success */ |
free(ldr); |
return task_id; |
/* Error exit */ |
error: |
/* Error exit */ |
loader_abort(ldr); |
free(ldr); |
return 0; |
} |
int task_wait(task_id_t id, task_exit_t *texit, int *retval) |
{ |
ipcarg_t te, rv; |
int rc; |
rc = (int) async_req_2_2(PHONE_NS, NS_TASK_WAIT, LOWER32(id), |
UPPER32(id), &te, &rv); |
*texit = te; |
*retval = rv; |
return rc; |
} |
int task_retval(int val) |
{ |
return (int) async_req_1_0(PHONE_NS, NS_RETVAL, val); |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/vfs/vfs.c |
---|
31,7 → 31,7 |
*/ |
/** @file |
*/ |
#include <vfs/vfs.h> |
#include <vfs/canonify.h> |
#include <stdlib.h> |
38,8 → 38,8 |
#include <unistd.h> |
#include <dirent.h> |
#include <fcntl.h> |
#include <sys/stat.h> |
#include <stdio.h> |
#include <sys/stat.h> |
#include <sys/types.h> |
#include <ipc/ipc.h> |
#include <ipc/services.h> |
48,17 → 48,16 |
#include <futex.h> |
#include <errno.h> |
#include <string.h> |
#include <devmap.h> |
#include <ipc/vfs.h> |
#include <ipc/devmap.h> |
#include "../../srv/vfs/vfs.h" |
static int vfs_phone = -1; |
static futex_t vfs_phone_futex = FUTEX_INITIALIZER; |
static futex_t cwd_futex = FUTEX_INITIALIZER; |
int vfs_phone = -1; |
futex_t vfs_phone_futex = FUTEX_INITIALIZER; |
futex_t cwd_futex = FUTEX_INITIALIZER; |
DIR *cwd_dir = NULL; |
char *cwd_path = NULL; |
size_t cwd_size = 0; |
size_t cwd_len = 0; |
char *absolutize(const char *path, size_t *retlen) |
{ |
66,22 → 65,22 |
char *ncwd_path_nc; |
futex_down(&cwd_futex); |
size_t size = str_size(path); |
size_t len = strlen(path); |
if (*path != '/') { |
if (!cwd_path) { |
futex_up(&cwd_futex); |
return NULL; |
} |
ncwd_path_nc = malloc(cwd_size + 1 + size + 1); |
ncwd_path_nc = malloc(cwd_len + 1 + len + 1); |
if (!ncwd_path_nc) { |
futex_up(&cwd_futex); |
return NULL; |
} |
str_cpy(ncwd_path_nc, cwd_size + 1 + size + 1, cwd_path); |
ncwd_path_nc[cwd_size] = '/'; |
ncwd_path_nc[cwd_size + 1] = '\0'; |
strcpy(ncwd_path_nc, cwd_path); |
ncwd_path_nc[cwd_len] = '/'; |
ncwd_path_nc[cwd_len + 1] = '\0'; |
} else { |
ncwd_path_nc = malloc(size + 1); |
ncwd_path_nc = malloc(len + 1); |
if (!ncwd_path_nc) { |
futex_up(&cwd_futex); |
return NULL; |
88,7 → 87,7 |
} |
ncwd_path_nc[0] = '\0'; |
} |
str_append(ncwd_path_nc, cwd_size + 1 + size + 1, path); |
strcat(ncwd_path_nc, path); |
ncwd_path = canonify(ncwd_path_nc, retlen); |
if (!ncwd_path) { |
futex_up(&cwd_futex); |
100,7 → 99,7 |
* the address in ncwd_path need not be the same as ncwd_path_nc, even |
* though they both point into the same dynamically allocated buffer. |
*/ |
ncwd_path = str_dup(ncwd_path); |
ncwd_path = strdup(ncwd_path); |
free(ncwd_path_nc); |
if (!ncwd_path) { |
futex_up(&cwd_futex); |
110,44 → 109,75 |
return ncwd_path; |
} |
static void vfs_connect(void) |
static int vfs_connect(void) |
{ |
while (vfs_phone < 0) |
vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0); |
if (vfs_phone < 0) |
vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0); |
return vfs_phone; |
} |
int mount(const char *fs_name, const char *mp, const char *dev, |
const char *opts, unsigned int flags) |
static int device_get_handle(char *name, dev_handle_t *handle) |
{ |
int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, |
0); |
if (phone < 0) |
return phone; |
ipc_call_t answer; |
aid_t req = async_send_2(phone, DEVMAP_DEVICE_GET_HANDLE, 0, 0, |
&answer); |
ipcarg_t retval = ipc_data_write_start(phone, name, strlen(name) + 1); |
if (retval != EOK) { |
async_wait_for(req, NULL); |
ipc_hangup(phone); |
return retval; |
} |
async_wait_for(req, &retval); |
if (handle != NULL) |
*handle = -1; |
if (retval == EOK) { |
if (handle != NULL) |
*handle = (dev_handle_t) IPC_GET_ARG1(answer); |
} |
ipc_hangup(phone); |
return retval; |
} |
int mount(const char *fs_name, const char *mp, const char *dev) |
{ |
int res; |
ipcarg_t rc; |
aid_t req; |
dev_handle_t dev_handle; |
res = devmap_device_get_handle(dev, &dev_handle, flags); |
res = device_get_handle(dev, &dev_handle); |
if (res != EOK) |
return res; |
size_t mpa_size; |
char *mpa = absolutize(mp, &mpa_size); |
size_t mpa_len; |
char *mpa = absolutize(mp, &mpa_len); |
if (!mpa) |
return ENOMEM; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_2(vfs_phone, VFS_IN_MOUNT, dev_handle, flags, NULL); |
rc = ipc_data_write_start(vfs_phone, (void *) mpa, mpa_size); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(mpa); |
return (int) rc; |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(mpa); |
return res; |
} |
} |
rc = ipc_data_write_start(vfs_phone, (void *) opts, str_size(opts)); |
req = async_send_1(vfs_phone, VFS_MOUNT, dev_handle, NULL); |
rc = ipc_data_write_start(vfs_phone, (void *)fs_name, strlen(fs_name)); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
155,8 → 185,8 |
free(mpa); |
return (int) rc; |
} |
rc = ipc_data_write_start(vfs_phone, (void *) fs_name, str_size(fs_name)); |
/* Ask VFS whether it likes fs_name. */ |
rc = async_req_0_0(vfs_phone, IPC_M_PING); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
164,9 → 194,7 |
free(mpa); |
return (int) rc; |
} |
/* Ask VFS whether it likes fs_name. */ |
rc = async_req_0_0(vfs_phone, IPC_M_PING); |
rc = ipc_data_write_start(vfs_phone, (void *)mpa, mpa_len); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
174,32 → 202,38 |
free(mpa); |
return (int) rc; |
} |
async_wait_for(req, &rc); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(mpa); |
return (int) rc; |
} |
static int _open(const char *path, int lflag, int oflag, ...) |
{ |
int res; |
ipcarg_t rc; |
ipc_call_t answer; |
aid_t req; |
size_t pa_size; |
char *pa = absolutize(path, &pa_size); |
size_t pa_len; |
char *pa = absolutize(path, &pa_len); |
if (!pa) |
return ENOMEM; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_3(vfs_phone, VFS_IN_OPEN, lflag, oflag, 0, &answer); |
rc = ipc_data_write_start(vfs_phone, pa, pa_size); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
return res; |
} |
} |
req = async_send_3(vfs_phone, VFS_OPEN, lflag, oflag, 0, &answer); |
rc = ipc_data_write_start(vfs_phone, pa, pa_len); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
211,10 → 245,9 |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
if (rc != EOK) |
return (int) rc; |
return (int) IPC_GET_ARG1(answer); |
} |
223,37 → 256,24 |
return _open(path, L_FILE, oflag); |
} |
int open_node(fdi_node_t *node, int oflag) |
int close(int fildes) |
{ |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
ipc_call_t answer; |
aid_t req = async_send_4(vfs_phone, VFS_IN_OPEN_NODE, node->fs_handle, |
node->dev_handle, node->index, oflag, &answer); |
int res; |
ipcarg_t rc; |
async_wait_for(req, &rc); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
if (rc != EOK) |
return (int) rc; |
return (int) IPC_GET_ARG1(answer); |
} |
int close(int fildes) |
{ |
ipcarg_t rc; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
rc = async_req_1_0(vfs_phone, VFS_IN_CLOSE, fildes); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return res; |
} |
} |
rc = async_req_1_0(vfs_phone, VFS_CLOSE, fildes); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
262,6 → 282,7 |
ssize_t read(int fildes, void *buf, size_t nbyte) |
{ |
int res; |
ipcarg_t rc; |
ipc_call_t answer; |
aid_t req; |
268,9 → 289,15 |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_1(vfs_phone, VFS_IN_READ, fildes, &answer); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return res; |
} |
} |
req = async_send_1(vfs_phone, VFS_READ, fildes, &answer); |
rc = ipc_data_read_start(vfs_phone, (void *)buf, nbyte); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
289,6 → 316,7 |
ssize_t write(int fildes, const void *buf, size_t nbyte) |
{ |
int res; |
ipcarg_t rc; |
ipc_call_t answer; |
aid_t req; |
295,9 → 323,15 |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_1(vfs_phone, VFS_IN_WRITE, fildes, &answer); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return res; |
} |
} |
req = async_send_1(vfs_phone, VFS_WRITE, fildes, &answer); |
rc = ipc_data_write_start(vfs_phone, (void *)buf, nbyte); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
314,31 → 348,25 |
return -1; |
} |
int fsync(int fildes) |
{ |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
ipcarg_t rc = async_req_1_0(vfs_phone, VFS_IN_SYNC, fildes); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return (int) rc; |
} |
off_t lseek(int fildes, off_t offset, int whence) |
{ |
int res; |
ipcarg_t rc; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
ipcarg_t newoffs; |
rc = async_req_3_1(vfs_phone, VFS_IN_SEEK, fildes, offset, whence, |
&newoffs); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return res; |
} |
} |
off_t newoffs; |
rc = async_req_3_1(vfs_phone, VFS_SEEK, fildes, offset, whence, |
(ipcarg_t)&newoffs); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
346,86 → 374,30 |
if (rc != EOK) |
return (off_t) -1; |
return (off_t) newoffs; |
return newoffs; |
} |
int ftruncate(int fildes, off_t length) |
{ |
int res; |
ipcarg_t rc; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
rc = async_req_2_0(vfs_phone, VFS_IN_TRUNCATE, fildes, length); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return res; |
} |
} |
rc = async_req_2_0(vfs_phone, VFS_TRUNCATE, fildes, length); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return (int) rc; |
} |
int fstat(int fildes, struct stat *stat) |
{ |
ipcarg_t rc; |
ipc_call_t answer; |
aid_t req; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_1(vfs_phone, VFS_IN_FSTAT, fildes, NULL); |
rc = ipc_data_read_start(vfs_phone, (void *)stat, sizeof(struct stat)); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return (ssize_t) rc; |
} |
async_wait_for(req, &rc); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
return rc; |
} |
int stat(const char *path, struct stat *stat) |
{ |
ipcarg_t rc; |
aid_t req; |
size_t pa_size; |
char *pa = absolutize(path, &pa_size); |
if (!pa) |
return ENOMEM; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_0(vfs_phone, VFS_IN_STAT, NULL); |
rc = ipc_data_write_start(vfs_phone, pa, pa_size); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
return (int) rc; |
} |
rc = ipc_data_read_start(vfs_phone, stat, sizeof(struct stat)); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
return (int) rc; |
} |
async_wait_for(req, &rc); |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
return rc; |
} |
DIR *opendir(const char *dirname) |
{ |
DIR *dirp = malloc(sizeof(DIR)); |
461,20 → 433,28 |
int mkdir(const char *path, mode_t mode) |
{ |
int res; |
ipcarg_t rc; |
aid_t req; |
size_t pa_size; |
char *pa = absolutize(path, &pa_size); |
size_t pa_len; |
char *pa = absolutize(path, &pa_len); |
if (!pa) |
return ENOMEM; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_1(vfs_phone, VFS_IN_MKDIR, mode, NULL); |
rc = ipc_data_write_start(vfs_phone, pa, pa_size); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
return res; |
} |
} |
req = async_send_1(vfs_phone, VFS_MKDIR, mode, NULL); |
rc = ipc_data_write_start(vfs_phone, pa, pa_len); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
486,25 → 466,33 |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
return rc; |
return rc; |
} |
static int _unlink(const char *path, int lflag) |
{ |
int res; |
ipcarg_t rc; |
aid_t req; |
size_t pa_size; |
char *pa = absolutize(path, &pa_size); |
size_t pa_len; |
char *pa = absolutize(path, &pa_len); |
if (!pa) |
return ENOMEM; |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_0(vfs_phone, VFS_IN_UNLINK, NULL); |
rc = ipc_data_write_start(vfs_phone, pa, pa_size); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
return res; |
} |
} |
req = async_send_0(vfs_phone, VFS_UNLINK, NULL); |
rc = ipc_data_write_start(vfs_phone, pa, pa_len); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
516,7 → 504,7 |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(pa); |
return rc; |
return rc; |
} |
int unlink(const char *path) |
531,16 → 519,17 |
int rename(const char *old, const char *new) |
{ |
int res; |
ipcarg_t rc; |
aid_t req; |
size_t olda_size; |
char *olda = absolutize(old, &olda_size); |
size_t olda_len; |
char *olda = absolutize(old, &olda_len); |
if (!olda) |
return ENOMEM; |
size_t newa_size; |
char *newa = absolutize(new, &newa_size); |
size_t newa_len; |
char *newa = absolutize(new, &newa_len); |
if (!newa) { |
free(olda); |
return ENOMEM; |
548,10 → 537,18 |
futex_down(&vfs_phone_futex); |
async_serialize_start(); |
vfs_connect(); |
req = async_send_0(vfs_phone, VFS_IN_RENAME, NULL); |
rc = ipc_data_write_start(vfs_phone, olda, olda_size); |
if (vfs_phone < 0) { |
res = vfs_connect(); |
if (res < 0) { |
async_serialize_end(); |
futex_up(&vfs_phone_futex); |
free(olda); |
free(newa); |
return res; |
} |
} |
req = async_send_0(vfs_phone, VFS_RENAME, NULL); |
rc = ipc_data_write_start(vfs_phone, olda, olda_len); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
560,7 → 557,7 |
free(newa); |
return (int) rc; |
} |
rc = ipc_data_write_start(vfs_phone, newa, newa_size); |
rc = ipc_data_write_start(vfs_phone, newa, newa_len); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
async_serialize_end(); |
579,8 → 576,8 |
int chdir(const char *path) |
{ |
size_t pa_size; |
char *pa = absolutize(path, &pa_size); |
size_t pa_len; |
char *pa = absolutize(path, &pa_len); |
if (!pa) |
return ENOMEM; |
596,11 → 593,11 |
cwd_dir = NULL; |
free(cwd_path); |
cwd_path = NULL; |
cwd_size = 0; |
cwd_len = 0; |
} |
cwd_dir = d; |
cwd_path = pa; |
cwd_size = pa_size; |
cwd_len = pa_len; |
futex_up(&cwd_futex); |
return EOK; |
} |
610,43 → 607,14 |
if (!size) |
return NULL; |
futex_down(&cwd_futex); |
if (size < cwd_size + 1) { |
if (size < cwd_len + 1) { |
futex_up(&cwd_futex); |
return NULL; |
} |
str_cpy(buf, size, cwd_path); |
strcpy(buf, cwd_path); |
futex_up(&cwd_futex); |
return buf; |
} |
int fd_phone(int fildes) |
{ |
struct stat stat; |
int rc; |
rc = fstat(fildes, &stat); |
if (!stat.devfs_stat.device) |
return -1; |
return devmap_device_connect(stat.devfs_stat.device, 0); |
} |
int fd_node(int fildes, fdi_node_t *node) |
{ |
struct stat stat; |
int rc; |
rc = fstat(fildes, &stat); |
if (rc == EOK) { |
node->fs_handle = stat.fs_handle; |
node->dev_handle = stat.dev_handle; |
node->index = stat.index; |
} |
return rc; |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/vfs/canonify.c |
---|
36,7 → 36,6 |
*/ |
#include <stdlib.h> |
#include <vfs/canonify.h> |
/** Token types used for tokenization of path. */ |
typedef enum { |
/branches/arm/uspace/lib/libc/generic/udebug.c |
---|
34,6 → 34,7 |
#include <udebug.h> |
#include <sys/types.h> |
#include <syscall.h> |
#include <ipc/ipc.h> |
#include <async.h> |
/branches/arm/uspace/lib/libc/generic/ipc.c |
---|
43,7 → 43,7 |
#include <libc.h> |
#include <malloc.h> |
#include <errno.h> |
#include <adt/list.h> |
#include <libadt/list.h> |
#include <stdio.h> |
#include <unistd.h> |
#include <futex.h> |
232,7 → 232,7 |
return; |
} |
if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) { |
if (callid == IPC_CALLRET_FATAL) { |
futex_up(&ipc_futex); |
/* Call asynchronous handler with error code */ |
if (call->callback) |
241,7 → 241,7 |
return; |
} |
if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) { |
if (callid == IPC_CALLRET_TEMPORARY) { |
futex_up(&ipc_futex); |
call->u.msg.phoneid = phoneid; |
309,7 → 309,7 |
callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid, method, arg1, |
arg2, arg3, arg4); |
if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) { |
if (callid == IPC_CALLRET_TEMPORARY) { |
if (!call) { |
call = ipc_prepare_async(private, callback); |
if (!call) |
442,7 → 442,7 |
call = list_get_instance(queued_calls.next, async_call_t, list); |
callid = _ipc_call_async(call->u.msg.phoneid, |
&call->u.msg.data); |
if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) { |
if (callid == IPC_CALLRET_TEMPORARY) { |
break; |
} |
list_remove(&call->list); |
451,7 → 451,7 |
if (call->fid) |
fibril_add_ready(call->fid); |
if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) { |
if (callid == IPC_CALLRET_FATAL) { |
if (call->callback) |
call->callback(call->private, ENOENT, NULL); |
free(call); |
598,7 → 598,7 |
ipcarg_t newphid; |
int res; |
res = ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, |
res = ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, |
NULL, NULL, NULL, NULL, &newphid); |
if (res) |
return res; |
605,30 → 605,6 |
return newphid; |
} |
/** Ask through phone for a new connection to some service. |
* |
* If the connection is not available at the moment, the |
* call will block. |
* |
* @param phoneid Phone handle used for contacting the other side. |
* @param arg1 User defined argument. |
* @param arg2 User defined argument. |
* @param arg3 User defined argument. |
* |
* @return New phone handle on success or a negative error code. |
*/ |
int ipc_connect_me_to_blocking(int phoneid, int arg1, int arg2, int arg3) |
{ |
ipcarg_t newphid; |
int res; |
res = ipc_call_sync_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, |
IPC_FLAG_BLOCKING, NULL, NULL, NULL, NULL, &newphid); |
if (res) |
return res; |
return newphid; |
} |
/** Hang up a phone. |
* |
* @param phoneid Handle of the phone to be hung up. |
690,23 → 666,6 |
arg2, mode); |
} |
int ipc_forward_slow(ipc_callid_t callid, int phoneid, int method, |
ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, |
int mode) |
{ |
ipc_call_t data; |
IPC_SET_METHOD(data, method); |
IPC_SET_ARG1(data, arg1); |
IPC_SET_ARG2(data, arg2); |
IPC_SET_ARG3(data, arg3); |
IPC_SET_ARG4(data, arg4); |
IPC_SET_ARG5(data, arg5); |
return __SYSCALL4(SYS_IPC_FORWARD_SLOW, callid, phoneid, (sysarg_t) &data, mode); |
} |
/** Wrapper for making IPC_M_SHARE_IN calls. |
* |
* @param phoneid Phone that will be used to contact the receiving side. |
888,7 → 847,7 |
* |
* @return Zero on success or a value from @ref errno.h on failure. |
*/ |
int ipc_data_read_finalize(ipc_callid_t callid, const void *src, size_t size) |
int ipc_data_read_finalize(ipc_callid_t callid, void *src, size_t size) |
{ |
return ipc_answer_2(callid, EOK, (ipcarg_t) src, (ipcarg_t) size); |
} |
901,7 → 860,7 |
* |
* @return Zero on success or a negative error code from errno.h. |
*/ |
int ipc_data_write_start(int phoneid, const void *src, size_t size) |
int ipc_data_write_start(int phoneid, void *src, size_t size) |
{ |
return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src, |
(ipcarg_t) size); |
/branches/arm/uspace/lib/libc/generic/string.c |
---|
1,6 → 1,7 |
/* |
* Copyright (c) 2005 Martin Decky |
* Copyright (c) 2008 Jiri Svoboda |
* Copyright (C) 1998 by Wes Peters <wes@softweyr.com> |
* Copyright (c) 1988, 1993 The Regents of the University of California. |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
34,665 → 35,180 |
*/ |
#include <string.h> |
#include <stdlib.h> |
#include <assert.h> |
#include <unistd.h> |
#include <ctype.h> |
#include <limits.h> |
#include <ctype.h> |
#include <align.h> |
#include <sys/types.h> |
#include <malloc.h> |
#include <errno.h> |
#include <align.h> |
#include <mem.h> |
#include <string.h> |
/** Byte mask consisting of lowest @n bits (out of 8) */ |
#define LO_MASK_8(n) ((uint8_t) ((1 << (n)) - 1)) |
/* Dummy implementation of mem/ functions */ |
/** Byte mask consisting of lowest @n bits (out of 32) */ |
#define LO_MASK_32(n) ((uint32_t) ((1 << (n)) - 1)) |
/** Byte mask consisting of highest @n bits (out of 8) */ |
#define HI_MASK_8(n) (~LO_MASK_8(8 - (n))) |
/** Number of data bits in a UTF-8 continuation byte */ |
#define CONT_BITS 6 |
/** Decode a single character from a string. |
* |
* Decode a single character from a string of size @a size. Decoding starts |
* at @a offset and this offset is moved to the beginning of the next |
* character. In case of decoding error, offset generally advances at least |
* by one. However, offset is never moved beyond size. |
* |
* @param str String (not necessarily NULL-terminated). |
* @param offset Byte offset in string where to start decoding. |
* @param size Size of the string (in bytes). |
* |
* @return Value of decoded character, U_SPECIAL on decoding error or |
* NULL if attempt to decode beyond @a size. |
* |
*/ |
wchar_t str_decode(const char *str, size_t *offset, size_t size) |
void *memset(void *s, int c, size_t n) |
{ |
if (*offset + 1 > size) |
return 0; |
char *os = s; |
/* First byte read from string */ |
uint8_t b0 = (uint8_t) str[(*offset)++]; |
while (n--) |
*(os++) = c; |
/* Determine code length */ |
unsigned int b0_bits; /* Data bits in first byte */ |
unsigned int cbytes; /* Number of continuation bytes */ |
if ((b0 & 0x80) == 0) { |
/* 0xxxxxxx (Plain ASCII) */ |
b0_bits = 7; |
cbytes = 0; |
} else if ((b0 & 0xe0) == 0xc0) { |
/* 110xxxxx 10xxxxxx */ |
b0_bits = 5; |
cbytes = 1; |
} else if ((b0 & 0xf0) == 0xe0) { |
/* 1110xxxx 10xxxxxx 10xxxxxx */ |
b0_bits = 4; |
cbytes = 2; |
} else if ((b0 & 0xf8) == 0xf0) { |
/* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */ |
b0_bits = 3; |
cbytes = 3; |
} else { |
/* 10xxxxxx -- unexpected continuation byte */ |
return U_SPECIAL; |
} |
if (*offset + cbytes > size) |
return U_SPECIAL; |
wchar_t ch = b0 & LO_MASK_8(b0_bits); |
/* Decode continuation bytes */ |
while (cbytes > 0) { |
uint8_t b = (uint8_t) str[(*offset)++]; |
/* Must be 10xxxxxx */ |
if ((b & 0xc0) != 0x80) |
return U_SPECIAL; |
/* Shift data bits to ch */ |
ch = (ch << CONT_BITS) | (wchar_t) (b & LO_MASK_8(CONT_BITS)); |
cbytes--; |
} |
return ch; |
return s; |
} |
/** Encode a single character to string representation. |
* |
* Encode a single character to string representation (i.e. UTF-8) and store |
* it into a buffer at @a offset. Encoding starts at @a offset and this offset |
* is moved to the position where the next character can be written to. |
* |
* @param ch Input character. |
* @param str Output buffer. |
* @param offset Byte offset where to start writing. |
* @param size Size of the output buffer (in bytes). |
* |
* @return EOK if the character was encoded successfully, EOVERFLOW if there |
* was not enough space in the output buffer or EINVAL if the character |
* code was invalid. |
*/ |
int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t size) |
{ |
if (*offset >= size) |
return EOVERFLOW; |
if (!chr_check(ch)) |
return EINVAL; |
/* Unsigned version of ch (bit operations should only be done |
on unsigned types). */ |
uint32_t cc = (uint32_t) ch; |
/* Determine how many continuation bytes are needed */ |
unsigned int b0_bits; /* Data bits in first byte */ |
unsigned int cbytes; /* Number of continuation bytes */ |
if ((cc & ~LO_MASK_32(7)) == 0) { |
b0_bits = 7; |
cbytes = 0; |
} else if ((cc & ~LO_MASK_32(11)) == 0) { |
b0_bits = 5; |
cbytes = 1; |
} else if ((cc & ~LO_MASK_32(16)) == 0) { |
b0_bits = 4; |
cbytes = 2; |
} else if ((cc & ~LO_MASK_32(21)) == 0) { |
b0_bits = 3; |
cbytes = 3; |
} else { |
/* Codes longer than 21 bits are not supported */ |
return EINVAL; |
} |
/* Check for available space in buffer */ |
if (*offset + cbytes >= size) |
return EOVERFLOW; |
/* Encode continuation bytes */ |
unsigned int i; |
for (i = cbytes; i > 0; i--) { |
str[*offset + i] = 0x80 | (cc & LO_MASK_32(CONT_BITS)); |
cc = cc >> CONT_BITS; |
} |
/* Encode first byte */ |
str[*offset] = (cc & LO_MASK_32(b0_bits)) | HI_MASK_8(8 - b0_bits - 1); |
/* Advance offset */ |
*offset += cbytes + 1; |
return EOK; |
} |
struct along { |
unsigned long n; |
} __attribute__ ((packed)); |
/** Get size of string. |
* |
* Get the number of bytes which are used by the string @a str (excluding the |
* NULL-terminator). |
* |
* @param str String to consider. |
* |
* @return Number of bytes used by the string |
* |
*/ |
size_t str_size(const char *str) |
static void *unaligned_memcpy(void *dst, const void *src, size_t n) |
{ |
size_t size = 0; |
while (*str++ != 0) |
size++; |
return size; |
} |
int i, j; |
struct along *adst = dst; |
const struct along *asrc = src; |
/** Get size of wide string. |
* |
* Get the number of bytes which are used by the wide string @a str (excluding the |
* NULL-terminator). |
* |
* @param str Wide string to consider. |
* |
* @return Number of bytes used by the wide string |
* |
*/ |
size_t wstr_size(const wchar_t *str) |
{ |
return (wstr_length(str) * sizeof(wchar_t)); |
} |
/** Get size of string with length limit. |
* |
* Get the number of bytes which are used by up to @a max_len first |
* characters in the string @a str. If @a max_len is greater than |
* the length of @a str, the entire string is measured (excluding the |
* NULL-terminator). |
* |
* @param str String to consider. |
* @param max_len Maximum number of characters to measure. |
* |
* @return Number of bytes used by the characters. |
* |
*/ |
size_t str_lsize(const char *str, size_t max_len) |
{ |
size_t len = 0; |
size_t offset = 0; |
while (len < max_len) { |
if (str_decode(str, &offset, STR_NO_LIMIT) == 0) |
break; |
for (i = 0; i < n / sizeof(unsigned long); i++) |
adst[i].n = asrc[i].n; |
len++; |
} |
return offset; |
for (j = 0; j < n % sizeof(unsigned long); j++) |
((unsigned char *) (((unsigned long *) dst) + i))[j] = |
((unsigned char *) (((unsigned long *) src) + i))[j]; |
return (char *) dst; |
} |
/** Get size of wide string with length limit. |
* |
* Get the number of bytes which are used by up to @a max_len first |
* wide characters in the wide string @a str. If @a max_len is greater than |
* the length of @a str, the entire wide string is measured (excluding the |
* NULL-terminator). |
* |
* @param str Wide string to consider. |
* @param max_len Maximum number of wide characters to measure. |
* |
* @return Number of bytes used by the wide characters. |
* |
*/ |
size_t wstr_lsize(const wchar_t *str, size_t max_len) |
void *memcpy(void *dst, const void *src, size_t n) |
{ |
return (wstr_nlength(str, max_len * sizeof(wchar_t)) * sizeof(wchar_t)); |
} |
int i, j; |
/** Get number of characters in a string. |
* |
* @param str NULL-terminated string. |
* |
* @return Number of characters in string. |
* |
*/ |
size_t str_length(const char *str) |
{ |
size_t len = 0; |
size_t offset = 0; |
while (str_decode(str, &offset, STR_NO_LIMIT) != 0) |
len++; |
return len; |
} |
if (((long) dst & (sizeof(long) - 1)) || |
((long) src & (sizeof(long) - 1))) |
return unaligned_memcpy(dst, src, n); |
/** Get number of characters in a wide string. |
* |
* @param str NULL-terminated wide string. |
* |
* @return Number of characters in @a str. |
* |
*/ |
size_t wstr_length(const wchar_t *wstr) |
{ |
size_t len = 0; |
while (*wstr++ != 0) |
len++; |
return len; |
for (i = 0; i < n / sizeof(unsigned long); i++) |
((unsigned long *) dst)[i] = ((unsigned long *) src)[i]; |
for (j = 0; j < n % sizeof(unsigned long); j++) |
((unsigned char *) (((unsigned long *) dst) + i))[j] = |
((unsigned char *) (((unsigned long *) src) + i))[j]; |
return (char *) dst; |
} |
/** Get number of characters in a string with size limit. |
* |
* @param str NULL-terminated string. |
* @param size Maximum number of bytes to consider. |
* |
* @return Number of characters in string. |
* |
*/ |
size_t str_nlength(const char *str, size_t size) |
void *memmove(void *dst, const void *src, size_t n) |
{ |
size_t len = 0; |
size_t offset = 0; |
int i, j; |
while (str_decode(str, &offset, size) != 0) |
len++; |
return len; |
} |
if (src > dst) |
return memcpy(dst, src, n); |
/** Get number of characters in a string with size limit. |
* |
* @param str NULL-terminated string. |
* @param size Maximum number of bytes to consider. |
* |
* @return Number of characters in string. |
* |
*/ |
size_t wstr_nlength(const wchar_t *str, size_t size) |
{ |
size_t len = 0; |
size_t limit = ALIGN_DOWN(size, sizeof(wchar_t)); |
size_t offset = 0; |
while ((offset < limit) && (*str++ != 0)) { |
len++; |
offset += sizeof(wchar_t); |
} |
return len; |
} |
for (j = (n % sizeof(unsigned long)) - 1; j >= 0; j--) |
((unsigned char *) ((unsigned long *) dst))[j] = |
((unsigned char *) ((unsigned long *) src))[j]; |
/** Check whether character is plain ASCII. |
* |
* @return True if character is plain ASCII. |
* |
*/ |
bool ascii_check(wchar_t ch) |
{ |
if ((ch >= 0) && (ch <= 127)) |
return true; |
return false; |
for (i = n / sizeof(unsigned long) - 1; i >=0 ; i--) |
((unsigned long *) dst)[i] = ((unsigned long *) src)[i]; |
return (char *) dst; |
} |
/** Check whether character is valid |
/** Compare two memory areas. |
* |
* @return True if character is a valid Unicode code point. |
* |
* @param s1 Pointer to the first area to compare. |
* @param s2 Pointer to the second area to compare. |
* @param len Size of the first area in bytes. Both areas must have |
* the same length. |
* @return If len is 0, return zero. If the areas match, return |
* zero. Otherwise return non-zero. |
*/ |
bool chr_check(wchar_t ch) |
int bcmp(const char *s1, const char *s2, size_t len) |
{ |
if ((ch >= 0) && (ch <= 1114111)) |
return true; |
return false; |
for (; len && *s1++ == *s2++; len--) |
; |
return len; |
} |
/** Compare two NULL terminated strings. |
/** Count the number of characters in the string, not including terminating 0. |
* |
* Do a char-by-char comparison of two NULL-terminated strings. |
* The strings are considered equal iff they consist of the same |
* characters on the minimum of their lengths. |
* |
* @param s1 First string to compare. |
* @param s2 Second string to compare. |
* |
* @return 0 if the strings are equal, -1 if first is smaller, |
* 1 if second smaller. |
* |
* @param str String. |
* @return Number of characters in string. |
*/ |
int str_cmp(const char *s1, const char *s2) |
size_t strlen(const char *str) |
{ |
wchar_t c1 = 0; |
wchar_t c2 = 0; |
size_t off1 = 0; |
size_t off2 = 0; |
size_t counter = 0; |
while (true) { |
c1 = str_decode(s1, &off1, STR_NO_LIMIT); |
c2 = str_decode(s2, &off2, STR_NO_LIMIT); |
while (str[counter] != 0) |
counter++; |
if (c1 < c2) |
return -1; |
if (c1 > c2) |
return 1; |
if (c1 == 0 || c2 == 0) |
break; |
} |
return 0; |
return counter; |
} |
/** Compare two NULL terminated strings with length limit. |
* |
* Do a char-by-char comparison of two NULL-terminated strings. |
* The strings are considered equal iff they consist of the same |
* characters on the minimum of their lengths and the length limit. |
* |
* @param s1 First string to compare. |
* @param s2 Second string to compare. |
* @param max_len Maximum number of characters to consider. |
* |
* @return 0 if the strings are equal, -1 if first is smaller, |
* 1 if second smaller. |
* |
*/ |
int str_lcmp(const char *s1, const char *s2, size_t max_len) |
int strcmp(const char *a, const char *b) |
{ |
wchar_t c1 = 0; |
wchar_t c2 = 0; |
int c = 0; |
size_t off1 = 0; |
size_t off2 = 0; |
while (a[c] && b[c] && (!(a[c] - b[c]))) |
c++; |
size_t len = 0; |
while (true) { |
if (len >= max_len) |
break; |
c1 = str_decode(s1, &off1, STR_NO_LIMIT); |
c2 = str_decode(s2, &off2, STR_NO_LIMIT); |
if (c1 < c2) |
return -1; |
if (c1 > c2) |
return 1; |
if (c1 == 0 || c2 == 0) |
break; |
++len; |
} |
return 0; |
return (a[c] - b[c]); |
} |
/** Copy string. |
* |
* Copy source string @a src to destination buffer @a dest. |
* No more than @a size bytes are written. If the size of the output buffer |
* is at least one byte, the output string will always be well-formed, i.e. |
* null-terminated and containing only complete characters. |
* |
* @param dst Destination buffer. |
* @param count Size of the destination buffer (must be > 0). |
* @param src Source string. |
*/ |
void str_cpy(char *dest, size_t size, const char *src) |
int strncmp(const char *a, const char *b, size_t n) |
{ |
wchar_t ch; |
size_t src_off; |
size_t dest_off; |
size_t c = 0; |
/* There must be space for a null terminator in the buffer. */ |
assert(size > 0); |
while (c < n && a[c] && b[c] && (!(a[c] - b[c]))) |
c++; |
src_off = 0; |
dest_off = 0; |
while ((ch = str_decode(src, &src_off, STR_NO_LIMIT)) != 0) { |
if (chr_encode(ch, dest, &dest_off, size - 1) != EOK) |
break; |
} |
dest[dest_off] = '\0'; |
} |
/** Copy size-limited substring. |
* |
* Copy prefix of string @a src of max. size @a size to destination buffer |
* @a dest. No more than @a size bytes are written. The output string will |
* always be well-formed, i.e. null-terminated and containing only complete |
* characters. |
* |
* No more than @a n bytes are read from the input string, so it does not |
* have to be null-terminated. |
* |
* @param dst Destination buffer. |
* @param count Size of the destination buffer (must be > 0). |
* @param src Source string. |
* @param n Maximum number of bytes to read from @a src. |
*/ |
void str_ncpy(char *dest, size_t size, const char *src, size_t n) |
{ |
wchar_t ch; |
size_t src_off; |
size_t dest_off; |
/* There must be space for a null terminator in the buffer. */ |
assert(size > 0); |
return ( c < n ? a[c] - b[c] : 0); |
src_off = 0; |
dest_off = 0; |
while ((ch = str_decode(src, &src_off, n)) != 0) { |
if (chr_encode(ch, dest, &dest_off, size - 1) != EOK) |
break; |
} |
dest[dest_off] = '\0'; |
} |
/** Append one string to another. |
* |
* Append source string @a src to string in destination buffer @a dest. |
* Size of the destination buffer is @a dest. If the size of the output buffer |
* is at least one byte, the output string will always be well-formed, i.e. |
* null-terminated and containing only complete characters. |
* |
* @param dst Destination buffer. |
* @param count Size of the destination buffer. |
* @param src Source string. |
*/ |
void str_append(char *dest, size_t size, const char *src) |
int stricmp(const char *a, const char *b) |
{ |
size_t dstr_size; |
dstr_size = str_size(dest); |
str_cpy(dest + dstr_size, size - dstr_size, src); |
} |
/** Copy NULL-terminated wide string to string |
* |
* Copy source wide string @a src to destination buffer @a dst. |
* No more than @a size bytes are written. NULL-terminator is always |
* written after the last succesfully copied character (i.e. if the |
* destination buffer is has at least 1 byte, it will be always |
* NULL-terminated). |
* |
* @param src Source wide string. |
* @param dst Destination buffer. |
* @param count Size of the destination buffer. |
* |
*/ |
void wstr_nstr(char *dst, const wchar_t *src, size_t size) |
{ |
/* No space for the NULL-terminator in the buffer */ |
if (size == 0) |
return; |
int c = 0; |
wchar_t ch; |
size_t src_idx = 0; |
size_t dst_off = 0; |
while (a[c] && b[c] && (!(tolower(a[c]) - tolower(b[c])))) |
c++; |
while ((ch = src[src_idx++]) != 0) { |
if (chr_encode(ch, dst, &dst_off, size) != EOK) |
break; |
} |
if (dst_off >= size) |
dst[size - 1] = 0; |
else |
dst[dst_off] = 0; |
return (tolower(a[c]) - tolower(b[c])); |
} |
/** Find first occurence of character in string. |
/** Return pointer to the first occurence of character c in string. |
* |
* @param str String to search. |
* @param ch Character to look for. |
* |
* @return Pointer to character in @a str or NULL if not found. |
* @param str Scanned string. |
* @param c Searched character (taken as one byte). |
* @return Pointer to the matched character or NULL if it is not |
* found in given string. |
*/ |
const char *str_chr(const char *str, wchar_t ch) |
char *strchr(const char *str, int c) |
{ |
wchar_t acc; |
size_t off = 0; |
size_t last = 0; |
while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) { |
if (acc == ch) |
return (str + last); |
last = off; |
while (*str != '\0') { |
if (*str == (char) c) |
return (char *) str; |
str++; |
} |
return NULL; |
} |
/** Find last occurence of character in string. |
/** Return pointer to the last occurence of character c in string. |
* |
* @param str String to search. |
* @param ch Character to look for. |
* |
* @return Pointer to character in @a str or NULL if not found. |
* @param str Scanned string. |
* @param c Searched character (taken as one byte). |
* @return Pointer to the matched character or NULL if it is not |
* found in given string. |
*/ |
const char *str_rchr(const char *str, wchar_t ch) |
char *strrchr(const char *str, int c) |
{ |
wchar_t acc; |
size_t off = 0; |
size_t last = 0; |
const char *res = NULL; |
while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) { |
if (acc == ch) |
res = (str + last); |
last = off; |
char *retval = NULL; |
while (*str != '\0') { |
if (*str == (char) c) |
retval = (char *) str; |
str++; |
} |
return res; |
} |
/** Insert a wide character into a wide string. |
* |
* Insert a wide character into a wide string at position |
* @a pos. The characters after the position are shifted. |
* |
* @param str String to insert to. |
* @param ch Character to insert to. |
* @param pos Character index where to insert. |
@ @param max_pos Characters in the buffer. |
* |
* @return True if the insertion was sucessful, false if the position |
* is out of bounds. |
* |
*/ |
bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos) |
{ |
size_t len = wstr_length(str); |
if ((pos > len) || (pos + 1 > max_pos)) |
return false; |
size_t i; |
for (i = len; i + 1 > pos; i--) |
str[i + 1] = str[i]; |
str[pos] = ch; |
return true; |
return (char *) retval; |
} |
/** Remove a wide character from a wide string. |
* |
* Remove a wide character from a wide string at position |
* @a pos. The characters after the position are shifted. |
* |
* @param str String to remove from. |
* @param pos Character index to remove. |
* |
* @return True if the removal was sucessful, false if the position |
* is out of bounds. |
* |
*/ |
bool wstr_remove(wchar_t *str, size_t pos) |
{ |
size_t len = wstr_length(str); |
if (pos >= len) |
return false; |
size_t i; |
for (i = pos + 1; i <= len; i++) |
str[i - 1] = str[i]; |
return true; |
} |
int stricmp(const char *a, const char *b) |
{ |
int c = 0; |
while (a[c] && b[c] && (!(tolower(a[c]) - tolower(b[c])))) |
c++; |
return (tolower(a[c]) - tolower(b[c])); |
} |
/** Convert string to a number. |
* Core of strtol and strtoul functions. |
* |
842,47 → 358,91 |
return (sgn ? -number : number); |
} |
char *str_dup(const char *src) |
char *strcpy(char *dest, const char *src) |
{ |
size_t size = str_size(src); |
void *dest = malloc(size + 1); |
char *orig = dest; |
while ((*(dest++) = *(src++))) |
; |
return orig; |
} |
if (dest == NULL) |
return (char *) NULL; |
char *strncpy(char *dest, const char *src, size_t n) |
{ |
char *orig = dest; |
while ((*(dest++) = *(src++)) && --n) |
; |
return orig; |
} |
return (char *) memcpy(dest, src, size + 1); |
char *strcat(char *dest, const char *src) |
{ |
char *orig = dest; |
while (*dest++) |
; |
--dest; |
while ((*dest++ = *src++)) |
; |
return orig; |
} |
char *strtok(char *s, const char *delim) |
char * strdup(const char *s1) |
{ |
static char *next; |
size_t len = strlen(s1) + 1; |
void *ret = malloc(len); |
return strtok_r(s, delim, &next); |
if (ret == NULL) |
return (char *) NULL; |
return (char *) memcpy(ret, s1, len); |
} |
char *strtok_r(char *s, const char *delim, char **next) |
/* Ported from FBSD strtok.c 8.1 (Berkeley) 6/4/93 */ |
char * strtok_r(char *s, const char *delim, char **last) |
{ |
char *start, *end; |
char *spanp, *tok; |
int c, sc; |
if (s == NULL) |
s = *next; |
if (s == NULL && (s = *last) == NULL) |
return (NULL); |
/* Skip over leading delimiters. */ |
while (*s && (str_chr(delim, *s) != NULL)) ++s; |
start = s; |
cont: |
c = *s++; |
for (spanp = (char *)delim; (sc = *spanp++) != 0;) { |
if (c == sc) |
goto cont; |
} |
/* Skip over token characters. */ |
while (*s && (str_chr(delim, *s) == NULL)) ++s; |
end = s; |
*next = (*s ? s + 1 : s); |
if (c == 0) { /* no non-delimiter characters */ |
*last = NULL; |
return (NULL); |
} |
if (start == end) { |
return NULL; /* No more tokens. */ |
tok = s - 1; |
for (;;) { |
c = *s++; |
spanp = (char *)delim; |
do { |
if ((sc = *spanp++) == c) { |
if (c == 0) |
s = NULL; |
else |
s[-1] = '\0'; |
*last = s; |
return (tok); |
} |
} while (sc != 0); |
} |
} |
/* Overwrite delimiter with NULL terminator. */ |
*end = '\0'; |
return start; |
/* Ported from FBSD strtok.c 8.1 (Berkeley) 6/4/93 */ |
char * strtok(char *s, const char *delim) |
{ |
static char *last; |
return (strtok_r(s, delim, &last)); |
} |
/** @} |
/branches/arm/uspace/lib/libc/generic/io/klog.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/io/console.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/generic/io/asprintf.c |
---|
36,52 → 36,42 |
#include <stdarg.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include <io/printf_core.h> |
static int asprintf_str_write(const char *str, size_t count, void *unused) |
static int asprintf_prewrite(const char *str, size_t count, void *unused) |
{ |
return str_nlength(str, count); |
return count; |
} |
static int asprintf_wstr_write(const wchar_t *str, size_t count, void *unused) |
{ |
return wstr_nlength(str, count); |
} |
/** Allocate and print to string. |
* |
* @param strp Address of the pointer where to store the address of |
* the newly allocated string. |
* @fmt Format string. |
* @param strp Address of the pointer where to store the address of |
* the newly allocated string. |
* @fmt Format strin. |
* |
* @return Number of characters printed or a negative error code. |
* |
* @return Number of characters printed or a negative error code. |
*/ |
int asprintf(char **strp, const char *fmt, ...) |
{ |
struct printf_spec ps = { |
asprintf_str_write, |
asprintf_wstr_write, |
NULL |
asprintf_prewrite, |
NULL |
}; |
int ret; |
va_list args; |
va_start(args, fmt); |
int ret = printf_core(fmt, &ps, args); |
ret = printf_core(fmt, &ps, args); |
va_end(args); |
if (ret > 0) { |
*strp = malloc(STR_BOUNDS(ret) + 1); |
if (*strp == NULL) |
*strp = malloc(ret + 20); |
if (!*strp) |
return -1; |
va_start(args, fmt); |
vsnprintf(*strp, STR_BOUNDS(ret) + 1, fmt, args); |
va_end(args); |
vsprintf(*strp, fmt, args); |
va_end(args); |
} |
return ret; |
} |
/branches/arm/uspace/lib/libc/generic/io/vsnprintf.c |
---|
36,145 → 36,87 |
#include <stdio.h> |
#include <string.h> |
#include <io/printf_core.h> |
#include <errno.h> |
typedef struct { |
size_t size; /* Total size of the buffer (in bytes) */ |
size_t len; /* Number of already used bytes */ |
char *dst; /* Destination */ |
} vsnprintf_data_t; |
struct vsnprintf_data { |
size_t size; /* total space for string */ |
size_t len; /* count of currently used characters */ |
char *string; /* destination string */ |
}; |
/** Write string to given buffer. |
* Write at most data->size characters including trailing zero. According to C99 |
* has snprintf to return number of characters that would have been written if |
* enough space had been available. Hence the return value is not number of |
* really printed characters but size of input string. Number of really used |
* characters is stored in data->len. |
* |
* Write at most data->size plain characters including trailing zero. |
* According to C99, snprintf() has to return number of characters that |
* would have been written if enough space had been available. Hence |
* the return value is not the number of actually printed characters |
* but size of the input string. |
* |
* @param str Source string to print. |
* @param size Number of plain characters in str. |
* @param data Structure describing destination string, counter |
* of used space and total string size. |
* |
* @return Number of characters to print (not characters actually |
* printed). |
* |
* @param str Source string to print. |
* @param count Size of the source string. |
* @param data Structure with destination string, counter of used space |
* and total string size. |
* @return Number of characters to print (not characters really |
* printed!) |
*/ |
static int vsnprintf_str_write(const char *str, size_t size, vsnprintf_data_t *data) |
static int |
vsnprintf_write(const char *str, size_t count, struct vsnprintf_data *data) |
{ |
size_t left = data->size - data->len; |
size_t i; |
i = data->size - data->len; |
if (i == 0) { |
return count; |
} |
if (left == 0) |
return ((int) size); |
if (left == 1) { |
/* We have only one free byte left in buffer |
* -> store trailing zero |
if (i == 1) { |
/* |
* We have only one free byte left in buffer => write there |
* trailing zero. |
*/ |
data->dst[data->size - 1] = 0; |
data->string[data->size - 1] = 0; |
data->len = data->size; |
return ((int) size); |
return count; |
} |
if (left <= size) { |
/* We do not have enough space for the whole string |
* with the trailing zero => print only a part |
* of string |
if (i <= count) { |
/* |
* We have not enought space for whole string with the trailing |
* zero => print only a part of string. |
*/ |
size_t index = 0; |
while (index < size) { |
wchar_t uc = str_decode(str, &index, size); |
if (chr_encode(uc, data->dst, &data->len, data->size - 1) != EOK) |
break; |
} |
/* Put trailing zero at end, but not count it |
* into data->len so it could be rewritten next time |
*/ |
data->dst[data->len] = 0; |
return ((int) size); |
memcpy((void *)(data->string + data->len), (void *)str, i - 1); |
data->string[data->size - 1] = 0; |
data->len = data->size; |
return count; |
} |
/* Buffer is big enought to print the whole string */ |
memcpy((void *)(data->dst + data->len), (void *) str, size); |
data->len += size; |
/* Put trailing zero at end, but not count it |
* into data->len so it could be rewritten next time |
/* Buffer is big enought to print whole string */ |
memcpy((void *)(data->string + data->len), (void *)str, count); |
data->len += count; |
/* |
* Put trailing zero at end, but not count it into data->len so it could |
* be rewritten next time. |
*/ |
data->dst[data->len] = 0; |
return ((int) size); |
data->string[data->len] = 0; |
return count; |
} |
/** Write wide string to given buffer. |
* |
* Write at most data->size plain characters including trailing zero. |
* According to C99, snprintf() has to return number of characters that |
* would have been written if enough space had been available. Hence |
* the return value is not the number of actually printed characters |
* but size of the input string. |
* |
* @param str Source wide string to print. |
* @param size Number of bytes in str. |
* @param data Structure describing destination string, counter |
* of used space and total string size. |
* |
* @return Number of wide characters to print (not characters actually |
* printed). |
* |
/** Print formatted to the given buffer with limited size. |
* @param str Buffer. |
* @param size Bffer size. |
* @param fmt Format string. |
* \see For more details about format string see printf_core. |
*/ |
static int vsnprintf_wstr_write(const wchar_t *str, size_t size, vsnprintf_data_t *data) |
{ |
size_t index = 0; |
while (index < (size / sizeof(wchar_t))) { |
size_t left = data->size - data->len; |
if (left == 0) |
return ((int) size); |
if (left == 1) { |
/* We have only one free byte left in buffer |
* -> store trailing zero |
*/ |
data->dst[data->size - 1] = 0; |
data->len = data->size; |
return ((int) size); |
} |
if (chr_encode(str[index], data->dst, &data->len, data->size - 1) != EOK) |
break; |
index++; |
} |
/* Put trailing zero at end, but not count it |
* into data->len so it could be rewritten next time |
*/ |
data->dst[data->len] = 0; |
return ((int) size); |
} |
int vsnprintf(char *str, size_t size, const char *fmt, va_list ap) |
{ |
vsnprintf_data_t data = { |
size, |
0, |
str |
}; |
printf_spec_t ps = { |
(int(*) (const char *, size_t, void *)) vsnprintf_str_write, |
(int(*) (const wchar_t *, size_t, void *)) vsnprintf_wstr_write, |
struct vsnprintf_data data = {size, 0, str}; |
struct printf_spec ps = { |
(int(*)(void *, size_t, void *)) vsnprintf_write, |
&data |
}; |
/* Print 0 at end of string - fix the case that nothing will be printed */ |
/* |
* Print 0 at end of string - fix the case that nothing will be printed. |
*/ |
if (size > 0) |
str[0] = 0; |
/branches/arm/uspace/lib/libc/generic/io/sprintf.c |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#include <stdarg.h> |
#include <stdio.h> |
#include <io/printf_core.h> |
/** Print formatted to the given buffer. |
* @param str buffer |
* @param fmt format string |
* \see For more details about format string see printf_core. |
*/ |
int sprintf(char *str, const char *fmt, ...) |
{ |
int ret; |
va_list args; |
va_start(args, fmt); |
ret = vsprintf(str, fmt, args); |
va_end(args); |
return ret; |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/io/printf_core.c |
---|
1,7 → 1,6 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2006 Josef Cejka |
* Copyright (c) 2009 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
28,12 → 27,12 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup generic |
/** @addtogroup libc |
* @{ |
*/ |
/** |
* @file |
* @brief Printing functions. |
* @brief Printing functions. |
*/ |
#include <unistd.h> |
42,30 → 41,20 |
#include <ctype.h> |
#include <string.h> |
/** show prefixes 0x or 0 */ |
#define __PRINTF_FLAG_PREFIX 0x00000001 |
/** signed / unsigned number */ |
#define __PRINTF_FLAG_SIGNED 0x00000002 |
/** print leading zeroes */ |
#define __PRINTF_FLAG_ZEROPADDED 0x00000004 |
/** align to left */ |
#define __PRINTF_FLAG_LEFTALIGNED 0x00000010 |
/** always show + sign */ |
#define __PRINTF_FLAG_SHOWPLUS 0x00000020 |
/** print space instead of plus */ |
#define __PRINTF_FLAG_SPACESIGN 0x00000040 |
/** show big characters */ |
#define __PRINTF_FLAG_BIGCHARS 0x00000080 |
/** number has - sign */ |
#define __PRINTF_FLAG_NEGATIVE 0x00000100 |
#define __PRINTF_FLAG_PREFIX 0x00000001 /**< show prefixes 0x or 0*/ |
#define __PRINTF_FLAG_SIGNED 0x00000002 /**< signed / unsigned number */ |
#define __PRINTF_FLAG_ZEROPADDED 0x00000004 /**< print leading zeroes */ |
#define __PRINTF_FLAG_LEFTALIGNED 0x00000010 /**< align to left */ |
#define __PRINTF_FLAG_SHOWPLUS 0x00000020 /**< always show + sign */ |
#define __PRINTF_FLAG_SPACESIGN 0x00000040 /**< print space instead of plus */ |
#define __PRINTF_FLAG_BIGCHARS 0x00000080 /**< show big characters */ |
#define __PRINTF_FLAG_NEGATIVE 0x00000100 /**< number has - sign */ |
/** |
* Buffer big enough for 64-bit number printed in base 2, sign, prefix and 0 |
* to terminate string... (last one is only for better testing end of buffer by |
* zero-filling subroutine) |
*/ |
#define PRINT_NUMBER_BUFFER_SIZE (64 + 5) |
#define PRINT_NUMBER_BUFFER_SIZE (64+5) /**< Buffer big enought for 64 bit number |
* printed in base 2, sign, prefix and |
* 0 to terminate string.. (last one is only for better testing |
* end of buffer by zero-filling subroutine) |
*/ |
/** Enumeration of possible arguments types. |
*/ |
typedef enum { |
74,296 → 63,171 |
PrintfQualifierInt, |
PrintfQualifierLong, |
PrintfQualifierLongLong, |
PrintfQualifierSizeT, |
PrintfQualifierPointer |
} qualifier_t; |
static char nullstr[] = "(NULL)"; |
static char digits_small[] = "0123456789abcdef"; |
static char digits_big[] = "0123456789ABCDEF"; |
static char invalch = U_SPECIAL; |
static char digits_small[] = "0123456789abcdef"; /**< Small hexadecimal characters */ |
static char digits_big[] = "0123456789ABCDEF"; /**< Big hexadecimal characters */ |
/** Print one or more characters without adding newline. |
* |
* @param buf Buffer holding characters with size of |
* at least size bytes. NULL is not allowed! |
* @param size Size of the buffer in bytes. |
* @param ps Output method and its data. |
* |
* @return Number of characters printed. |
* |
/** Print count chars from buffer without adding newline |
* @param buf Buffer with size at least count bytes - NULL pointer NOT allowed! |
* @param count |
* @param ps output method and its data |
* @return number of printed characters |
*/ |
static int printf_putnchars(const char *buf, size_t size, |
printf_spec_t *ps) |
static int printf_putnchars(const char * buf, size_t count, |
struct printf_spec *ps) |
{ |
return ps->str_write((void *) buf, size, ps->data); |
return ps->write((void *)buf, count, ps->data); |
} |
/** Print one or more wide characters without adding newline. |
* |
* @param buf Buffer holding wide characters with size of |
* at least size bytes. NULL is not allowed! |
* @param size Size of the buffer in bytes. |
* @param ps Output method and its data. |
* |
* @return Number of wide characters printed. |
* |
/** Print string without added newline |
* @param str string to print |
* @param ps write function specification and support data |
* @return number of printed characters |
*/ |
static int printf_wputnchars(const wchar_t *buf, size_t size, |
printf_spec_t *ps) |
static int printf_putstr(const char * str, struct printf_spec *ps) |
{ |
return ps->wstr_write((void *) buf, size, ps->data); |
} |
size_t count; |
if (str == NULL) |
return printf_putnchars("(NULL)", 6, ps); |
/** Print string without adding a newline. |
* |
* @param str String to print. |
* @param ps Write function specification and support data. |
* |
* @return Number of characters printed. |
* |
*/ |
static int printf_putstr(const char *str, printf_spec_t *ps) |
{ |
if (str == NULL) |
return printf_putnchars(nullstr, str_size(nullstr), ps); |
return ps->str_write((void *) str, str_size(str), ps->data); |
count = strlen(str); |
return ps->write((void *) str, count, ps->data); |
} |
/** Print one ASCII character. |
* |
* @param c ASCII character to be printed. |
* @param ps Output method. |
* |
* @return Number of characters printed. |
* |
/** Print one character to output |
* @param c one character |
* @param ps output method |
* @return number of printed characters |
*/ |
static int printf_putchar(const char ch, printf_spec_t *ps) |
static int printf_putchar(int c, struct printf_spec *ps) |
{ |
if (!ascii_check(ch)) |
return ps->str_write((void *) &invalch, 1, ps->data); |
unsigned char ch = c; |
return ps->str_write(&ch, 1, ps->data); |
return ps->write((void *) &ch, 1, ps->data); |
} |
/** Print one wide character. |
* |
* @param c Wide character to be printed. |
* @param ps Output method. |
* |
* @return Number of characters printed. |
* |
/** Print one formatted character |
* @param c character to print |
* @param width |
* @param flags |
* @return number of printed characters |
*/ |
static int printf_putwchar(const wchar_t ch, printf_spec_t *ps) |
static int print_char(char c, int width, uint64_t flags, struct printf_spec *ps) |
{ |
if (!chr_check(ch)) |
return ps->str_write((void *) &invalch, 1, ps->data); |
int counter = 0; |
return ps->wstr_write(&ch, sizeof(wchar_t), ps->data); |
} |
/** Print one formatted ASCII character. |
* |
* @param ch Character to print. |
* @param width Width modifier. |
* @param flags Flags that change the way the character is printed. |
* |
* @return Number of characters printed, negative value on failure. |
* |
*/ |
static int print_char(const char ch, int width, uint32_t flags, printf_spec_t *ps) |
{ |
size_t counter = 0; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
/* |
* One space is consumed by the character itself, hence the |
* predecrement. |
*/ |
while (--width > 0) { |
/* |
* One space is consumed by the character itself, hence |
* the predecrement. |
*/ |
if (printf_putchar(' ', ps) > 0) |
counter++; |
if (printf_putchar(' ', ps) > 0) |
++counter; |
} |
} |
if (printf_putchar(ch, ps) > 0) |
if (printf_putchar(c, ps) > 0) |
counter++; |
/* |
* One space is consumed by the character itself, hence the |
* predecrement. |
*/ |
while (--width > 0) { |
/* |
* One space is consumed by the character itself, hence |
* the predecrement. |
*/ |
if (printf_putchar(' ', ps) > 0) |
counter++; |
++counter; |
} |
return (int) (counter + 1); |
return ++counter; |
} |
/** Print one formatted wide character. |
* |
* @param ch Character to print. |
* @param width Width modifier. |
* @param flags Flags that change the way the character is printed. |
* |
* @return Number of characters printed, negative value on failure. |
* |
/** Print one string |
* @param s string |
* @param width |
* @param precision |
* @param flags |
* @return number of printed characters |
*/ |
static int print_wchar(const wchar_t ch, int width, uint32_t flags, printf_spec_t *ps) |
static int print_string(char *s, int width, int precision, uint64_t flags, |
struct printf_spec *ps) |
{ |
size_t counter = 0; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (--width > 0) { |
/* |
* One space is consumed by the character itself, hence |
* the predecrement. |
*/ |
if (printf_putchar(' ', ps) > 0) |
counter++; |
} |
int counter = 0; |
size_t size; |
int retval; |
if (s == NULL) { |
return printf_putstr("(NULL)", ps); |
} |
if (printf_putwchar(ch, ps) > 0) |
counter++; |
while (--width > 0) { |
/* |
* One space is consumed by the character itself, hence |
* the predecrement. |
*/ |
if (printf_putchar(' ', ps) > 0) |
counter++; |
} |
return (int) (counter + 1); |
} |
size = strlen(s); |
/** Print string. |
* |
* @param str String to be printed. |
* @param width Width modifier. |
* @param precision Precision modifier. |
* @param flags Flags that modify the way the string is printed. |
* |
* @return Number of characters printed, negative value on failure. |
*/ |
static int print_str(char *str, int width, unsigned int precision, |
uint32_t flags, printf_spec_t *ps) |
{ |
if (str == NULL) |
return printf_putstr(nullstr, ps); |
/* print leading spaces */ |
/* Print leading spaces. */ |
size_t strw = str_length(str); |
if (precision == 0) |
precision = strw; |
if (precision == 0) |
precision = size; |
/* Left padding */ |
size_t counter = 0; |
width -= precision; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
} |
/* Part of @a str fitting into the alloted space. */ |
int retval; |
size_t size = str_lsize(str, precision); |
if ((retval = printf_putnchars(str, size, ps)) < 0) |
if ((retval = printf_putnchars(s, size < precision ? size : precision, |
ps)) < 0) { |
return -counter; |
} |
counter += retval; |
counter += retval; |
/* Right padding */ |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
if (printf_putchar(' ', ps) == 1) |
++counter; |
} |
return ((int) counter); |
return counter; |
} |
/** Print wide string. |
* |
* @param str Wide string to be printed. |
* @param width Width modifier. |
* @param precision Precision modifier. |
* @param flags Flags that modify the way the string is printed. |
* |
* @return Number of wide characters printed, negative value on failure. |
*/ |
static int print_wstr(wchar_t *str, int width, unsigned int precision, |
uint32_t flags, printf_spec_t *ps) |
{ |
if (str == NULL) |
return printf_putstr(nullstr, ps); |
/* Print leading spaces. */ |
size_t strw = wstr_length(str); |
if (precision == 0) |
precision = strw; |
/* Left padding */ |
size_t counter = 0; |
width -= precision; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
} |
/* Part of @a wstr fitting into the alloted space. */ |
int retval; |
size_t size = wstr_lsize(str, precision); |
if ((retval = printf_wputnchars(str, size, ps)) < 0) |
return -counter; |
counter += retval; |
/* Right padding */ |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
return ((int) counter); |
} |
/** Print a number in a given base. |
/** Print number in given base |
* |
* Print significant digits of a number in given base. |
* Print significant digits of a number in given |
* base. |
* |
* @param num Number to print. |
* @param width Width modifier. |
* @param precision Precision modifier. |
* @param base Base to print the number in (must be between 2 and 16). |
* @param flags Flags that modify the way the number is printed. |
* @param num Number to print. |
* @param width |
* @param precision |
* @param base Base to print the number in (should |
* be in range 2 .. 16). |
* @param flags output modifiers |
* @return number of printed characters |
* |
* @return Number of characters printed. |
* |
*/ |
static int print_number(uint64_t num, int width, int precision, int base, |
uint32_t flags, printf_spec_t *ps) |
uint64_t flags, struct printf_spec *ps) |
{ |
char *digits; |
if (flags & __PRINTF_FLAG_BIGCHARS) |
digits = digits_big; |
else |
digits = digits_small; |
char *digits = digits_small; |
char d[PRINT_NUMBER_BUFFER_SIZE]; /* this is good enough even for |
* base == 2, prefix and sign */ |
char *ptr = &d[PRINT_NUMBER_BUFFER_SIZE - 1]; |
int size = 0; /* size of number with all prefixes and signs */ |
int number_size; /* size of plain number */ |
char sgn; |
int retval; |
int counter = 0; |
char data[PRINT_NUMBER_BUFFER_SIZE]; |
char *ptr = &data[PRINT_NUMBER_BUFFER_SIZE - 1]; |
if (flags & __PRINTF_FLAG_BIGCHARS) |
digits = digits_big; |
/* Size of number with all prefixes and signs */ |
int size = 0; |
/* Put zero at end of string */ |
*ptr-- = 0; |
*ptr-- = 0; /* Put zero at end of string */ |
if (num == 0) { |
*ptr-- = '0'; |
size++; |
374,17 → 238,15 |
} while (num /= base); |
} |
/* Size of plain number */ |
int number_size = size; |
number_size = size; |
/* |
* Collect the sum of all prefixes/signs/etc. to calculate padding and |
* leading zeroes. |
* Collect sum of all prefixes/signs/... to calculate padding and |
* leading zeroes |
*/ |
if (flags & __PRINTF_FLAG_PREFIX) { |
switch(base) { |
case 2: |
/* Binary formating is not standard, but usefull */ |
case 2: /* Binary formating is not standard, but usefull */ |
size += 2; |
break; |
case 8: |
395,8 → 257,8 |
break; |
} |
} |
char sgn = 0; |
sgn = 0; |
if (flags & __PRINTF_FLAG_SIGNED) { |
if (flags & __PRINTF_FLAG_NEGATIVE) { |
sgn = '-'; |
409,46 → 271,47 |
size++; |
} |
} |
if (flags & __PRINTF_FLAG_LEFTALIGNED) |
if (flags & __PRINTF_FLAG_LEFTALIGNED) { |
flags &= ~__PRINTF_FLAG_ZEROPADDED; |
} |
/* |
* If the number is left-aligned or precision is specified then |
* padding with zeros is ignored. |
* If number is leftaligned or precision is specified then zeropadding |
* is ignored. |
*/ |
if (flags & __PRINTF_FLAG_ZEROPADDED) { |
if ((precision == 0) && (width > size)) |
if ((precision == 0) && (width > size)) { |
precision = width - size + number_size; |
} |
} |
/* Print leading spaces */ |
if (number_size > precision) { |
/* Print the whole number, not only a part */ |
/* print leading spaces */ |
/* We must print whole number not only a part. */ |
if (number_size > precision) |
precision = number_size; |
} |
width -= precision + size - number_size; |
size_t counter = 0; |
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
} |
/* Print sign */ |
/* print sign */ |
if (sgn) { |
if (printf_putchar(sgn, ps) == 1) |
counter++; |
} |
/* Print prefix */ |
/* print prefix */ |
if (flags & __PRINTF_FLAG_PREFIX) { |
switch(base) { |
case 2: |
/* Binary formating is not standard, but usefull */ |
case 2: /* Binary formating is not standard, but usefull */ |
if (printf_putchar('0', ps) == 1) |
counter++; |
if (flags & __PRINTF_FLAG_BIGCHARS) { |
476,154 → 339,152 |
break; |
} |
} |
/* Print leading zeroes */ |
/* print leading zeroes */ |
precision -= number_size; |
while (precision-- > 0) { |
while (precision-- > 0) { |
if (printf_putchar('0', ps) == 1) |
counter++; |
} |
/* Print the number itself */ |
int retval; |
if ((retval = printf_putstr(++ptr, ps)) > 0) |
/* print number itself */ |
if ((retval = printf_putstr(++ptr, ps)) > 0) { |
counter += retval; |
} |
/* Print tailing spaces */ |
/* print ending spaces */ |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
while (width-- > 0) { |
if (printf_putchar(' ', ps) == 1) |
counter++; |
} |
return ((int) counter); |
return counter; |
} |
/** Print formatted string. |
* |
* Print string formatted according to the fmt parameter and variadic arguments. |
* Each formatting directive must have the following form: |
* |
* \% [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION |
* |
* \% [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION |
* |
* FLAGS:@n |
* - "#" Force to print prefix. For \%o conversion, the prefix is 0, for |
* \%x and \%X prefixes are 0x and 0X and for conversion \%b the |
* prefix is 0b. |
* - "#" Force to print prefix. |
* For conversion \%o the prefix is 0, for %x and \%X prefixes are 0x and |
* 0X and for conversion \%b the prefix is 0b. |
* |
* - "-" Align to left. |
* - "-" Align to left. |
* |
* - "+" Print positive sign just as negative. |
* - "+" Print positive sign just as negative. |
* |
* - " " If the printed number is positive and "+" flag is not set, |
* print space in place of sign. |
* - " " If the printed number is positive and "+" flag is not set, |
* print space in place of sign. |
* |
* - "0" Print 0 as padding instead of spaces. Zeroes are placed between |
* sign and the rest of the number. This flag is ignored if "-" |
* flag is specified. |
* |
* - "0" Print 0 as padding instead of spaces. Zeroes are placed between |
* sign and the rest of the number. This flag is ignored if "-" |
* flag is specified. |
* |
* WIDTH:@n |
* - Specify the minimal width of a printed argument. If it is bigger, |
* width is ignored. If width is specified with a "*" character instead of |
* number, width is taken from parameter list. And integer parameter is |
* expected before parameter for processed conversion specification. If |
* this value is negative its absolute value is taken and the "-" flag is |
* set. |
* - Specify minimal width of printed argument. If it is bigger, width is |
* ignored. If width is specified with a "*" character instead of number, |
* width is taken from parameter list. And integer parameter is expected |
* before parameter for processed conversion specification. If this value |
* is negative its absolute value is taken and the "-" flag is set. |
* |
* PRECISION:@n |
* - Value precision. For numbers it specifies minimum valid numbers. |
* Smaller numbers are printed with leading zeroes. Bigger numbers are not |
* affected. Strings with more than precision characters are cut off. Just |
* as with width, an "*" can be used used instead of a number. An integer |
* value is then expected in parameters. When both width and precision are |
* specified using "*", the first parameter is used for width and the |
* second one for precision. |
* |
* - Value precision. For numbers it specifies minimum valid numbers. |
* Smaller numbers are printed with leading zeroes. Bigger numbers are |
* not affected. Strings with more than precision characters are cut off. |
* Just as with width, an "*" can be used used instead of a number. An |
* integer value is then expected in parameters. When both width and |
* precision are specified using "*", the first parameter is used for |
* width and the second one for precision. |
* |
* TYPE:@n |
* - "hh" Signed or unsigned char.@n |
* - "h" Signed or unsigned short.@n |
* - "" Signed or unsigned int (default value).@n |
* - "l" Signed or unsigned long int.@n |
* If conversion is "c", the character is wchar_t (wide character).@n |
* If conversion is "s", the string is wchar_t * (wide string).@n |
* - "ll" Signed or unsigned long long int.@n |
* |
* - "hh" Signed or unsigned char.@n |
* - "h" Signed or usigned short.@n |
* - "" Signed or usigned int (default value).@n |
* - "l" Signed or usigned long int.@n |
* - "ll" Signed or usigned long long int.@n |
* - "z" Type size_t.@n |
* |
* |
* CONVERSION:@n |
* - % Print percentile character itself. |
* - % Print percentile character itself. |
* |
* - c Print single character. The character is expected to be plain |
* ASCII (e.g. only values 0 .. 127 are valid).@n |
* If type is "l", then the character is expected to be wide character |
* (e.g. values 0 .. 0x10ffff are valid). |
* - c Print single character. |
* |
* - s Print zero terminated string. If a NULL value is passed as |
* value, "(NULL)" is printed instead.@n |
* If type is "l", then the string is expected to be wide string. |
* - s Print zero terminated string. If a NULL value is passed as |
* value, "(NULL)" is printed instead. |
* |
* - P, p Print value of a pointer. Void * value is expected and it is |
* printed in hexadecimal notation with prefix (as with '\%#X' or |
* '\%#x' for 32bit or '\%#X' or '\%#x' for 64bit long pointers). |
* |
* - P, p Print value of a pointer. Void * value is expected and it is |
* printed in hexadecimal notation with prefix (as with \%#X / \%#x |
* for 32-bit or \%#X / \%#x for 64-bit long pointers). |
* - b Print value as unsigned binary number. Prefix is not printed by |
* default. (Nonstandard extension.) |
* |
* - o Print value as unsigned octal number. Prefix is not printed by |
* default. |
* |
* - b Print value as unsigned binary number. Prefix is not printed by |
* default. (Nonstandard extension.) |
* - d, i Print signed decimal number. There is no difference between d |
* and i conversion. |
* |
* - o Print value as unsigned octal number. Prefix is not printed by |
* default. |
* - u Print unsigned decimal number. |
* |
* - d, i Print signed decimal number. There is no difference between d |
* and i conversion. |
* |
* - u Print unsigned decimal number. |
* |
* - X, x Print hexadecimal number with upper- or lower-case. Prefix is |
* not printed by default. |
* |
* All other characters from fmt except the formatting directives are printed |
* - X, x Print hexadecimal number with upper- or lower-case. Prefix is |
* not printed by default. |
* |
* All other characters from fmt except the formatting directives are printed in |
* verbatim. |
* |
* @param fmt Format NULL-terminated string. |
* |
* @return Number of characters printed, negative value on failure. |
* |
* @param fmt Formatting NULL terminated string. |
* @return Number of printed characters or negative value on failure. |
*/ |
int printf_core(const char *fmt, printf_spec_t *ps, va_list ap) |
int printf_core(const char *fmt, struct printf_spec *ps, va_list ap) |
{ |
size_t i; /* Index of the currently processed character from fmt */ |
size_t nxt = 0; /* Index of the next character from fmt */ |
size_t j = 0; /* Index to the first not printed nonformating character */ |
/* i is the index of the currently processed char from fmt */ |
int i = 0; |
/* j is the index to the first not printed nonformating character */ |
int j = 0; |
int end; |
int counter; /* counter of printed characters */ |
int retval; /* used to store return values from called functions */ |
char c; |
qualifier_t qualifier; /* type of argument */ |
int base; /* base in which will be a numeric parameter printed */ |
uint64_t number; /* argument value */ |
size_t size; /* byte size of integer parameter */ |
int width, precision; |
uint64_t flags; |
size_t counter = 0; /* Number of characters printed */ |
int retval; /* Return values from nested functions */ |
counter = 0; |
while (true) { |
i = nxt; |
wchar_t uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 0) |
break; |
/* Control character */ |
if (uc == '%') { |
/* Print common characters if any processed */ |
while ((c = fmt[i])) { |
/* control character */ |
if (c == '%' ) { |
/* print common characters if any processed */ |
if (i > j) { |
if ((retval = printf_putnchars(&fmt[j], i - j, ps)) < 0) { |
/* Error */ |
counter = -counter; |
goto out; |
if ((retval = printf_putnchars(&fmt[j], |
(size_t)(i - j), ps)) < 0) { /* error */ |
goto minus_out; |
} |
counter += retval; |
} |
j = i; |
/* parse modifiers */ |
flags = 0; |
end = 0; |
/* Parse modifiers */ |
uint32_t flags = 0; |
bool end = false; |
do { |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
switch (uc) { |
++i; |
switch (c = fmt[i]) { |
case '#': |
flags |= __PRINTF_FLAG_PREFIX; |
break; |
640,145 → 501,114 |
flags |= __PRINTF_FLAG_ZEROPADDED; |
break; |
default: |
end = true; |
}; |
} while (!end); |
end = 1; |
}; |
} while (end == 0); |
/* Width & '*' operator */ |
int width = 0; |
if (isdigit(uc)) { |
while (true) { |
/* width & '*' operator */ |
width = 0; |
if (isdigit(fmt[i])) { |
while (isdigit(fmt[i])) { |
width *= 10; |
width += uc - '0'; |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 0) |
break; |
if (!isdigit(uc)) |
break; |
width += fmt[i++] - '0'; |
} |
} else if (uc == '*') { |
/* Get width value from argument list */ |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
width = (int) va_arg(ap, int); |
} else if (fmt[i] == '*') { |
/* get width value from argument list*/ |
i++; |
width = (int)va_arg(ap, int); |
if (width < 0) { |
/* Negative width sets '-' flag */ |
/* negative width sets '-' flag */ |
width *= -1; |
flags |= __PRINTF_FLAG_LEFTALIGNED; |
} |
} |
/* Precision and '*' operator */ |
int precision = 0; |
if (uc == '.') { |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (isdigit(uc)) { |
while (true) { |
/* precision and '*' operator */ |
precision = 0; |
if (fmt[i] == '.') { |
++i; |
if (isdigit(fmt[i])) { |
while (isdigit(fmt[i])) { |
precision *= 10; |
precision += uc - '0'; |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 0) |
break; |
if (!isdigit(uc)) |
break; |
precision += fmt[i++] - '0'; |
} |
} else if (uc == '*') { |
/* Get precision value from the argument list */ |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
precision = (int) va_arg(ap, int); |
} else if (fmt[i] == '*') { |
/* get precision value from argument */ |
i++; |
precision = (int)va_arg(ap, int); |
if (precision < 0) { |
/* Ignore negative precision */ |
/* negative precision ignored */ |
precision = 0; |
} |
} |
} |
qualifier_t qualifier; |
switch (uc) { |
/** @todo Unimplemented qualifiers: |
* t ptrdiff_t - ISO C 99 |
switch (fmt[i++]) { |
/** @todo unimplemented qualifiers: |
* t ptrdiff_t - ISO C 99 |
*/ |
case 'h': |
/* Char or short */ |
case 'h': /* char or short */ |
qualifier = PrintfQualifierShort; |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 'h') { |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (fmt[i] == 'h') { |
i++; |
qualifier = PrintfQualifierByte; |
} |
break; |
case 'l': |
/* Long or long long */ |
case 'l': /* long or long long*/ |
qualifier = PrintfQualifierLong; |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (uc == 'l') { |
i = nxt; |
uc = str_decode(fmt, &nxt, STR_NO_LIMIT); |
if (fmt[i] == 'l') { |
i++; |
qualifier = PrintfQualifierLongLong; |
} |
break; |
case 'z': /* size_t */ |
qualifier = PrintfQualifierSizeT; |
break; |
default: |
/* Default type */ |
/* set default type */ |
qualifier = PrintfQualifierInt; |
} |
--i; |
} |
unsigned int base = 10; |
switch (uc) { |
base = 10; |
switch (c = fmt[i]) { |
/* |
* String and character conversions. |
*/ |
case 's': |
if (qualifier == PrintfQualifierLong) |
retval = print_wstr(va_arg(ap, wchar_t *), width, precision, flags, ps); |
else |
retval = print_str(va_arg(ap, char *), width, precision, flags, ps); |
if (retval < 0) { |
counter = -counter; |
goto out; |
if ((retval = print_string(va_arg(ap, char*), |
width, precision, flags, ps)) < 0) { |
goto minus_out; |
} |
counter += retval; |
j = nxt; |
j = i + 1; |
goto next_char; |
case 'c': |
if (qualifier == PrintfQualifierLong) |
retval = print_wchar(va_arg(ap, wchar_t), width, flags, ps); |
else |
retval = print_char(va_arg(ap, unsigned int), width, flags, ps); |
c = va_arg(ap, unsigned int); |
retval = print_char(c, width, flags, ps); |
if (retval < 0) { |
counter = -counter; |
goto out; |
}; |
goto minus_out; |
} |
counter += retval; |
j = nxt; |
j = i + 1; |
goto next_char; |
/* |
/* |
* Integer values |
*/ |
case 'P': |
/* Pointer */ |
flags |= __PRINTF_FLAG_BIGCHARS; |
case 'P': /* pointer */ |
flags |= __PRINTF_FLAG_BIGCHARS; |
case 'p': |
flags |= __PRINTF_FLAG_PREFIX; |
base = 16; |
qualifier = PrintfQualifierPointer; |
break; |
case 'b': |
break; |
case 'b': |
base = 2; |
break; |
case 'o': |
786,7 → 616,7 |
break; |
case 'd': |
case 'i': |
flags |= __PRINTF_FLAG_SIGNED; |
flags |= __PRINTF_FLAG_SIGNED; |
case 'u': |
break; |
case 'X': |
794,63 → 624,66 |
case 'x': |
base = 16; |
break; |
/* Percentile itself */ |
case '%': |
/* percentile itself */ |
case '%': |
j = i; |
goto next_char; |
/* |
* Bad formatting. |
*/ |
default: |
/* |
* Unknown format. Now, j is the index of '%' |
* so we will print whole bad format sequence. |
* Unknown format. Now, j is the index of '%', |
* so we will print the whole bad format |
* sequence. |
*/ |
goto next_char; |
goto next_char; |
} |
/* Print integers */ |
size_t size; |
uint64_t number; |
switch (qualifier) { |
case PrintfQualifierByte: |
size = sizeof(unsigned char); |
number = (uint64_t) va_arg(ap, unsigned int); |
number = (uint64_t)va_arg(ap, unsigned int); |
break; |
case PrintfQualifierShort: |
size = sizeof(unsigned short); |
number = (uint64_t) va_arg(ap, unsigned int); |
number = (uint64_t)va_arg(ap, unsigned int); |
break; |
case PrintfQualifierInt: |
size = sizeof(unsigned int); |
number = (uint64_t) va_arg(ap, unsigned int); |
number = (uint64_t)va_arg(ap, unsigned int); |
break; |
case PrintfQualifierLong: |
size = sizeof(unsigned long); |
number = (uint64_t) va_arg(ap, unsigned long); |
number = (uint64_t)va_arg(ap, unsigned long); |
break; |
case PrintfQualifierLongLong: |
size = sizeof(unsigned long long); |
number = (uint64_t) va_arg(ap, unsigned long long); |
number = (uint64_t)va_arg(ap, |
unsigned long long); |
break; |
case PrintfQualifierPointer: |
size = sizeof(void *); |
number = (uint64_t) (unsigned long) va_arg(ap, void *); |
number = (uint64_t)(unsigned long)va_arg(ap, |
void *); |
break; |
default: |
/* Unknown qualifier */ |
counter = -counter; |
goto out; |
case PrintfQualifierSizeT: |
size = sizeof(size_t); |
number = (uint64_t)va_arg(ap, size_t); |
break; |
default: /* Unknown qualifier */ |
goto minus_out; |
} |
if (flags & __PRINTF_FLAG_SIGNED) { |
if (number & (0x1 << (size * 8 - 1))) { |
flags |= __PRINTF_FLAG_NEGATIVE; |
if (size == sizeof(uint64_t)) { |
number = -((int64_t) number); |
number = -((int64_t)number); |
} else { |
number = ~number; |
number &= |
860,31 → 693,31 |
} |
} |
} |
if ((retval = print_number(number, width, precision, |
base, flags, ps)) < 0) { |
counter = -counter; |
goto out; |
base, flags, ps)) < 0 ) { |
goto minus_out; |
} |
counter += retval; |
j = nxt; |
} |
j = i + 1; |
} |
next_char: |
; |
++i; |
} |
if (i > j) { |
if ((retval = printf_putnchars(&fmt[j], i - j, ps)) < 0) { |
/* Error */ |
counter = -counter; |
goto out; |
retval = printf_putnchars(&fmt[j], (size_t)(i - j), ps); |
if (retval < 0) { /* error */ |
goto minus_out; |
} |
counter += retval; |
} |
out: |
return ((int) counter); |
return counter; |
minus_out: |
return -counter; |
} |
/** @} |
/branches/arm/uspace/lib/libc/generic/io/stream.c |
---|
0,0 → 1,120 |
/* |
* Copyright (c) 2006 Josef Cejka |
* Copyright (c) 2006 Jakub Vana |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#include <io/io.h> |
#include <io/stream.h> |
#include <string.h> |
#include <malloc.h> |
#include <libc.h> |
#include <ipc/ipc.h> |
#include <ipc/ns.h> |
#include <ipc/fb.h> |
#include <ipc/services.h> |
#include <console.h> |
#include <unistd.h> |
#include <async.h> |
#include <sys/types.h> |
static int console_phone = -1; |
ssize_t write_stderr(const void *buf, size_t count) |
{ |
return count; |
} |
ssize_t read_stdin(void *buf, size_t count) |
{ |
open_console(); |
if (console_phone >= 0) { |
ipcarg_t r0, r1; |
size_t i = 0; |
while (i < count) { |
if (async_req_0_2(console_phone, CONSOLE_GETCHAR, &r0, &r1) < 0) |
return -1; |
((char *) buf)[i++] = r0; |
} |
return i; |
} else { |
return -1; |
} |
} |
ssize_t write_stdout(const void *buf, size_t count) |
{ |
open_console(); |
if (console_phone >= 0) { |
int i; |
for (i = 0; i < count; i++) |
async_msg_1(console_phone, CONSOLE_PUTCHAR, |
((const char *) buf)[i]); |
return count; |
} else |
return __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, count); |
} |
void open_console(void) |
{ |
if (console_phone < 0) { |
int phone = ipc_connect_me_to(PHONE_NS, SERVICE_CONSOLE, 0, 0); |
if (phone >= 0) |
console_phone = phone; |
} |
} |
void close_console(void) |
{ |
if (console_phone >= 0) { |
if (ipc_hangup(console_phone) == 0) { |
console_phone = -1; |
} |
} |
} |
void klog_update(void) |
{ |
(void) __SYSCALL3(SYS_KLOG, 1, NULL, 0); |
} |
int get_cons_phone(void) |
{ |
open_console(); |
return console_phone; |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/io/io.c |
---|
30,564 → 30,78 |
* @{ |
*/ |
/** @file |
*/ |
*/ |
#include <libc.h> |
#include <unistd.h> |
#include <stdio.h> |
#include <unistd.h> |
#include <fcntl.h> |
#include <assert.h> |
#include <string.h> |
#include <errno.h> |
#include <bool.h> |
#include <malloc.h> |
#include <io/klog.h> |
#include <vfs/vfs.h> |
#include <ipc/devmap.h> |
#include <adt/list.h> |
#include <io/io.h> |
static void _fflushbuf(FILE *stream); |
const static char nl = '\n'; |
static FILE stdin_null = { |
.fd = -1, |
.error = true, |
.eof = true, |
.klog = false, |
.phone = -1, |
.btype = _IONBF, |
.buf = NULL, |
.buf_size = 0, |
.buf_head = NULL |
}; |
static FILE stdout_klog = { |
.fd = -1, |
.error = false, |
.eof = false, |
.klog = true, |
.phone = -1, |
.btype = _IOLBF, |
.buf = NULL, |
.buf_size = BUFSIZ, |
.buf_head = NULL |
}; |
static FILE stderr_klog = { |
.fd = -1, |
.error = false, |
.eof = false, |
.klog = true, |
.phone = -1, |
.btype = _IONBF, |
.buf = NULL, |
.buf_size = 0, |
.buf_head = NULL |
}; |
FILE *stdin = NULL; |
FILE *stdout = NULL; |
FILE *stderr = NULL; |
static LIST_INITIALIZE(files); |
void __stdio_init(int filc, fdi_node_t *filv[]) |
int puts(const char *str) |
{ |
if (filc > 0) { |
stdin = fopen_node(filv[0], "r"); |
} else { |
stdin = &stdin_null; |
list_append(&stdin->link, &files); |
} |
size_t count; |
if (filc > 1) { |
stdout = fopen_node(filv[1], "w"); |
} else { |
stdout = &stdout_klog; |
list_append(&stdout->link, &files); |
} |
if (str == NULL) |
return putnchars("(NULL)", 6); |
if (filc > 2) { |
stderr = fopen_node(filv[2], "w"); |
} else { |
stderr = &stderr_klog; |
list_append(&stderr->link, &files); |
for (count = 0; str[count] != 0; count++); |
if (write_stdout((void *) str, count) == count) { |
if (write_stdout(&nl, 1) == 1) |
return 0; |
} |
} |
void __stdio_done(void) |
{ |
link_t *link = files.next; |
while (link != &files) { |
FILE *file = list_get_instance(link, FILE, link); |
fclose(file); |
link = files.next; |
} |
return EOF; |
} |
static bool parse_mode(const char *mode, int *flags) |
{ |
/* Parse mode except first character. */ |
const char *mp = mode; |
if (*mp++ == 0) { |
errno = EINVAL; |
return false; |
} |
if ((*mp == 'b') || (*mp == 't')) |
mp++; |
bool plus; |
if (*mp == '+') { |
mp++; |
plus = true; |
} else |
plus = false; |
if (*mp != 0) { |
errno = EINVAL; |
return false; |
} |
/* Parse first character of mode and determine flags for open(). */ |
switch (mode[0]) { |
case 'r': |
*flags = plus ? O_RDWR : O_RDONLY; |
break; |
case 'w': |
*flags = (O_TRUNC | O_CREAT) | (plus ? O_RDWR : O_WRONLY); |
break; |
case 'a': |
/* TODO: a+ must read from beginning, append to the end. */ |
if (plus) { |
errno = ENOTSUP; |
return false; |
} |
*flags = (O_APPEND | O_CREAT) | (plus ? O_RDWR : O_WRONLY); |
default: |
errno = EINVAL; |
return false; |
} |
return true; |
} |
/** Set stream buffer. */ |
void setvbuf(FILE *stream, void *buf, int mode, size_t size) |
{ |
stream->btype = mode; |
stream->buf = buf; |
stream->buf_size = size; |
stream->buf_head = stream->buf; |
} |
static void _setvbuf(FILE *stream) |
{ |
/* FIXME: Use more complex rules for setting buffering options. */ |
switch (stream->fd) { |
case 1: |
setvbuf(stream, NULL, _IOLBF, BUFSIZ); |
break; |
case 0: |
case 2: |
setvbuf(stream, NULL, _IONBF, 0); |
break; |
default: |
setvbuf(stream, NULL, _IOFBF, BUFSIZ); |
} |
} |
/** Allocate stream buffer. */ |
static int _fallocbuf(FILE *stream) |
{ |
assert(stream->buf == NULL); |
stream->buf = malloc(stream->buf_size); |
if (stream->buf == NULL) { |
errno = ENOMEM; |
return -1; |
} |
stream->buf_head = stream->buf; |
return 0; |
} |
/** Open a stream. |
* |
* @param path Path of the file to open. |
* @param mode Mode string, (r|w|a)[b|t][+]. |
* |
/** Put count chars from buffer to stdout without adding newline |
* @param buf Buffer with size at least count bytes - NULL pointer NOT allowed! |
* @param count |
* @return 0 on succes, EOF on fail |
*/ |
FILE *fopen(const char *path, const char *mode) |
int putnchars(const char *buf, size_t count) |
{ |
int flags; |
if (!parse_mode(mode, &flags)) |
return NULL; |
if (write_stdout((void *) buf, count) == count) |
return 0; |
/* Open file. */ |
FILE *stream = malloc(sizeof(FILE)); |
if (stream == NULL) { |
errno = ENOMEM; |
return NULL; |
} |
stream->fd = open(path, flags, 0666); |
if (stream->fd < 0) { |
/* errno was set by open() */ |
free(stream); |
return NULL; |
} |
stream->error = false; |
stream->eof = false; |
stream->klog = false; |
stream->phone = -1; |
_setvbuf(stream); |
list_append(&stream->link, &files); |
return stream; |
return EOF; |
} |
FILE *fdopen(int fd, const char *mode) |
{ |
/* Open file. */ |
FILE *stream = malloc(sizeof(FILE)); |
if (stream == NULL) { |
errno = ENOMEM; |
return NULL; |
} |
stream->fd = fd; |
stream->error = false; |
stream->eof = false; |
stream->klog = false; |
stream->phone = -1; |
_setvbuf(stream); |
list_append(&stream->link, &files); |
return stream; |
} |
FILE *fopen_node(fdi_node_t *node, const char *mode) |
{ |
int flags; |
if (!parse_mode(mode, &flags)) |
return NULL; |
/* Open file. */ |
FILE *stream = malloc(sizeof(FILE)); |
if (stream == NULL) { |
errno = ENOMEM; |
return NULL; |
} |
stream->fd = open_node(node, flags); |
if (stream->fd < 0) { |
/* errno was set by open_node() */ |
free(stream); |
return NULL; |
} |
stream->error = false; |
stream->eof = false; |
stream->klog = false; |
stream->phone = -1; |
_setvbuf(stream); |
list_append(&stream->link, &files); |
return stream; |
} |
int fclose(FILE *stream) |
{ |
int rc = 0; |
fflush(stream); |
if (stream->phone >= 0) |
ipc_hangup(stream->phone); |
if (stream->fd >= 0) |
rc = close(stream->fd); |
list_remove(&stream->link); |
if ((stream != &stdin_null) |
&& (stream != &stdout_klog) |
&& (stream != &stderr_klog)) |
free(stream); |
stream = NULL; |
if (rc != 0) { |
/* errno was set by close() */ |
return EOF; |
} |
return 0; |
} |
/** Read from a stream. |
/** Same as puts, but does not print newline at end |
* |
* @param buf Destination buffer. |
* @param size Size of each record. |
* @param nmemb Number of records to read. |
* @param stream Pointer to the stream. |
* |
*/ |
size_t fread(void *buf, size_t size, size_t nmemb, FILE *stream) |
int putstr(const char *str) |
{ |
size_t left = size * nmemb; |
size_t done = 0; |
size_t count; |
/* Make sure no data is pending write. */ |
_fflushbuf(stream); |
while ((left > 0) && (!stream->error) && (!stream->eof)) { |
ssize_t rd = read(stream->fd, buf + done, left); |
if (rd < 0) |
stream->error = true; |
else if (rd == 0) |
stream->eof = true; |
else { |
left -= rd; |
done += rd; |
} |
} |
return (done / size); |
} |
if (str == NULL) |
return putnchars("(NULL)", 6); |
static size_t _fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream) |
{ |
size_t left = size * nmemb; |
size_t done = 0; |
for (count = 0; str[count] != 0; count++); |
if (write_stdout((void *) str, count) == count) |
return 0; |
while ((left > 0) && (!stream->error)) { |
ssize_t wr; |
if (stream->klog) |
wr = klog_write(buf + done, left); |
else |
wr = write(stream->fd, buf + done, left); |
if (wr <= 0) |
stream->error = true; |
else { |
left -= wr; |
done += wr; |
} |
} |
return (done / size); |
return EOF; |
} |
/** Drain stream buffer, do not sync stream. */ |
static void _fflushbuf(FILE *stream) |
int putchar(int c) |
{ |
size_t bytes_used; |
unsigned char ch = c; |
if (write_stdout((void *) &ch, 1) == 1) |
return c; |
if ((!stream->buf) || (stream->btype == _IONBF) || (stream->error)) |
return; |
bytes_used = stream->buf_head - stream->buf; |
if (bytes_used == 0) |
return; |
(void) _fwrite(stream->buf, 1, bytes_used, stream); |
stream->buf_head = stream->buf; |
} |
/** Write to a stream. |
* |
* @param buf Source buffer. |
* @param size Size of each record. |
* @param nmemb Number of records to write. |
* @param stream Pointer to the stream. |
* |
*/ |
size_t fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream) |
{ |
uint8_t *data; |
size_t bytes_left; |
size_t now; |
size_t buf_free; |
size_t total_written; |
size_t i; |
uint8_t b; |
bool need_flush; |
/* If not buffered stream, write out directly. */ |
if (stream->btype == _IONBF) { |
now = _fwrite(buf, size, nmemb, stream); |
fflush(stream); |
return now; |
} |
/* Perform lazy allocation of stream buffer. */ |
if (stream->buf == NULL) { |
if (_fallocbuf(stream) != 0) |
return 0; /* Errno set by _fallocbuf(). */ |
} |
data = (uint8_t *) buf; |
bytes_left = size * nmemb; |
total_written = 0; |
need_flush = false; |
while ((!stream->error) && (bytes_left > 0)) { |
buf_free = stream->buf_size - (stream->buf_head - stream->buf); |
if (bytes_left > buf_free) |
now = buf_free; |
else |
now = bytes_left; |
for (i = 0; i < now; i++) { |
b = data[i]; |
stream->buf_head[i] = b; |
if ((b == '\n') && (stream->btype == _IOLBF)) |
need_flush = true; |
} |
buf += now; |
stream->buf_head += now; |
buf_free -= now; |
bytes_left -= now; |
total_written += now; |
if (buf_free == 0) { |
/* Only need to drain buffer. */ |
_fflushbuf(stream); |
need_flush = false; |
} |
} |
if (need_flush) |
fflush(stream); |
return (total_written / size); |
} |
int fputc(wchar_t c, FILE *stream) |
{ |
char buf[STR_BOUNDS(1)]; |
size_t sz = 0; |
if (chr_encode(c, buf, &sz, STR_BOUNDS(1)) == EOK) { |
size_t wr = fwrite(buf, sz, 1, stream); |
if (wr < sz) |
return EOF; |
return (int) c; |
} |
return EOF; |
} |
int putchar(wchar_t c) |
{ |
return fputc(c, stdout); |
} |
int fputs(const char *str, FILE *stream) |
{ |
return fwrite(str, str_size(str), 1, stream); |
} |
int puts(const char *str) |
{ |
return fputs(str, stdout); |
} |
int fgetc(FILE *stream) |
{ |
char c; |
/* This could be made faster by only flushing when needed. */ |
if (stdout) |
fflush(stdout); |
if (stderr) |
fflush(stderr); |
if (fread(&c, sizeof(char), 1, stream) < sizeof(char)) |
return EOF; |
return (int) c; |
} |
int getchar(void) |
{ |
return fgetc(stdin); |
} |
int fseek(FILE *stream, long offset, int origin) |
{ |
off_t rc = lseek(stream->fd, offset, origin); |
if (rc == (off_t) (-1)) { |
/* errno has been set by lseek. */ |
return -1; |
} |
unsigned char c; |
if (read_stdin((void *) &c, 1) == 1) |
return c; |
stream->eof = false; |
return 0; |
return EOF; |
} |
void rewind(FILE *stream) |
{ |
(void) fseek(stream, 0, SEEK_SET); |
} |
int fflush(FILE *stream) |
{ |
_fflushbuf(stream); |
if (stream->klog) { |
klog_update(); |
return EOK; |
} |
if (stream->fd >= 0) |
return fsync(stream->fd); |
return ENOENT; |
} |
int feof(FILE *stream) |
{ |
return stream->eof; |
} |
int ferror(FILE *stream) |
{ |
return stream->error; |
} |
int fphone(FILE *stream) |
{ |
if (stream->fd >= 0) { |
if (stream->phone < 0) |
stream->phone = fd_phone(stream->fd); |
return stream->phone; |
} |
return -1; |
} |
int fnode(FILE *stream, fdi_node_t *node) |
{ |
if (stream->fd >= 0) |
return fd_node(stream->fd, node); |
return ENOENT; |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/io/vprintf.c |
---|
38,81 → 38,39 |
#include <io/printf_core.h> |
#include <futex.h> |
#include <async.h> |
#include <string.h> |
static atomic_t printf_futex = FUTEX_INITIALIZER; |
static int vprintf_str_write(const char *str, size_t size, void *stream) |
static int vprintf_write(const char *str, size_t count, void *unused) |
{ |
size_t wr = fwrite(str, 1, size, (FILE *) stream); |
return str_nlength(str, wr); |
return write_stdout(str, count); |
} |
static int vprintf_wstr_write(const wchar_t *str, size_t size, void *stream) |
{ |
size_t offset = 0; |
size_t chars = 0; |
while (offset < size) { |
if (fputc(str[chars], (FILE *) stream) <= 0) |
break; |
chars++; |
offset += sizeof(wchar_t); |
} |
return chars; |
} |
/** Print formatted text. |
* |
* @param stream Output stream |
* @param fmt Format string |
* @param ap Format parameters |
* |
* @param fmt format string |
* @param ap format parameters |
* \see For more details about format string see printf_core. |
* |
*/ |
int vfprintf(FILE *stream, const char *fmt, va_list ap) |
int vprintf(const char *fmt, va_list ap) |
{ |
struct printf_spec ps = { |
vprintf_str_write, |
vprintf_wstr_write, |
stream |
(int (*)(void *, size_t, void *)) vprintf_write, |
NULL |
}; |
/* |
* Prevent other threads to execute printf_core() |
*/ |
futex_down(&printf_futex); |
/* |
* Prevent other fibrils of the same thread |
* Prevent other pseudo threads of the same thread |
* to execute printf_core() |
*/ |
async_serialize_start(); |
int ret = printf_core(fmt, &ps, ap); |
async_serialize_end(); |
futex_up(&printf_futex); |
return ret; |
} |
/** Print formatted text to stdout. |
* |
* @param file Output stream |
* @param fmt Format string |
* @param ap Format parameters |
* |
* \see For more details about format string see printf_core. |
* |
*/ |
int vprintf(const char *fmt, va_list ap) |
{ |
return vfprintf(stdout, fmt, ap); |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/io/printf.c |
---|
34,43 → 34,23 |
#include <io/printf_core.h> |
#include <stdio.h> |
#include <stdio.h> |
/** Print formatted text. |
* |
* @param stream Output stream |
* @param fmt Format string |
* |
* @param fmt format string |
* \see For more details about format string see printf_core. |
* |
*/ |
int fprintf(FILE *stream, const char *fmt, ...) |
int printf(const char *fmt, ...) |
{ |
int ret; |
va_list args; |
va_start(args, fmt); |
ret = vprintf(fmt, args); |
int ret = vfprintf(stream, fmt, args); |
va_end(args); |
return ret; |
} |
/** Print formatted text to stdout. |
* |
* @param fmt Format string |
* |
* \see For more details about format string see printf_core. |
* |
*/ |
int printf(const char *fmt, ...) |
{ |
va_list args; |
va_start(args, fmt); |
int ret = vprintf(fmt, args); |
va_end(args); |
return ret; |
} |
/branches/arm/uspace/lib/libc/generic/io/vsprintf.c |
---|
0,0 → 1,51 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#include <stdarg.h> |
#include <stdio.h> |
#include <io/printf_core.h> |
/** Print formatted to the given buffer. |
* @param str buffer |
* @param fmt format string |
* @param ap argument list |
* \see For more details about format string see printf_core. |
*/ |
int vsprintf(char *str, const char *fmt, va_list ap) |
{ |
return vsnprintf(str, (size_t) - 1, fmt, ap); |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/io/snprintf.c |
---|
37,23 → 37,21 |
#include <io/printf_core.h> |
/** Print formatted to the given buffer with limited size. |
* |
* @param str Buffer |
* @param size Buffer size |
* @param fmt Format string |
* |
* @param str buffer |
* @param size buffer size |
* @param fmt format string |
* \see For more details about format string see printf_core. |
* |
*/ |
int snprintf(char *str, size_t size, const char *fmt, ...) |
{ |
int ret; |
va_list args; |
va_start(args, fmt); |
int ret = vsnprintf(str, size, fmt, args); |
ret = vsnprintf(str, size, fmt, args); |
va_end(args); |
return ret; |
} |
/branches/arm/uspace/lib/libc/generic/getopt.c |
---|
47,7 → 47,7 |
int optind = 1; /* index into parent argv vector */ |
int optopt = '?'; /* character checked for validity */ |
int optreset; /* reset getopt */ |
const char *optarg; /* argument associated with option */ |
char *optarg; /* argument associated with option */ |
#define IGNORE_FIRST (*options == '-' || *options == '+') |
162,7 → 162,7 |
char **nargv; |
const char *options; |
{ |
const char *oli; /* option letter list index */ |
char *oli; /* option letter list index */ |
int optchar; |
assert(nargv != NULL); |
241,7 → 241,7 |
} |
} |
if ((optchar = (int)*place++) == (int)':' || |
(oli = str_chr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) { |
(oli = strchr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) { |
/* option letter unknown or ':' */ |
if (!*place) |
++optind; |
275,7 → 275,7 |
} else { /* takes (optional) argument */ |
optarg = NULL; |
if (*place) /* no white space */ |
optarg = place; |
optarg = *place; |
/* XXX: disable test for :: if PC? (GNU doesn't) */ |
else if (oli[1] != ':') { /* arg not optional */ |
if (++optind >= nargc) { /* no arg */ |
353,8 → 353,7 |
retval = getopt_internal(nargc, (char **)nargv, options); |
if (retval == -2) { |
char *current_argv; |
const char *has_equal; |
char *current_argv, *has_equal; |
size_t current_argv_len; |
int i, ambiguous, match; |
378,20 → 377,20 |
nonopt_start = nonopt_end = -1; |
return -1; |
} |
if ((has_equal = str_chr(current_argv, '=')) != NULL) { |
if ((has_equal = strchr(current_argv, '=')) != NULL) { |
/* argument found (--option=arg) */ |
current_argv_len = has_equal - current_argv; |
has_equal++; |
} else |
current_argv_len = str_size(current_argv); |
current_argv_len = strlen(current_argv); |
for (i = 0; long_options[i].name; i++) { |
/* find matching long option */ |
if (str_lcmp(current_argv, long_options[i].name, |
str_nlength(current_argv, current_argv_len))) |
if (strncmp(current_argv, long_options[i].name, |
current_argv_len)) |
continue; |
if (str_size(long_options[i].name) == |
if (strlen(long_options[i].name) == |
(unsigned)current_argv_len) { |
/* exact match */ |
match = i; |
/branches/arm/uspace/lib/libc/generic/as.c |
---|
30,7 → 30,7 |
* @{ |
*/ |
/** @file |
*/ |
*/ |
#include <as.h> |
#include <libc.h> |
38,23 → 38,23 |
#include <align.h> |
#include <sys/types.h> |
#include <bitops.h> |
#include <malloc.h> |
/** Last position allocated by as_get_mappable_page */ |
static uintptr_t last_allocated = 0; |
/** |
* Either 4*256M on 32-bit architecures or 16*256M on 64-bit architectures. |
*/ |
#define MAX_HEAP_SIZE (sizeof(uintptr_t)<<28) |
/** Create address space area. |
* |
* @param address Virtual address where to place new address space area. |
* @param size Size of the area. |
* @param flags Flags describing type of the area. |
* @param size Size of the area. |
* @param flags Flags describing type of the area. |
* |
* @return address on success, (void *) -1 otherwise. |
* |
*/ |
void *as_area_create(void *address, size_t size, int flags) |
{ |
return (void *) __SYSCALL3(SYS_AS_AREA_CREATE, (sysarg_t) address, |
return (void *) __SYSCALL3(SYS_AS_AREA_CREATE, (sysarg_t ) address, |
(sysarg_t) size, (sysarg_t) flags); |
} |
61,16 → 61,15 |
/** Resize address space area. |
* |
* @param address Virtual address pointing into already existing address space |
* area. |
* @param size New requested size of the area. |
* @param flags Currently unused. |
* area. |
* @param size New requested size of the area. |
* @param flags Currently unused. |
* |
* @return zero on success or a code from @ref errno.h on failure. |
* |
* @return Zero on success or a code from @ref errno.h on failure. |
*/ |
int as_area_resize(void *address, size_t size, int flags) |
{ |
return __SYSCALL3(SYS_AS_AREA_RESIZE, (sysarg_t) address, |
return __SYSCALL3(SYS_AS_AREA_RESIZE, (sysarg_t ) address, |
(sysarg_t) size, (sysarg_t) flags); |
} |
77,24 → 76,22 |
/** Destroy address space area. |
* |
* @param address Virtual address pointing into the address space area being |
* destroyed. |
* destroyed. |
* |
* @return zero on success or a code from @ref errno.h on failure. |
* |
* @return Zero on success or a code from @ref errno.h on failure. |
*/ |
int as_area_destroy(void *address) |
{ |
return __SYSCALL1(SYS_AS_AREA_DESTROY, (sysarg_t) address); |
return __SYSCALL1(SYS_AS_AREA_DESTROY, (sysarg_t ) address); |
} |
/** Change address-space area flags. |
* |
* @param address Virtual address pointing into the address space area being |
* modified. |
* @param flags New flags describing type of the area. |
* modified. |
* @param flags New flags describing type of the area. |
* |
* @return zero on success or a code from @ref errno.h on failure. |
* |
* @return Zero on success or a code from @ref errno.h on failure. |
*/ |
int as_area_change_flags(void *address, int flags) |
{ |
102,29 → 99,101 |
(sysarg_t) flags); |
} |
static size_t heapsize = 0; |
static size_t maxheapsize = (size_t) (-1); |
static void * last_allocated = 0; |
/* Start of heap linker symbol */ |
extern char _heap; |
/** Sbrk emulation |
* |
* @param incr New area that should be allocated or negative, |
if it should be shrinked |
* @return Pointer to newly allocated area |
*/ |
void *sbrk(ssize_t incr) |
{ |
int rc; |
void *res; |
/* Check for invalid values */ |
if (incr < 0 && -incr > heapsize) |
return NULL; |
/* Check for too large value */ |
if (incr > 0 && incr+heapsize < heapsize) |
return NULL; |
/* Check for too small values */ |
if (incr < 0 && incr+heapsize > heapsize) |
return NULL; |
/* Check for user limit */ |
if ((maxheapsize != (size_t) (-1)) && (heapsize + incr) > maxheapsize) |
return NULL; |
rc = as_area_resize(&_heap, heapsize + incr, 0); |
if (rc != 0) |
return NULL; |
/* Compute start of new area */ |
res = (void *) &_heap + heapsize; |
heapsize += incr; |
return res; |
} |
/** Set maximum heap size and return pointer just after the heap */ |
void *set_maxheapsize(size_t mhs) |
{ |
maxheapsize = mhs; |
/* Return pointer to area not managed by sbrk */ |
return ((void *) &_heap + maxheapsize); |
} |
/** Return pointer to some unmapped area, where fits new as_area |
* |
* @param size Requested size of the allocation. |
* @param sz Requested size of the allocation. |
* |
* @return pointer to the beginning |
* @return Pointer to the beginning |
* |
* TODO: make some first_fit/... algorithm, we are now just incrementing |
* the pointer to last area |
*/ |
void *as_get_mappable_page(size_t size) |
void *as_get_mappable_page(size_t sz) |
{ |
if (size == 0) |
return NULL; |
void *res; |
uint64_t asz; |
int i; |
size_t sz = 1 << (fnzb(size - 1) + 1); |
if (last_allocated == 0) |
last_allocated = get_max_heap_addr(); |
if (!sz) |
return NULL; |
asz = 1 << (fnzb64(sz - 1) + 1); |
/* Set heapsize to some meaningful value */ |
if (maxheapsize == -1) |
set_maxheapsize(MAX_HEAP_SIZE); |
/* |
* Make sure we allocate from naturally aligned address. |
*/ |
uintptr_t res = ALIGN_UP(last_allocated, sz); |
last_allocated = res + ALIGN_UP(size, PAGE_SIZE); |
return ((void *) res); |
i = 0; |
if (!last_allocated) { |
last_allocated = (void *) ALIGN_UP((void *) &_heap + |
maxheapsize, asz); |
} else { |
last_allocated = (void *) ALIGN_UP(((uintptr_t) |
last_allocated) + (int) (i > 0), asz); |
} |
res = last_allocated; |
last_allocated += ALIGN_UP(sz, PAGE_SIZE); |
return res; |
} |
/** @} |
/branches/arm/uspace/lib/libc/generic/libc.c |
---|
27,31 → 27,30 |
*/ |
/** @addtogroup lc Libc |
* @brief HelenOS C library |
* @brief HelenOS C library |
* @{ |
* @} |
*/ |
/** @addtogroup libc generic |
* @ingroup lc |
* @{ |
*/ |
/** @file |
*/ |
*/ |
#include <libc.h> |
#include <stdio.h> |
#include <unistd.h> |
#include <malloc.h> |
#include <tls.h> |
#include <thread.h> |
#include <fibril.h> |
#include <io/stream.h> |
#include <ipc/ipc.h> |
#include <async.h> |
#include <as.h> |
#include <loader/pcb.h> |
extern char _heap; |
extern int main(int argc, char *argv[]); |
void _exit(int status) |
61,33 → 60,29 |
void __main(void *pcb_ptr) |
{ |
int retval; |
fibril_t *f; |
int argc; |
char **argv; |
__heap_init(); |
__async_init(); |
fibril_t *fibril = fibril_setup(); |
__tcb_set(fibril->tcb); |
(void) as_area_create(&_heap, 1, AS_AREA_WRITE | AS_AREA_READ); |
_async_init(); |
f = fibril_setup(); |
__tcb_set(f->tcb); |
open_console(); |
/* Save the PCB pointer */ |
__pcb = (pcb_t *) pcb_ptr; |
int argc; |
char **argv; |
__pcb = (pcb_t *)pcb_ptr; |
if (__pcb == NULL) { |
argc = 0; |
argv = NULL; |
__stdio_init(0, NULL); |
} else { |
argc = __pcb->argc; |
argv = __pcb->argv; |
__stdio_init(__pcb->filc, __pcb->filv); |
} |
retval = main(argc, argv); |
__stdio_done(); |
(void) task_retval(retval); |
main(argc, argv); |
} |
void __exit(void) |
/branches/arm/uspace/lib/libc/generic/smc.c |
---|
34,7 → 34,6 |
#include <libc.h> |
#include <sys/types.h> |
#include <smc.h> |
int smc_coherence(void *address, size_t size) |
{ |
/branches/arm/uspace/lib/libc/generic/async.c |
---|
30,65 → 30,64 |
* @{ |
*/ |
/** @file |
*/ |
*/ |
/** |
* Asynchronous library |
* |
* The aim of this library is to provide a facility for writing programs which |
* utilize the asynchronous nature of HelenOS IPC, yet using a normal way of |
* programming. |
* The aim of this library is facilitating writing programs utilizing the |
* asynchronous nature of HelenOS IPC, yet using a normal way of programming. |
* |
* You should be able to write very simple multithreaded programs, the async |
* framework will automatically take care of most synchronization problems. |
* |
* Default semantics: |
* - async_send_*(): Send asynchronously. If the kernel refuses to send |
* more messages, [ try to get responses from kernel, if |
* nothing found, might try synchronous ] |
* - async_send_*(): send asynchronously. If the kernel refuses to send |
* more messages, [ try to get responses from kernel, if |
* nothing found, might try synchronous ] |
* |
* Example of use (pseudo C): |
* |
* |
* 1) Multithreaded client application |
* |
* fibril_create(fibril1, ...); |
* fibril_create(fibril2, ...); |
* ... |
* fibril_create(fibril1, ...); |
* fibril_create(fibril2, ...); |
* ... |
* |
* int fibril1(void *arg) |
* { |
* conn = ipc_connect_me_to(); |
* c1 = async_send(conn); |
* c2 = async_send(conn); |
* async_wait_for(c1); |
* async_wait_for(c2); |
* ... |
* } |
* |
* int fibril1(void *arg) |
* { |
* conn = ipc_connect_me_to(); |
* c1 = async_send(conn); |
* c2 = async_send(conn); |
* async_wait_for(c1); |
* async_wait_for(c2); |
* ... |
* } |
* |
* |
* 2) Multithreaded server application |
* main() |
* { |
* async_manager(); |
* } |
* |
* |
* main() |
* { |
* async_manager(); |
* } |
* my_client_connection(icallid, *icall) |
* { |
* if (want_refuse) { |
* ipc_answer_0(icallid, ELIMIT); |
* return; |
* } |
* ipc_answer_0(icallid, EOK); |
* |
* my_client_connection(icallid, *icall) |
* { |
* if (want_refuse) { |
* ipc_answer_0(icallid, ELIMIT); |
* return; |
* } |
* ipc_answer_0(icallid, EOK); |
* callid = async_get_call(&call); |
* handle_call(callid, call); |
* ipc_answer_2(callid, 1, 2, 3); |
* |
* callid = async_get_call(&call); |
* handle_call(callid, call); |
* ipc_answer_2(callid, 1, 2, 3); |
* callid = async_get_call(&call); |
* .... |
* } |
* |
* callid = async_get_call(&call); |
* ... |
* } |
* |
*/ |
#include <futex.h> |
95,8 → 94,8 |
#include <async.h> |
#include <fibril.h> |
#include <stdio.h> |
#include <adt/hash_table.h> |
#include <adt/list.h> |
#include <libadt/hash_table.h> |
#include <libadt/list.h> |
#include <ipc/ipc.h> |
#include <assert.h> |
#include <errno.h> |
105,26 → 104,24 |
#include <bool.h> |
atomic_t async_futex = FUTEX_INITIALIZER; |
static hash_table_t conn_hash_table; |
static LIST_INITIALIZE(timeout_list); |
/** Structures of this type represent a waiting fibril. */ |
typedef struct { |
/** Expiration time. */ |
struct timeval expires; |
struct timeval expires; |
/** If true, this struct is in the timeout list. */ |
bool inlist; |
int inlist; |
/** Timeout list link. */ |
link_t link; |
/** Identification of and link to the waiting fibril. */ |
fid_t fid; |
/** If true, this fibril is currently active. */ |
bool active; |
int active; |
/** If true, we have timed out. */ |
bool timedout; |
int timedout; |
} awaiter_t; |
typedef struct { |
131,11 → 128,10 |
awaiter_t wdata; |
/** If reply was received. */ |
bool done; |
int done; |
/** Pointer to where the answer data is stored. */ |
ipc_call_t *dataptr; |
ipc_call_t *dataptr; |
ipcarg_t retval; |
} amsg_t; |
151,31 → 147,37 |
typedef struct { |
awaiter_t wdata; |
/** Hash table link. */ |
link_t link; |
/** Incoming phone hash. */ |
ipcarg_t in_phone_hash; |
ipcarg_t in_phone_hash; |
/** Messages that should be delivered to this fibril. */ |
link_t msg_queue; |
link_t msg_queue; |
/** Identification of the opening call. */ |
ipc_callid_t callid; |
/** Call data of the opening call. */ |
ipc_call_t call; |
/** Identification of the closing call. */ |
ipc_callid_t close_callid; |
/** Fibril function that will be used to handle the connection. */ |
void (*cfibril)(ipc_callid_t, ipc_call_t *); |
} connection_t; |
/** Identifier of the incoming connection handled by the current fibril. */ |
fibril_local connection_t *FIBRIL_connection; |
__thread connection_t *FIBRIL_connection; |
/** |
* If true, it is forbidden to use async_req functions and all preemption is |
* disabled. |
*/ |
__thread int _in_interrupt_handler; |
static void default_client_connection(ipc_callid_t callid, ipc_call_t *call); |
static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call); |
183,7 → 185,6 |
* Pointer to a fibril function that will be used to handle connections. |
*/ |
static async_client_conn_t client_connection = default_client_connection; |
/** |
* Pointer to a fibril function that will be used to handle interrupt |
* notifications. |
190,37 → 191,46 |
*/ |
static async_client_conn_t interrupt_received = default_interrupt_received; |
static hash_table_t conn_hash_table; |
static LIST_INITIALIZE(timeout_list); |
/* |
* Getter for _in_interrupt_handler. We need to export the value of this thread |
* local variable to other modules, but the binutils 2.18 linkers die on an |
* attempt to export this symbol in the header file. For now, consider this as a |
* workaround. |
*/ |
bool in_interrupt_handler(void) |
{ |
return _in_interrupt_handler; |
} |
#define CONN_HASH_TABLE_CHAINS 32 |
#define CONN_HASH_TABLE_CHAINS 32 |
/** Compute hash into the connection hash table based on the source phone hash. |
* |
* @param key Pointer to source phone hash. |
* @param key Pointer to source phone hash. |
* |
* @return Index into the connection hash table. |
* |
* @return Index into the connection hash table. |
*/ |
static hash_index_t conn_hash(unsigned long *key) |
{ |
assert(key); |
return (((*key) >> 4) % CONN_HASH_TABLE_CHAINS); |
return ((*key) >> 4) % CONN_HASH_TABLE_CHAINS; |
} |
/** Compare hash table item with a key. |
* |
* @param key Array containing the source phone hash as the only item. |
* @param keys Expected 1 but ignored. |
* @param item Connection hash table item. |
* @param key Array containing the source phone hash as the only item. |
* @param keys Expected 1 but ignored. |
* @param item Connection hash table item. |
* |
* @return True on match, false otherwise. |
* |
* @return True on match, false otherwise. |
*/ |
static int conn_compare(unsigned long key[], hash_count_t keys, link_t *item) |
{ |
connection_t *hs = hash_table_get_instance(item, connection_t, link); |
return (key[0] == hs->in_phone_hash); |
connection_t *hs; |
hs = hash_table_get_instance(item, connection_t, link); |
return key[0] == hs->in_phone_hash; |
} |
/** Connection hash table removal callback function. |
228,8 → 238,7 |
* This function is called whenever a connection is removed from the connection |
* hash table. |
* |
* @param item Connection hash table item being removed. |
* |
* @param item Connection hash table item being removed. |
*/ |
static void conn_remove(link_t *item) |
{ |
246,24 → 255,23 |
/** Sort in current fibril's timeout request. |
* |
* @param wd Wait data of the current fibril. |
* |
* @param wd Wait data of the current fibril. |
*/ |
static void insert_timeout(awaiter_t *wd) |
{ |
wd->timedout = false; |
wd->inlist = true; |
link_t *tmp = timeout_list.next; |
link_t *tmp; |
awaiter_t *cur; |
wd->timedout = 0; |
wd->inlist = 1; |
tmp = timeout_list.next; |
while (tmp != &timeout_list) { |
awaiter_t *cur = list_get_instance(tmp, awaiter_t, link); |
cur = list_get_instance(tmp, awaiter_t, link); |
if (tv_gteq(&cur->expires, &wd->expires)) |
break; |
tmp = tmp->next; |
} |
list_append(&wd->link, tmp); |
} |
273,146 → 281,93 |
* its message queue. If the fibril was not active, it is activated and all |
* timeouts are unregistered. |
* |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
* |
* @return False if the call doesn't match any connection. |
* True if the call was passed to the respective connection fibril. |
* |
* @return Zero if the call doesn't match any connection. |
* One if the call was passed to the respective connection |
* fibril. |
*/ |
static bool route_call(ipc_callid_t callid, ipc_call_t *call) |
static int route_call(ipc_callid_t callid, ipc_call_t *call) |
{ |
connection_t *conn; |
msg_t *msg; |
link_t *hlp; |
unsigned long key; |
futex_down(&async_futex); |
unsigned long key = call->in_phone_hash; |
link_t *hlp = hash_table_find(&conn_hash_table, &key); |
key = call->in_phone_hash; |
hlp = hash_table_find(&conn_hash_table, &key); |
if (!hlp) { |
futex_up(&async_futex); |
return false; |
return 0; |
} |
connection_t *conn = hash_table_get_instance(hlp, connection_t, link); |
msg_t *msg = malloc(sizeof(*msg)); |
if (!msg) { |
futex_up(&async_futex); |
return false; |
} |
conn = hash_table_get_instance(hlp, connection_t, link); |
msg = malloc(sizeof(*msg)); |
msg->callid = callid; |
msg->call = *call; |
list_append(&msg->link, &conn->msg_queue); |
if (IPC_GET_METHOD(*call) == IPC_M_PHONE_HUNGUP) |
conn->close_callid = callid; |
/* If the connection fibril is waiting for an event, activate it */ |
if (!conn->wdata.active) { |
/* If in timeout list, remove it */ |
if (conn->wdata.inlist) { |
conn->wdata.inlist = false; |
conn->wdata.inlist = 0; |
list_remove(&conn->wdata.link); |
} |
conn->wdata.active = true; |
conn->wdata.active = 1; |
fibril_add_ready(conn->wdata.fid); |
} |
futex_up(&async_futex); |
return true; |
} |
/** Notification fibril. |
* |
* When a notification arrives, a fibril with this implementing function is |
* created. It calls interrupt_received() and does the final cleanup. |
* |
* @param arg Message structure pointer. |
* |
* @return Always zero. |
* |
*/ |
static int notification_fibril(void *arg) |
{ |
msg_t *msg = (msg_t *) arg; |
interrupt_received(msg->callid, &msg->call); |
free(msg); |
return 0; |
return 1; |
} |
/** Process interrupt notification. |
* |
* A new fibril is created which would process the notification. |
* |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
* |
* @return False if an error occured. |
* True if the call was passed to the notification fibril. |
* |
*/ |
static bool process_notification(ipc_callid_t callid, ipc_call_t *call) |
{ |
futex_down(&async_futex); |
msg_t *msg = malloc(sizeof(*msg)); |
if (!msg) { |
futex_up(&async_futex); |
return false; |
} |
msg->callid = callid; |
msg->call = *call; |
fid_t fid = fibril_create(notification_fibril, msg); |
fibril_add_ready(fid); |
futex_up(&async_futex); |
return true; |
} |
/** Return new incoming message for the current (fibril-local) connection. |
* |
* @param call Storage where the incoming call data will be stored. |
* @param usecs Timeout in microseconds. Zero denotes no timeout. |
* @param call Storage where the incoming call data will be stored. |
* @param usecs Timeout in microseconds. Zero denotes no timeout. |
* |
* @return If no timeout was specified, then a hash of the |
* incoming call is returned. If a timeout is specified, |
* then a hash of the incoming call is returned unless |
* the timeout expires prior to receiving a message. In |
* that case zero is returned. |
* |
* @return If no timeout was specified, then a hash of the |
* incoming call is returned. If a timeout is specified, |
* then a hash of the incoming call is returned unless |
* the timeout expires prior to receiving a message. In |
* that case zero is returned. |
*/ |
ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs) |
{ |
msg_t *msg; |
ipc_callid_t callid; |
connection_t *conn; |
assert(FIBRIL_connection); |
/* Why doing this? |
* GCC 4.1.0 coughs on FIBRIL_connection-> dereference. |
/* GCC 4.1.0 coughs on FIBRIL_connection-> dereference, |
* GCC 4.1.1 happilly puts the rdhwr instruction in delay slot. |
* I would never expect to find so many errors in |
* a compiler. |
* I would never expect to find so many errors in |
* a compiler *($&$(*&$ |
*/ |
connection_t *conn = FIBRIL_connection; |
conn = FIBRIL_connection; |
futex_down(&async_futex); |
if (usecs) { |
gettimeofday(&conn->wdata.expires, NULL); |
tv_add(&conn->wdata.expires, usecs); |
} else |
conn->wdata.inlist = false; |
} else { |
conn->wdata.inlist = 0; |
} |
/* If nothing in queue, wait until something arrives */ |
while (list_empty(&conn->msg_queue)) { |
if (usecs) |
insert_timeout(&conn->wdata); |
conn->wdata.active = false; |
conn->wdata.active = 0; |
/* |
* Note: the current fibril will be rescheduled either due to a |
* timeout or due to an arriving message destined to it. In the |
420,14 → 375,13 |
* case, route_call() will perform the wakeup. |
*/ |
fibril_switch(FIBRIL_TO_MANAGER); |
/* |
* Futex is up after getting back from async_manager. |
* Get it again. |
* Futex is up after getting back from async_manager get it |
* again. |
*/ |
futex_down(&async_futex); |
if ((usecs) && (conn->wdata.timedout) |
&& (list_empty(&conn->msg_queue))) { |
if (usecs && conn->wdata.timedout && |
list_empty(&conn->msg_queue)) { |
/* If we timed out -> exit */ |
futex_up(&async_futex); |
return 0; |
434,10 → 388,9 |
} |
} |
msg_t *msg = list_get_instance(conn->msg_queue.next, msg_t, link); |
msg = list_get_instance(conn->msg_queue.next, msg_t, link); |
list_remove(&msg->link); |
ipc_callid_t callid = msg->callid; |
callid = msg->callid; |
*call = msg->call; |
free(msg); |
449,9 → 402,8 |
* |
* This function is defined as a weak symbol - to be redefined in user code. |
* |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
* |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
*/ |
static void default_client_connection(ipc_callid_t callid, ipc_call_t *call) |
{ |
460,11 → 412,8 |
/** Default fibril function that gets called to handle interrupt notifications. |
* |
* This function is defined as a weak symbol - to be redefined in user code. |
* |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
* |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
*/ |
static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call) |
{ |
475,17 → 424,17 |
* When a new connection arrives, a fibril with this implementing function is |
* created. It calls client_connection() and does the final cleanup. |
* |
* @param arg Connection structure pointer. |
* @param arg Connection structure pointer. |
* |
* @return Always zero. |
* |
* @return Always zero. |
*/ |
static int connection_fibril(void *arg) |
static int connection_fibril(void *arg) |
{ |
/* |
* Setup fibril-local connection pointer and call client_connection(). |
* |
*/ |
unsigned long key; |
msg_t *msg; |
int close_answered = 0; |
/* Setup fibril-local connection pointer */ |
FIBRIL_connection = (connection_t *) arg; |
FIBRIL_connection->cfibril(FIBRIL_connection->callid, |
&FIBRIL_connection->call); |
492,21 → 441,20 |
/* Remove myself from the connection hash table */ |
futex_down(&async_futex); |
unsigned long key = FIBRIL_connection->in_phone_hash; |
key = FIBRIL_connection->in_phone_hash; |
hash_table_remove(&conn_hash_table, &key, 1); |
futex_up(&async_futex); |
/* Answer all remaining messages with EHANGUP */ |
while (!list_empty(&FIBRIL_connection->msg_queue)) { |
msg_t *msg; |
msg = list_get_instance(FIBRIL_connection->msg_queue.next, |
msg_t, link); |
list_remove(&msg->link); |
if (msg->callid == FIBRIL_connection->close_callid) |
close_answered = 1; |
ipc_answer_0(msg->callid, EHANGUP); |
free(msg); |
} |
if (FIBRIL_connection->close_callid) |
ipc_answer_0(FIBRIL_connection->close_callid, EOK); |
515,45 → 463,43 |
/** Create a new fibril for a new connection. |
* |
* Create new fibril for connection, fill in connection structures and inserts |
* Creates new fibril for connection, fills in connection structures and inserts |
* it into the hash table, so that later we can easily do routing of messages to |
* particular fibrils. |
* |
* @param in_phone_hash Identification of the incoming connection. |
* @param callid Hash of the opening IPC_M_CONNECT_ME_TO call. |
* If callid is zero, the connection was opened by |
* accepting the IPC_M_CONNECT_TO_ME call and this function |
* is called directly by the server. |
* @param call Call data of the opening call. |
* @param cfibril Fibril function that should be called upon opening the |
* connection. |
* @param in_phone_hash Identification of the incoming connection. |
* @param callid Hash of the opening IPC_M_CONNECT_ME_TO call. |
* If callid is zero, the connection was opened by |
* accepting the IPC_M_CONNECT_TO_ME call and this function |
* is called directly by the server. |
* @param call Call data of the opening call. |
* @param cfibril Fibril function that should be called upon opening the |
* connection. |
* |
* @return New fibril id or NULL on failure. |
* |
* @return New fibril id or NULL on failure. |
*/ |
fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid, |
ipc_call_t *call, void (*cfibril)(ipc_callid_t, ipc_call_t *)) |
{ |
connection_t *conn = malloc(sizeof(*conn)); |
connection_t *conn; |
unsigned long key; |
conn = malloc(sizeof(*conn)); |
if (!conn) { |
if (callid) |
ipc_answer_0(callid, ENOMEM); |
return NULL; |
} |
conn->in_phone_hash = in_phone_hash; |
list_initialize(&conn->msg_queue); |
conn->callid = callid; |
conn->close_callid = false; |
conn->close_callid = 0; |
if (call) |
conn->call = *call; |
/* We will activate the fibril ASAP */ |
conn->wdata.active = true; |
conn->wdata.active = 1; /* We will activate the fibril ASAP */ |
conn->cfibril = cfibril; |
conn->wdata.fid = fibril_create(connection_fibril, conn); |
if (!conn->wdata.fid) { |
free(conn); |
if (callid) |
560,16 → 506,14 |
ipc_answer_0(callid, ENOMEM); |
return NULL; |
} |
/* Add connection to the connection hash table */ |
unsigned long key = conn->in_phone_hash; |
key = conn->in_phone_hash; |
futex_down(&async_futex); |
hash_table_insert(&conn_hash_table, &key, &conn->link); |
futex_up(&async_futex); |
fibril_add_ready(conn->wdata.fid); |
return conn->wdata.fid; |
} |
578,37 → 522,33 |
* If the call has the IPC_M_CONNECT_ME_TO method, a new connection is created. |
* Otherwise the call is routed to its connection fibril. |
* |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
* |
* @param callid Hash of the incoming call. |
* @param call Data of the incoming call. |
*/ |
static void handle_call(ipc_callid_t callid, ipc_call_t *call) |
{ |
/* Unrouted call - do some default behaviour */ |
if ((callid & IPC_CALLID_NOTIFICATION)) { |
process_notification(callid, call); |
goto out; |
} |
_in_interrupt_handler = 1; |
(*interrupt_received)(callid, call); |
_in_interrupt_handler = 0; |
return; |
} |
switch (IPC_GET_METHOD(*call)) { |
case IPC_M_CONNECT_ME: |
case IPC_M_CONNECT_ME_TO: |
/* Open new connection with fibril etc. */ |
async_new_connection(IPC_GET_ARG5(*call), callid, call, |
client_connection); |
goto out; |
return; |
} |
/* Try to route the call through the connection hash table */ |
if (route_call(callid, call)) |
goto out; |
return; |
/* Unknown call from unknown phone - hang it up */ |
ipc_answer_0(callid, EHANGUP); |
return; |
out: |
; |
} |
/** Fire all timeouts that expired. */ |
615,44 → 555,47 |
static void handle_expired_timeouts(void) |
{ |
struct timeval tv; |
awaiter_t *waiter; |
link_t *cur; |
gettimeofday(&tv, NULL); |
futex_down(&async_futex); |
link_t *cur = timeout_list.next; |
cur = timeout_list.next; |
while (cur != &timeout_list) { |
awaiter_t *waiter = list_get_instance(cur, awaiter_t, link); |
waiter = list_get_instance(cur, awaiter_t, link); |
if (tv_gt(&waiter->expires, &tv)) |
break; |
cur = cur->next; |
list_remove(&waiter->link); |
waiter->inlist = false; |
waiter->timedout = true; |
waiter->inlist = 0; |
waiter->timedout = 1; |
/* |
* Redundant condition? |
* The fibril should not be active when it gets here. |
* Redundant condition? |
* The fibril should not be active when it gets here. |
*/ |
if (!waiter->active) { |
waiter->active = true; |
waiter->active = 1; |
fibril_add_ready(waiter->fid); |
} |
} |
futex_up(&async_futex); |
} |
/** Endless loop dispatching incoming calls and answers. |
* |
* @return Never returns. |
* |
* @return Never returns. |
*/ |
static int async_manager_worker(void) |
{ |
while (true) { |
ipc_call_t call; |
ipc_callid_t callid; |
int timeout; |
awaiter_t *waiter; |
struct timeval tv; |
while (1) { |
if (fibril_switch(FIBRIL_FROM_MANAGER)) { |
futex_up(&async_futex); |
/* |
661,17 → 604,11 |
*/ |
continue; |
} |
futex_down(&async_futex); |
suseconds_t timeout; |
if (!list_empty(&timeout_list)) { |
awaiter_t *waiter = list_get_instance(timeout_list.next, |
awaiter_t, link); |
struct timeval tv; |
waiter = list_get_instance(timeout_list.next, awaiter_t, |
link); |
gettimeofday(&tv, NULL); |
if (tv_gteq(&tv, &waiter->expires)) { |
futex_up(&async_futex); |
handle_expired_timeouts(); |
680,21 → 617,19 |
timeout = tv_sub(&waiter->expires, &tv); |
} else |
timeout = SYNCH_NO_TIMEOUT; |
futex_up(&async_futex); |
ipc_call_t call; |
ipc_callid_t callid = ipc_wait_cycle(&call, timeout, |
SYNCH_FLAGS_NONE); |
callid = ipc_wait_cycle(&call, timeout, SYNCH_FLAGS_NONE); |
if (!callid) { |
handle_expired_timeouts(); |
continue; |
} |
if (callid & IPC_CALLID_ANSWERED) |
if (callid & IPC_CALLID_ANSWERED) { |
continue; |
} |
handle_call(callid, &call); |
} |
702,17 → 637,16 |
} |
/** Function to start async_manager as a standalone fibril. |
* |
* |
* When more kernel threads are used, one async manager should exist per thread. |
* |
* @param arg Unused. |
* @return Never returns. |
* @param arg Unused. |
* |
* @return Never returns. |
*/ |
static int async_manager_fibril(void *arg) |
{ |
futex_up(&async_futex); |
/* |
* async_futex is always locked when entering manager |
*/ |
724,7 → 658,9 |
/** Add one manager to manager list. */ |
void async_create_manager(void) |
{ |
fid_t fid = fibril_create(async_manager_fibril, NULL); |
fid_t fid; |
fid = fibril_create(async_manager_fibril, NULL); |
fibril_add_manager(fid); |
} |
736,9 → 672,9 |
/** Initialize the async framework. |
* |
* @return Zero on success or an error code. |
* @return Zero on success or an error code. |
*/ |
int __async_init(void) |
int _async_init(void) |
{ |
if (!hash_table_create(&conn_hash_table, CONN_HASH_TABLE_CHAINS, 1, |
&conn_hash_table_ops)) { |
756,33 → 692,30 |
* |
* Notify the fibril which is waiting for this message that it has arrived. |
* |
* @param arg Pointer to the asynchronous message record. |
* @param retval Value returned in the answer. |
* @param data Call data of the answer. |
* @param private Pointer to the asynchronous message record. |
* @param retval Value returned in the answer. |
* @param data Call data of the answer. |
*/ |
static void reply_received(void *arg, int retval, ipc_call_t *data) |
static void reply_received(void *private, int retval, ipc_call_t *data) |
{ |
amsg_t *msg = (amsg_t *) private; |
msg->retval = retval; |
futex_down(&async_futex); |
amsg_t *msg = (amsg_t *) arg; |
msg->retval = retval; |
/* Copy data after futex_down, just in case the call was detached */ |
if ((msg->dataptr) && (data)) |
*msg->dataptr = *data; |
if (msg->dataptr) |
*msg->dataptr = *data; |
write_barrier(); |
/* Remove message from timeout list */ |
if (msg->wdata.inlist) |
list_remove(&msg->wdata.link); |
msg->done = true; |
msg->done = 1; |
if (!msg->wdata.active) { |
msg->wdata.active = true; |
msg->wdata.active = 1; |
fibril_add_ready(msg->wdata.fid); |
} |
futex_up(&async_futex); |
} |
791,36 → 724,38 |
* The return value can be used as input for async_wait() to wait for |
* completion. |
* |
* @param phoneid Handle of the phone that will be used for the send. |
* @param method Service-defined method. |
* @param arg1 Service-defined payload argument. |
* @param arg2 Service-defined payload argument. |
* @param arg3 Service-defined payload argument. |
* @param arg4 Service-defined payload argument. |
* @param dataptr If non-NULL, storage where the reply data will be |
* stored. |
* @param phoneid Handle of the phone that will be used for the send. |
* @param method Service-defined method. |
* @param arg1 Service-defined payload argument. |
* @param arg2 Service-defined payload argument. |
* @param arg3 Service-defined payload argument. |
* @param arg4 Service-defined payload argument. |
* @param dataptr If non-NULL, storage where the reply data will be |
* stored. |
* |
* @return Hash of the sent message or 0 on error. |
* |
* @return Hash of the sent message. |
*/ |
aid_t async_send_fast(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr) |
{ |
amsg_t *msg = malloc(sizeof(*msg)); |
if (!msg) |
return 0; |
msg->done = false; |
amsg_t *msg; |
if (_in_interrupt_handler) { |
printf("Cannot send asynchronous request in interrupt " |
"handler.\n"); |
_exit(1); |
} |
msg = malloc(sizeof(*msg)); |
msg->done = 0; |
msg->dataptr = dataptr; |
msg->wdata.inlist = false; |
/* We may sleep in the next method, but it will use its own mechanism */ |
msg->wdata.active = true; |
msg->wdata.active = 1; |
ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, msg, |
reply_received, true); |
reply_received, 1); |
return (aid_t) msg; |
} |
829,119 → 764,113 |
* The return value can be used as input for async_wait() to wait for |
* completion. |
* |
* @param phoneid Handle of the phone that will be used for the send. |
* @param method Service-defined method. |
* @param arg1 Service-defined payload argument. |
* @param arg2 Service-defined payload argument. |
* @param arg3 Service-defined payload argument. |
* @param arg4 Service-defined payload argument. |
* @param arg5 Service-defined payload argument. |
* @param dataptr If non-NULL, storage where the reply data will be |
* stored. |
* @param phoneid Handle of the phone that will be used for the send. |
* @param method Service-defined method. |
* @param arg1 Service-defined payload argument. |
* @param arg2 Service-defined payload argument. |
* @param arg3 Service-defined payload argument. |
* @param arg4 Service-defined payload argument. |
* @param arg5 Service-defined payload argument. |
* @param dataptr If non-NULL, storage where the reply data will be |
* stored. |
* |
* @return Hash of the sent message or 0 on error. |
* |
* @return Hash of the sent message. |
*/ |
aid_t async_send_slow(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, |
ipc_call_t *dataptr) |
{ |
amsg_t *msg = malloc(sizeof(*msg)); |
if (!msg) |
return 0; |
msg->done = false; |
amsg_t *msg; |
if (_in_interrupt_handler) { |
printf("Cannot send asynchronous request in interrupt " |
"handler.\n"); |
_exit(1); |
} |
msg = malloc(sizeof(*msg)); |
msg->done = 0; |
msg->dataptr = dataptr; |
msg->wdata.inlist = false; |
/* We may sleep in next method, but it will use its own mechanism */ |
msg->wdata.active = true; |
msg->wdata.active = 1; |
ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, msg, |
reply_received, true); |
reply_received, 1); |
return (aid_t) msg; |
} |
/** Wait for a message sent by the async framework. |
* |
* @param amsgid Hash of the message to wait for. |
* @param retval Pointer to storage where the retval of the answer will |
* be stored. |
* |
* @param amsgid Hash of the message to wait for. |
* @param retval Pointer to storage where the retval of the answer will |
* be stored. |
*/ |
void async_wait_for(aid_t amsgid, ipcarg_t *retval) |
{ |
amsg_t *msg = (amsg_t *) amsgid; |
futex_down(&async_futex); |
if (msg->done) { |
futex_up(&async_futex); |
goto done; |
} |
msg->wdata.fid = fibril_get_id(); |
msg->wdata.active = false; |
msg->wdata.inlist = false; |
msg->wdata.active = 0; |
msg->wdata.inlist = 0; |
/* Leave the async_futex locked when entering this function */ |
fibril_switch(FIBRIL_TO_MANAGER); |
/* Futex is up automatically after fibril_switch */ |
/* futex is up automatically after fibril_switch...*/ |
done: |
if (retval) |
*retval = msg->retval; |
free(msg); |
} |
/** Wait for a message sent by the async framework, timeout variant. |
* |
* @param amsgid Hash of the message to wait for. |
* @param retval Pointer to storage where the retval of the answer will |
* be stored. |
* @param timeout Timeout in microseconds. |
* @param amsgid Hash of the message to wait for. |
* @param retval Pointer to storage where the retval of the answer will |
* be stored. |
* @param timeout Timeout in microseconds. |
* |
* @return Zero on success, ETIMEOUT if the timeout has expired. |
* |
* @return Zero on success, ETIMEOUT if the timeout has expired. |
*/ |
int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout) |
{ |
amsg_t *msg = (amsg_t *) amsgid; |
/* TODO: Let it go through the event read at least once */ |
if (timeout < 0) |
return ETIMEOUT; |
futex_down(&async_futex); |
if (msg->done) { |
futex_up(&async_futex); |
goto done; |
} |
gettimeofday(&msg->wdata.expires, NULL); |
tv_add(&msg->wdata.expires, timeout); |
msg->wdata.fid = fibril_get_id(); |
msg->wdata.active = false; |
msg->wdata.active = 0; |
insert_timeout(&msg->wdata); |
/* Leave the async_futex locked when entering this function */ |
fibril_switch(FIBRIL_TO_MANAGER); |
/* Futex is up automatically after fibril_switch */ |
/* futex is up automatically after fibril_switch...*/ |
if (!msg->done) |
return ETIMEOUT; |
done: |
if (retval) |
*retval = msg->retval; |
free(msg); |
return 0; |
} |
949,38 → 878,38 |
* |
* The current fibril is suspended but the thread continues to execute. |
* |
* @param timeout Duration of the wait in microseconds. |
* |
* @param timeout Duration of the wait in microseconds. |
*/ |
void async_usleep(suseconds_t timeout) |
{ |
amsg_t *msg = malloc(sizeof(*msg)); |
amsg_t *msg; |
if (_in_interrupt_handler) { |
printf("Cannot call async_usleep in interrupt handler.\n"); |
_exit(1); |
} |
msg = malloc(sizeof(*msg)); |
if (!msg) |
return; |
msg->wdata.fid = fibril_get_id(); |
msg->wdata.active = false; |
msg->wdata.active = 0; |
gettimeofday(&msg->wdata.expires, NULL); |
tv_add(&msg->wdata.expires, timeout); |
futex_down(&async_futex); |
insert_timeout(&msg->wdata); |
/* Leave the async_futex locked when entering this function */ |
fibril_switch(FIBRIL_TO_MANAGER); |
/* Futex is up automatically after fibril_switch() */ |
/* futex is up automatically after fibril_switch()...*/ |
free(msg); |
} |
/** Setter for client_connection function pointer. |
* |
* @param conn Function that will implement a new connection fibril. |
* |
* @param conn Function that will implement a new connection fibril. |
*/ |
void async_set_client_connection(async_client_conn_t conn) |
{ |
989,12 → 918,12 |
/** Setter for interrupt_received function pointer. |
* |
* @param intr Function that will implement a new interrupt |
* notification fibril. |
* @param conn Function that will implement a new interrupt |
* notification fibril. |
*/ |
void async_set_interrupt_received(async_client_conn_t intr) |
void async_set_interrupt_received(async_client_conn_t conn) |
{ |
interrupt_received = intr; |
interrupt_received = conn; |
} |
/** Pseudo-synchronous message sending - fast version. |
1004,20 → 933,18 |
* This function can only transfer 4 register payload arguments. For |
* transferring more arguments, see the slower async_req_slow(). |
* |
* @param phoneid Hash of the phone through which to make the call. |
* @param method Method of the call. |
* @param arg1 Service-defined payload argument. |
* @param arg2 Service-defined payload argument. |
* @param arg3 Service-defined payload argument. |
* @param arg4 Service-defined payload argument. |
* @param r1 If non-NULL, storage for the 1st reply argument. |
* @param r2 If non-NULL, storage for the 2nd reply argument. |
* @param r3 If non-NULL, storage for the 3rd reply argument. |
* @param r4 If non-NULL, storage for the 4th reply argument. |
* @param r5 If non-NULL, storage for the 5th reply argument. |
* |
* @return Return code of the reply or a negative error code. |
* |
* @param phoneid Hash of the phone through which to make the call. |
* @param method Method of the call. |
* @param arg1 Service-defined payload argument. |
* @param arg2 Service-defined payload argument. |
* @param arg3 Service-defined payload argument. |
* @param arg4 Service-defined payload argument. |
* @param r1 If non-NULL, storage for the 1st reply argument. |
* @param r2 If non-NULL, storage for the 2nd reply argument. |
* @param r3 If non-NULL, storage for the 3rd reply argument. |
* @param r4 If non-NULL, storage for the 4th reply argument. |
* @param r5 If non-NULL, storage for the 5th reply argument. |
* @return Return code of the reply or a negative error code. |
*/ |
ipcarg_t async_req_fast(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t *r1, ipcarg_t *r2, |
1024,27 → 951,21 |
ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5) |
{ |
ipc_call_t result; |
ipcarg_t rc; |
aid_t eid = async_send_4(phoneid, method, arg1, arg2, arg3, arg4, |
&result); |
ipcarg_t rc; |
async_wait_for(eid, &rc); |
if (r1) |
if (r1) |
*r1 = IPC_GET_ARG1(result); |
if (r2) |
*r2 = IPC_GET_ARG2(result); |
if (r3) |
*r3 = IPC_GET_ARG3(result); |
if (r4) |
*r4 = IPC_GET_ARG4(result); |
if (r5) |
*r5 = IPC_GET_ARG5(result); |
return rc; |
} |
1052,21 → 973,19 |
* |
* Send message asynchronously and return only after the reply arrives. |
* |
* @param phoneid Hash of the phone through which to make the call. |
* @param method Method of the call. |
* @param arg1 Service-defined payload argument. |
* @param arg2 Service-defined payload argument. |
* @param arg3 Service-defined payload argument. |
* @param arg4 Service-defined payload argument. |
* @param arg5 Service-defined payload argument. |
* @param r1 If non-NULL, storage for the 1st reply argument. |
* @param r2 If non-NULL, storage for the 2nd reply argument. |
* @param r3 If non-NULL, storage for the 3rd reply argument. |
* @param r4 If non-NULL, storage for the 4th reply argument. |
* @param r5 If non-NULL, storage for the 5th reply argument. |
* |
* @return Return code of the reply or a negative error code. |
* |
* @param phoneid Hash of the phone through which to make the call. |
* @param method Method of the call. |
* @param arg1 Service-defined payload argument. |
* @param arg2 Service-defined payload argument. |
* @param arg3 Service-defined payload argument. |
* @param arg4 Service-defined payload argument. |
* @param arg5 Service-defined payload argument. |
* @param r1 If non-NULL, storage for the 1st reply argument. |
* @param r2 If non-NULL, storage for the 2nd reply argument. |
* @param r3 If non-NULL, storage for the 3rd reply argument. |
* @param r4 If non-NULL, storage for the 4th reply argument. |
* @param r5 If non-NULL, storage for the 5th reply argument. |
* @return Return code of the reply or a negative error code. |
*/ |
ipcarg_t async_req_slow(int phoneid, ipcarg_t method, ipcarg_t arg1, |
ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *r1, |
1073,27 → 992,21 |
ipcarg_t *r2, ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5) |
{ |
ipc_call_t result; |
ipcarg_t rc; |
aid_t eid = async_send_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, |
&result); |
ipcarg_t rc; |
async_wait_for(eid, &rc); |
if (r1) |
if (r1) |
*r1 = IPC_GET_ARG1(result); |
if (r2) |
*r2 = IPC_GET_ARG2(result); |
if (r3) |
*r3 = IPC_GET_ARG3(result); |
if (r4) |
*r4 = IPC_GET_ARG4(result); |
if (r5) |
*r5 = IPC_GET_ARG5(result); |
return rc; |
} |
/branches/arm/uspace/lib/libc/generic/fibril.c |
---|
33,7 → 33,7 |
/** @file |
*/ |
#include <adt/list.h> |
#include <libadt/list.h> |
#include <fibril.h> |
#include <thread.h> |
#include <tls.h> |
49,8 → 49,7 |
#define FIBRIL_INITIAL_STACK_PAGES_NO 1 |
#endif |
/** |
* This futex serializes access to ready_list, serialized_list and manager_list. |
/** This futex serializes access to ready_list, serialized_list and manage_list. |
*/ |
static atomic_t fibril_futex = FUTEX_INITIALIZER; |
60,12 → 59,12 |
static void fibril_main(void); |
/** Number of threads that are executing a manager fibril. */ |
static int threads_in_manager; |
/** Number of threads that are executing a manager fibril and are serialized. */ |
static int serialized_threads; /* Protected by async_futex */ |
/** Fibril-local count of serialization. If > 0, we must not preempt */ |
static fibril_local int serialization_count; |
/** Number of fibrils that are in async_serialized mode */ |
static int serialized_fibrils; /* Protected by async_futex */ |
/** Thread-local count of serialization. If >0, we must not preempt */ |
static __thread int serialization_count; |
/** Counter for fibrils residing in async_manager */ |
static int fibrils_in_manager; |
/** Setup fibril information into TCB structure */ |
fibril_t *fibril_setup(void) |
144,11 → 143,11 |
if (list_empty(&ready_list) && list_empty(&serialized_list)) |
goto ret_0; |
/* |
* Do not preempt if there is not enough threads to run the |
* ready fibrils which are not serialized. |
* Do not preempt if there is not sufficient count of fibril |
* managers. |
*/ |
if (list_empty(&serialized_list) && |
threads_in_manager <= serialized_threads) { |
fibrils_in_manager <= serialized_fibrils) { |
goto ret_0; |
} |
} |
195,7 → 194,7 |
list_append(&srcf->link, &ready_list); |
else if (stype == FIBRIL_FROM_MANAGER) { |
list_append(&srcf->link, &manager_list); |
threads_in_manager--; |
fibrils_in_manager--; |
} else { |
/* |
* If stype == FIBRIL_TO_MANAGER, don't put ourselves to |
209,10 → 208,10 |
if (stype == FIBRIL_TO_MANAGER || stype == FIBRIL_FROM_DEAD) { |
dstf = list_get_instance(manager_list.next, fibril_t, link); |
if (serialization_count && stype == FIBRIL_TO_MANAGER) { |
serialized_threads++; |
serialized_fibrils++; |
srcf->flags |= FIBRIL_SERIALIZED; |
} |
threads_in_manager++; |
fibrils_in_manager++; |
if (stype == FIBRIL_FROM_DEAD) |
dstf->clean_after_me = srcf; |
220,7 → 219,7 |
if (!list_empty(&serialized_list)) { |
dstf = list_get_instance(serialized_list.next, fibril_t, |
link); |
serialized_threads--; |
serialized_fibrils--; |
} else { |
dstf = list_get_instance(ready_list.next, fibril_t, |
link); |
270,7 → 269,7 |
/** Add a fibril to the ready list. |
* |
* @param fid Pointer to the fibril structure of the fibril to be |
* @param fid Pinter to the fibril structure of the fibril to be |
* added. |
*/ |
void fibril_add_ready(fid_t fid) |
288,8 → 287,7 |
/** Add a fibril to the manager list. |
* |
* @param fid Pointer to the fibril structure of the fibril to be |
* added. |
* @param fid Pinter to the fibril structure of the fibril to be added. |
*/ |
void fibril_add_manager(fid_t fid) |
{ |
316,8 → 314,7 |
/** Return fibril id of the currently running fibril. |
* |
* @return fibril ID of the currently running fibril. |
* |
* @return Fibril ID of the currently running pseudo thread. |
*/ |
fid_t fibril_get_id(void) |
{ |
324,14 → 321,13 |
return (fid_t) __tcb_get()->fibril_data; |
} |
/** Disable preemption |
/** Disable preemption |
* |
* If the fibril wants to send several message in a row and does not want to be |
* preempted, it should start async_serialize_start() in the beginning of |
* communication and async_serialize_end() in the end. If it is a true |
* multithreaded application, it should protect the communication channel by a |
* futex as well. |
* |
* futex as well. Interrupt messages can still be preempted. |
*/ |
void fibril_inc_sercount(void) |
{ |
/branches/arm/uspace/lib/libc/generic/libadt/hash_table.c |
---|
0,0 → 1,196 |
/* |
* Copyright (c) 2008 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
/* |
* This is an implementation of generic chained hash table. |
*/ |
#include <libadt/hash_table.h> |
#include <libadt/list.h> |
#include <unistd.h> |
#include <malloc.h> |
#include <assert.h> |
#include <stdio.h> |
#include <string.h> |
/** Create chained hash table. |
* |
* @param h Hash table structure. Will be initialized by this call. |
* @param m Number of hash table buckets. |
* @param max_keys Maximal number of keys needed to identify an item. |
* @param op Hash table operations structure. |
* @return True on success |
*/ |
int hash_table_create(hash_table_t *h, hash_count_t m, hash_count_t max_keys, |
hash_table_operations_t *op) |
{ |
hash_count_t i; |
assert(h); |
assert(op && op->hash && op->compare); |
assert(max_keys > 0); |
h->entry = malloc(m * sizeof(link_t)); |
if (!h->entry) { |
printf("cannot allocate memory for hash table\n"); |
return false; |
} |
memset((void *) h->entry, 0, m * sizeof(link_t)); |
for (i = 0; i < m; i++) |
list_initialize(&h->entry[i]); |
h->entries = m; |
h->max_keys = max_keys; |
h->op = op; |
return true; |
} |
/** Destroy a hash table instance. |
* |
* @param h Hash table to be destroyed. |
*/ |
void hash_table_destroy(hash_table_t *h) |
{ |
assert(h); |
assert(h->entry); |
free(h->entry); |
} |
/** Insert item into a hash table. |
* |
* @param h Hash table. |
* @param key Array of all keys necessary to compute hash index. |
* @param item Item to be inserted into the hash table. |
*/ |
void hash_table_insert(hash_table_t *h, unsigned long key[], link_t *item) |
{ |
hash_index_t chain; |
assert(item); |
assert(h && h->op && h->op->hash && h->op->compare); |
chain = h->op->hash(key); |
assert(chain < h->entries); |
list_append(item, &h->entry[chain]); |
} |
/** Search hash table for an item matching keys. |
* |
* @param h Hash table. |
* @param key Array of all keys needed to compute hash index. |
* |
* @return Matching item on success, NULL if there is no such item. |
*/ |
link_t *hash_table_find(hash_table_t *h, unsigned long key[]) |
{ |
link_t *cur; |
hash_index_t chain; |
assert(h && h->op && h->op->hash && h->op->compare); |
chain = h->op->hash(key); |
assert(chain < h->entries); |
for (cur = h->entry[chain].next; cur != &h->entry[chain]; |
cur = cur->next) { |
if (h->op->compare(key, h->max_keys, cur)) { |
/* |
* The entry is there. |
*/ |
return cur; |
} |
} |
return NULL; |
} |
/** Remove all matching items from hash table. |
* |
* For each removed item, h->remove_callback() is called. |
* |
* @param h Hash table. |
* @param key Array of keys that will be compared against items of |
* the hash table. |
* @param keys Number of keys in the 'key' array. |
*/ |
void hash_table_remove(hash_table_t *h, unsigned long key[], hash_count_t keys) |
{ |
hash_index_t chain; |
link_t *cur; |
assert(h && h->op && h->op->hash && h->op->compare && |
h->op->remove_callback); |
assert(keys <= h->max_keys); |
if (keys == h->max_keys) { |
/* |
* All keys are known, hash_table_find() can be used to find the |
* entry. |
*/ |
cur = hash_table_find(h, key); |
if (cur) { |
list_remove(cur); |
h->op->remove_callback(cur); |
} |
return; |
} |
/* |
* Fewer keys were passed. |
* Any partially matching entries are to be removed. |
*/ |
for (chain = 0; chain < h->entries; chain++) { |
for (cur = h->entry[chain].next; cur != &h->entry[chain]; |
cur = cur->next) { |
if (h->op->compare(key, keys, cur)) { |
link_t *hlp; |
hlp = cur; |
cur = cur->prev; |
list_remove(hlp); |
h->op->remove_callback(hlp); |
continue; |
} |
} |
} |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/libadt/list.c |
---|
0,0 → 1,89 |
/* |
* Copyright (c) 2004 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
*/ |
#include <libadt/list.h> |
/** Check for membership |
* |
* Check whether link is contained in the list head. |
* The membership is defined as pointer equivalence. |
* |
* @param link Item to look for. |
* @param head List to look in. |
* |
* @return true if link is contained in head, false otherwise. |
* |
*/ |
int list_member(const link_t *link, const link_t *head) |
{ |
int found = false; |
link_t *hlp = head->next; |
while (hlp != head) { |
if (hlp == link) { |
found = true; |
break; |
} |
hlp = hlp->next; |
} |
return found; |
} |
/** Concatenate two lists |
* |
* Concatenate lists head1 and head2, producing a single |
* list head1 containing items from both (in head1, head2 |
* order) and empty list head2. |
* |
* @param head1 First list and concatenated output |
* @param head2 Second list and empty output. |
* |
*/ |
void list_concat(link_t *head1, link_t *head2) |
{ |
if (list_empty(head2)) |
return; |
head2->next->prev = head1->prev; |
head2->prev->next = head1; |
head1->prev->next = head2->next; |
head1->prev = head2->prev; |
list_initialize(head2); |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/time.c |
---|
47,8 → 47,6 |
#include <as.h> |
#include <ddi.h> |
#include <time.h> |
/* Pointers to public variables with time */ |
struct { |
volatile sysarg_t seconds1; |
/branches/arm/uspace/lib/libc/generic/tls.c |
---|
116,7 → 116,7 |
tcb_t *tcb; |
size = ALIGN_UP(size, &_tls_alignment); |
*data = memalign((uintptr_t) &_tls_alignment, sizeof(tcb_t) + size); |
*data = memalign(&_tls_alignment, sizeof(tcb_t) + size); |
tcb = (tcb_t *) (*data + size); |
tcb->self = tcb; |
/branches/arm/uspace/lib/libc/generic/thread.c |
---|
108,8 → 108,8 |
uarg->uspace_thread_arg = arg; |
uarg->uspace_uarg = uarg; |
rc = __SYSCALL4(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name, |
(sysarg_t) str_size(name), (sysarg_t) tid); |
rc = __SYSCALL3(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name, |
(sysarg_t) tid); |
if (rc) { |
/* |
130,8 → 130,6 |
void thread_exit(int status) |
{ |
__SYSCALL1(SYS_THREAD_EXIT, (sysarg_t) status); |
for (;;) |
; |
} |
/** Detach thread. |
154,7 → 152,6 |
*/ |
int thread_join(thread_id_t thread) |
{ |
return 0; |
} |
/** Get current thread ID. |
/branches/arm/uspace/lib/libc/generic/mman.c |
---|
37,18 → 37,17 |
#include <as.h> |
#include <unistd.h> |
void *mmap(void *start, size_t length, int prot, int flags, int fd, |
void *mmap(void *start, size_t length, int prot, int flags, int fd, |
off_t offset) |
{ |
if (!start) |
start = as_get_mappable_page(length); |
// if (!((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE))) |
// if (! ((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE))) |
// return MAP_FAILED; |
if (!(flags & MAP_ANONYMOUS)) |
if (! (flags & MAP_ANONYMOUS)) |
return MAP_FAILED; |
return as_area_create(start, length, prot); |
} |
/branches/arm/uspace/lib/libc/generic/ddi.c |
---|
33,42 → 33,26 |
*/ |
#include <ddi.h> |
#include <libarch/ddi.h> |
#include <libc.h> |
#include <task.h> |
#include <as.h> |
#include <align.h> |
#include <libarch/config.h> |
#include <kernel/ddi/ddi_arg.h> |
/** Return unique device number. |
* |
* @return New unique device number. |
* |
*/ |
int device_assign_devno(void) |
{ |
return __SYSCALL0(SYS_DEVICE_ASSIGN_DEVNO); |
} |
/** Map piece of physical memory to task. |
* |
* Caller of this function must have the CAP_MEM_MANAGER capability. |
* |
* @param pf Physical address of the starting frame. |
* @param vp Virtual address of the starting page. |
* @param pages Number of pages to map. |
* @param flags Flags for the new address space area. |
* @param pf Physical address of the starting frame. |
* @param vp Virtual address of the sterting page. |
* @param pages Number of pages to map. |
* @param flags Flags for the new address space area. |
* |
* @return 0 on success, EPERM if the caller lacks the |
* CAP_MEM_MANAGER capability, ENOENT if there is no task |
* with specified ID and ENOMEM if there was some problem |
* in creating address space area. |
* @return 0 on success, EPERM if the caller lacks the CAP_MEM_MANAGER capability, |
* ENOENT if there is no task with specified ID and ENOMEM if there |
* was some problem in creating address space area. |
*/ |
int physmem_map(void *pf, void *vp, unsigned long pages, int flags) |
{ |
return __SYSCALL4(SYS_PHYSMEM_MAP, (sysarg_t) pf, (sysarg_t) vp, pages, |
flags); |
return __SYSCALL4(SYS_PHYSMEM_MAP, (sysarg_t) pf, (sysarg_t) vp, pages, flags); |
} |
/** Enable I/O space range to task. |
75,14 → 59,13 |
* |
* Caller of this function must have the IO_MEM_MANAGER capability. |
* |
* @param id Task ID. |
* @param ioaddr Starting address of the I/O range. |
* @param size Size of the range. |
* @param id Task ID. |
* @param ioaddr Starting address of the I/O range. |
* @param size Size of the range. |
* |
* @return 0 on success, EPERM if the caller lacks the |
* CAP_IO_MANAGER capability, ENOENT if there is no task |
* with specified ID and ENOMEM if there was some problem |
* in allocating memory. |
* @return 0 on success, EPERM if the caller lacks the CAP_IO_MANAGER capability, |
* ENOENT if there is no task with specified ID and ENOMEM if there |
* was some problem in allocating memory. |
*/ |
int iospace_enable(task_id_t id, void *ioaddr, unsigned long size) |
{ |
97,7 → 80,7 |
/** Interrupt control |
* |
* @param enable 1 - enable interrupts, 0 - disable interrupts |
* @param enable 1 - enable interrupts, 0 - disable interrupts |
*/ |
int preemption_control(int enable) |
{ |
104,36 → 87,5 |
return __SYSCALL1(SYS_PREEMPT_CONTROL, (sysarg_t) enable); |
} |
/** Enable PIO for specified I/O range. |
* |
* @param pio_addr I/O start address. |
* @param size Size of the I/O region. |
* @param use_addr Address where the final address for application's PIO |
* will be stored. |
* |
* @return Zero on success or negative error code. |
*/ |
int pio_enable(void *pio_addr, size_t size, void **use_addr) |
{ |
void *phys; |
void *virt; |
size_t offset; |
unsigned int pages; |
#ifdef IO_SPACE_BOUNDARY |
if (pio_addr < IO_SPACE_BOUNDARY) { |
*use_addr = pio_addr; |
return iospace_enable(task_get_id(), pio_addr, size); |
} |
#endif |
phys = (void *) ALIGN_DOWN((uintptr_t) pio_addr, PAGE_SIZE); |
offset = pio_addr - phys; |
pages = ALIGN_UP(offset + size, PAGE_SIZE) >> PAGE_WIDTH; |
virt = as_get_mappable_page(pages << PAGE_WIDTH); |
*use_addr = virt + offset; |
return physmem_map(phys, virt, pages, AS_AREA_READ | AS_AREA_WRITE); |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/generic/sysinfo.c |
---|
38,8 → 38,7 |
sysarg_t sysinfo_value(char *name) |
{ |
return __SYSCALL2(SYS_SYSINFO_VALUE, (sysarg_t ) name, |
(sysarg_t) str_size(name)); |
return __SYSCALL2(SYS_SYSINFO_VALUE, (sysarg_t ) name, (sysarg_t) strlen(name)); |
} |
/** @} |
/branches/arm/uspace/lib/libc/Makefile |
---|
31,29 → 31,26 |
LIBC_PREFIX = $(shell pwd) |
SOFTINT_PREFIX = ../softint |
CONSOLE_PREFIX = ../../srv/console |
## Setup toolchain |
# |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -I$(CONSOLE_PREFIX) |
## Sources |
# |
GENERIC_SOURCES = \ |
generic/libc.c \ |
generic/ddi.c \ |
generic/as.c \ |
generic/cap.c \ |
generic/devmap.c \ |
generic/event.c \ |
generic/errno.c \ |
generic/mem.c \ |
generic/string.c \ |
generic/fibril.c \ |
generic/fibril_sync.c \ |
generic/pcb.c \ |
generic/smc.c \ |
generic/thread.c \ |
63,20 → 60,21 |
generic/io/asprintf.c \ |
generic/io/io.c \ |
generic/io/printf.c \ |
generic/io/klog.c \ |
generic/io/stream.c \ |
generic/io/sprintf.c \ |
generic/io/snprintf.c \ |
generic/io/vprintf.c \ |
generic/io/vsprintf.c \ |
generic/io/vsnprintf.c \ |
generic/io/printf_core.c \ |
generic/io/console.c \ |
generic/malloc.c \ |
malloc/malloc.c \ |
generic/sysinfo.c \ |
generic/ipc.c \ |
generic/async.c \ |
generic/loader.c \ |
generic/getopt.c \ |
generic/adt/list.o \ |
generic/adt/hash_table.o \ |
generic/libadt/list.o \ |
generic/libadt/hash_table.o \ |
generic/time.c \ |
generic/err.c \ |
generic/stdlib.c \ |
86,35 → 84,34 |
generic/vfs/canonify.c |
ARCH_SOURCES += \ |
arch/$(UARCH)/src/entry.s \ |
arch/$(UARCH)/src/thread_entry.s |
arch/$(ARCH)/src/entry.s \ |
arch/$(ARCH)/src/thread_entry.s |
GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
OBJECTS := $(GENERIC_OBJECTS) $(ARCH_OBJECTS) |
.PHONY: all clean depend kerninc |
all: kerninc libc.a arch/$(UARCH)/_link.ld |
all: kerninc libc.a arch/$(ARCH)/_link.ld |
kerninc: |
ln -sfn ../../../../kernel/generic/include include/kernel |
ln -sfn kernel/arch include/arch |
ln -sfn ../arch/$(UARCH)/include include/libarch |
ln -sfn ../arch/$(ARCH)/include include/libarch |
-include Makefile.depend |
clean: |
-rm -f include/kernel include/arch include/libarch libc.a arch/$(UARCH)/_link.ld Makefile.depend |
find generic/ arch/$(UARCH)/ -name '*.o' -follow -exec rm \{\} \; |
-rm -f include/kernel include/arch include/libarch libc.a arch/$(ARCH)/_link.ld Makefile.depend |
find generic/ arch/$(ARCH)/ -name '*.o' -follow -exec rm \{\} \; |
depend: kerninc |
-makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
libc.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
$(AR) rc libc.a $(LIBS) $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
arch/$(UARCH)/_link.ld: arch/$(UARCH)/_link.ld.in |
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
$(CC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@ |
%.o: %.S |
/branches/arm/uspace/lib/libc/arch/ia64/Makefile.inc |
---|
29,18 → 29,19 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = ia64-pc-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia64/bin |
ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \ |
arch/$(UARCH)/src/fibril.S \ |
arch/$(UARCH)/src/tls.c \ |
arch/$(UARCH)/src/ddi.c |
CFLAGS += -fno-unwind-tables |
CFLAGS += -fno-unwind-tables -DMALLOC_ALIGNMENT_16 |
LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a |
AFLAGS += |
ENDIANESS = LE |
ARCH_SOURCES += arch/$(ARCH)/src/syscall.S \ |
arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c |
BFD_NAME = elf64-ia64-little |
BFD_ARCH = ia64-elf64 |
/branches/arm/uspace/lib/libc/arch/ia64/include/ddi.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/arch/ia64/include/byteorder.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcia64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ia64_BYTEORDER_H_ |
#define LIBC_ia64_BYTEORDER_H_ |
/* IA-64 is little-endian */ |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ia64/include/types.h |
---|
47,9 → 47,6 |
typedef unsigned int uint32_t; |
typedef unsigned long int uint64_t; |
typedef int64_t ssize_t; |
typedef uint64_t size_t; |
typedef uint64_t uintptr_t; |
typedef unsigned char __r8; /* Reserve byte */ |
/branches/arm/uspace/lib/libc/arch/ia64/include/syscall.h |
---|
36,8 → 36,6 |
#ifndef LIBC_ia64_SYSCALL_H_ |
#define LIBC_ia64_SYSCALL_H_ |
#define LIBARCH_SYSCALL_GENERIC |
#include <syscall.h> |
#endif |
/branches/arm/uspace/lib/libc/arch/ia64/src/ddi.c |
---|
File deleted |
/branches/arm/uspace/lib/libc/arch/ia64/src/entry.s |
---|
38,7 → 38,7 |
# |
__entry: |
alloc loc0 = ar.pfs, 0, 1, 2, 0 |
movl r1 = _gp |
mov r1 = _gp |
# Pass PCB pointer as the first argument to __main |
mov out0 = r2 |
/branches/arm/uspace/lib/libc/arch/ia64/src/thread_entry.s |
---|
36,7 → 36,7 |
__thread_entry: |
alloc loc0 = ar.pfs, 0, 1, 1, 0 |
movl r1 = _gp |
mov r1 = _gp |
# |
# r8 contains address of uarg structure. |
/branches/arm/uspace/lib/libc/arch/ia64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
32,11 → 32,13 |
_tdata_start = .; |
*(.tdata); |
_tdata_end = .; |
} :data |
.tbss : { |
_tbss_start = .; |
*(.tbss); |
_tbss_end = .; |
} :data |
_tls_alignment = ALIGNOF(.tdata); |
_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); |
.bss : { |
*(.sbss); |
*(.scommon); |
/branches/arm/uspace/lib/libc/arch/arm32/Makefile.inc |
---|
30,18 → 30,20 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = arm-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm/bin |
ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ |
arch/$(UARCH)/src/fibril.S \ |
arch/$(UARCH)/src/tls.c \ |
arch/$(UARCH)/src/eabi.S |
CFLAGS += -ffixed-r9 -mtp=soft |
CFLAGS += -ffixed-r9 -mtp=soft |
LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a |
AFLAGS += |
ENDIANESS = LE |
ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \ |
arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c \ |
arch/$(ARCH)/src/eabi.S |
BFD_NAME = elf32-littlearm |
BFD_ARCH = arm |
/branches/arm/uspace/lib/libc/arch/arm32/include/ddi.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/arch/arm32/include/byteorder.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcarm32 |
* @{ |
*/ |
/** @file |
* @brief Endianness definitions. |
*/ |
#ifndef LIBC_arm32_BYTEORDER_H_ |
#define LIBC_arm32_BYTEORDER_H_ |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/arm32/include/tls.h |
---|
40,7 → 40,7 |
#define CONFIG_TLS_VARIANT_1 |
/** Offsets for accessing thread-local variables are shifted 8 bytes higher. */ |
/** Offsets for accessing __thread variables are shifted 8 bytes higher. */ |
#define ARM_TP_OFFSET (-8) |
/** TCB (Thread Control Block) struct. |
/branches/arm/uspace/lib/libc/arch/arm32/include/types.h |
---|
48,9 → 48,6 |
typedef unsigned long int uint32_t; |
typedef unsigned long long int uint64_t; |
typedef int32_t ssize_t; |
typedef uint32_t size_t; |
typedef uint32_t uintptr_t; |
#endif |
/branches/arm/uspace/lib/libc/arch/arm32/include/fibril.h |
---|
38,7 → 38,7 |
#include <sys/types.h> |
#include <align.h> |
#include <thread.h> |
#include "thread.h" |
/** Size of a stack item */ |
#define STACK_ITEM_SIZE 4 |
/branches/arm/uspace/lib/libc/arch/arm32/include/syscall.h |
---|
30,14 → 30,12 |
* @{ |
*/ |
/** @file |
* @brief |
* @brief Empty. |
*/ |
#ifndef LIBC_arm32_SYSCALL_H_ |
#define LIBC_arm32_SYSCALL_H_ |
#define LIBARCH_SYSCALL_GENERIC |
#include <syscall.h> |
#endif |
/branches/arm/uspace/lib/libc/arch/arm32/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
28,11 → 28,13 |
_tdata_start = .; |
*(.tdata); |
_tdata_end = .; |
} :data |
.tbss : { |
_tbss_start = .; |
*(.tbss); |
_tbss_end = .; |
} :data |
_tls_alignment = ALIGNOF(.tdata); |
_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); |
.bss : { |
*(.sbss); |
*(.scommon); |
/branches/arm/uspace/lib/libc/arch/mips32eb/Makefile.inc |
---|
29,17 → 29,19 |
## Toolchain configuration |
# |
TARGET = mips-linux-gnu |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = mips-sgi-irix5 |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips/bin |
CFLAGS += -mips3 |
ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ |
arch/$(UARCH)/src/fibril.S \ |
arch/$(UARCH)/src/tls.c |
ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \ |
arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c |
CFLAGS += -mips3 |
LFLAGS += -N |
ENDIANESS = BE |
BFD_ARCH = mips |
BFD_NAME = elf32-tradbigmips |
BFD_NAME = elf32-big |
/branches/arm/uspace/lib/libc/arch/mips32eb/include/ddi.h |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/uspace/lib/libc/arch/mips32eb/include/byteorder.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcmips32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_mips32eb_BYTEORDER_H_ |
#define LIBC_mips32eb_BYTEORDER_H_ |
#define ARCH_IS_BIG_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc32/Makefile.inc |
---|
29,18 → 29,20 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = ppc-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc/bin |
ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ |
arch/$(UARCH)/src/fibril.S \ |
arch/$(UARCH)/src/tls.c |
ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \ |
arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c |
CFLAGS += -mcpu=powerpc -msoft-float -m32 |
AFLAGS += -a32 |
LFLAGS += -N |
ENDIANESS = BE |
BFD_NAME = elf32-powerpc |
BFD_ARCH = powerpc:common |
/branches/arm/uspace/lib/libc/arch/ppc32/include/ddi.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/arch/ppc32/include/byteorder.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc32_BYTEORDER_H_ |
#define LIBC_ppc32_BYTEORDER_H_ |
#define ARCH_IS_BIG_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc32/include/types.h |
---|
47,9 → 47,6 |
typedef unsigned int uint32_t; |
typedef unsigned long long int uint64_t; |
typedef int32_t ssize_t; |
typedef uint32_t size_t; |
typedef uint32_t uintptr_t; |
#endif |
/branches/arm/uspace/lib/libc/arch/ppc32/include/syscall.h |
---|
36,8 → 36,6 |
#ifndef LIBC_ppc32_SYSCALL_H_ |
#define LIBC_ppc32_SYSCALL_H_ |
#define LIBARCH_SYSCALL_GENERIC |
#include <syscall.h> |
#endif |
/branches/arm/uspace/lib/libc/arch/ppc32/src/entry.s |
---|
34,12 → 34,11 |
## User-space task entry point |
# |
# r6 contains the PCB pointer |
# r3 contains the PCB pointer |
# |
__entry: |
# Pass the PCB pointer to __main() as the first argument. |
# The first argument is passed in r3. |
mr %r3, %r6 |
# Since the first argument is passed in r3, no operation is needed. |
bl __main |
bl __exit |
/branches/arm/uspace/lib/libc/arch/ppc32/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
27,11 → 27,13 |
_tdata_start = .; |
*(.tdata); |
_tdata_end = .; |
} :data |
.tbss : { |
_tbss_start = .; |
*(.tbss); |
_tbss_end = .; |
} :data |
_tls_alignment = ALIGNOF(.tdata); |
_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); |
.bss : { |
*(.sbss); |
*(COMMON); |
/branches/arm/uspace/lib/libc/arch/amd64/Makefile.inc |
---|
29,16 → 29,18 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = amd64-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/amd64/bin |
ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \ |
arch/$(UARCH)/src/fibril.S \ |
arch/$(UARCH)/src/tls.c |
ARCH_SOURCES += arch/$(ARCH)/src/syscall.S \ |
arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c |
LFLAGS += -N |
ENDIANESS = LE |
BFD_NAME = elf64-x86-64 |
BFD_ARCH = i386:x86-64 |
/branches/arm/uspace/lib/libc/arch/amd64/include/byteorder.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcamd64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_amd64_BYTEORDER_H_ |
#define LIBC_amd64_BYTEORDER_H_ |
/* AMD64 is little-endian */ |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/amd64/include/types.h |
---|
47,9 → 47,6 |
typedef unsigned int uint32_t; |
typedef unsigned long long int uint64_t; |
typedef int64_t ssize_t; |
typedef uint64_t size_t; |
typedef uint64_t uintptr_t; |
#endif |
/branches/arm/uspace/lib/libc/arch/amd64/include/syscall.h |
---|
36,8 → 36,6 |
#ifndef LIBC_amd64_SYSCALL_H_ |
#define LIBC_amd64_SYSCALL_H_ |
#define LIBARCH_SYSCALL_GENERIC |
#include <syscall.h> |
#endif |
/branches/arm/uspace/lib/libc/arch/amd64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
26,11 → 26,13 |
_tdata_start = .; |
*(.tdata); |
_tdata_end = .; |
} :data |
.tbss : { |
_tbss_start = .; |
*(.tbss); |
_tbss_end = .; |
} :data |
_tls_alignment = ALIGNOF(.tdata); |
_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); |
.bss : { |
*(COMMON); |
*(.bss); |
/branches/arm/uspace/lib/libc/arch/ppc64/Makefile.inc |
---|
0,0 → 1,48 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = ppc64-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc64/bin |
ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \ |
arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c |
CFLAGS += -mcpu=powerpc64 -msoft-float -m64 |
AFLAGS += -a64 |
LFLAGS += -N |
BFD_NAME = elf64-powerpc |
BFD_ARCH = powerpc:common64 |
/branches/arm/uspace/lib/libc/arch/ppc64/include/config.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_CONFIG_H_ |
#define LIBC_ppc64_CONFIG_H_ |
#define PAGE_WIDTH 12 |
#define PAGE_SIZE (1 << PAGE_WIDTH) |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/byteorder.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_BYTEORDER_H_ |
#define LIBC_ppc64_BYTEORDER_H_ |
#define ARCH_IS_BIG_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/tls.h |
---|
0,0 → 1,73 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_TLS_H_ |
#define LIBC_ppc64_TLS_H_ |
#define CONFIG_TLS_VARIANT_1 |
#define PPC_TP_OFFSET 0x7000 |
typedef struct { |
void *fibril_data; |
} tcb_t; |
static inline void __tcb_set(tcb_t *tcb) |
{ |
void *tp = tcb; |
tp += PPC_TP_OFFSET + sizeof(tcb_t); |
asm volatile ( |
"mr %%r2, %0\n" |
: |
: "r" (tp) |
); |
} |
static inline tcb_t * __tcb_get(void) |
{ |
void * retval; |
asm volatile ( |
"mr %0, %%r2\n" |
: "=r" (retval) |
); |
return (tcb_t *)(retval - PPC_TP_OFFSET - sizeof(tcb_t)); |
} |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/thread.h |
---|
0,0 → 1,41 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_THREAD_H_ |
#define LIBC_ppc64_THREAD_H_ |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/types.h |
---|
0,0 → 1,55 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_TYPES_H_ |
#define LIBC_ppc64_TYPES_H_ |
typedef unsigned long sysarg_t; |
typedef char int8_t; |
typedef short int int16_t; |
typedef int int32_t; |
typedef long int int64_t; |
typedef unsigned char uint8_t; |
typedef unsigned short int uint16_t; |
typedef unsigned int uint32_t; |
typedef unsigned long int uint64_t; |
typedef uint64_t uintptr_t; |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/fibril.h |
---|
0,0 → 1,83 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_FIBRIL_H_ |
#define LIBC_ppc64_FIBRIL_H_ |
#include <sys/types.h> |
/* We define our own context_set, because we need to set |
* the TLS pointer to the tcb+0x7000 |
* |
* See tls_set in thread.h |
*/ |
#define context_set(c, _pc, stack, size, ptls) \ |
(c)->pc = (sysarg_t) (_pc); \ |
(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ |
(c)->tls = ((sysarg_t) (ptls)) + 0x7000 + sizeof(tcb_t); |
#define SP_DELTA 16 |
typedef struct { |
uint64_t sp; |
uint64_t pc; |
uint64_t tls; |
uint64_t r13; |
uint64_t r14; |
uint64_t r15; |
uint64_t r16; |
uint64_t r17; |
uint64_t r18; |
uint64_t r19; |
uint64_t r20; |
uint64_t r21; |
uint64_t r22; |
uint64_t r23; |
uint64_t r24; |
uint64_t r25; |
uint64_t r26; |
uint64_t r27; |
uint64_t r28; |
uint64_t r29; |
uint64_t r30; |
uint64_t r31; |
uint64_t cr; |
} __attribute__ ((packed)) context_t; |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/atomic.h |
---|
0,0 → 1,95 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_ATOMIC_H_ |
#define LIBC_ppc64_ATOMIC_H_ |
static inline void atomic_inc(atomic_t *val) |
{ |
long tmp; |
asm volatile ( |
"1:\n" |
"lwarx %0, 0, %2\n" |
"addic %0, %0, 1\n" |
"stwcx. %0, 0, %2\n" |
"bne- 1b" |
: "=&r" (tmp), "=m" (val->count) |
: "r" (&val->count), "m" (val->count) |
: "cc"); |
} |
static inline void atomic_dec(atomic_t *val) |
{ |
long tmp; |
asm volatile ( |
"1:\n" |
"lwarx %0, 0, %2\n" |
"addic %0, %0, -1\n" |
"stwcx. %0, 0, %2\n" |
"bne- 1b" |
: "=&r" (tmp), "=m" (val->count) |
: "r" (&val->count), "m" (val->count) |
: "cc"); |
} |
static inline long atomic_postinc(atomic_t *val) |
{ |
atomic_inc(val); |
return val->count - 1; |
} |
static inline long atomic_postdec(atomic_t *val) |
{ |
atomic_dec(val); |
return val->count + 1; |
} |
static inline long atomic_preinc(atomic_t *val) |
{ |
atomic_inc(val); |
return val->count; |
} |
static inline long atomic_predec(atomic_t *val) |
{ |
atomic_dec(val); |
return val->count; |
} |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/syscall.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libc |
* @{ |
*/ |
/** |
* @file |
*/ |
#ifndef LIBC_ppc64_SYSCALL_H_ |
#define LIBC_ppc64_SYSCALL_H_ |
#include <syscall.h> |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/regname.h |
---|
0,0 → 1,188 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_REGNAME_H_ |
#define LIBC_ppc64_REGNAME_H_ |
/* Condition Register Bit Fields */ |
#define cr0 0 |
#define cr1 1 |
#define cr2 2 |
#define cr3 3 |
#define cr4 4 |
#define cr5 5 |
#define cr6 6 |
#define cr7 7 |
/* General Purpose Registers (GPRs) */ |
#define r0 0 |
#define r1 1 |
#define r2 2 |
#define r3 3 |
#define r4 4 |
#define r5 5 |
#define r6 6 |
#define r7 7 |
#define r8 8 |
#define r9 9 |
#define r10 10 |
#define r11 11 |
#define r12 12 |
#define r13 13 |
#define r14 14 |
#define r15 15 |
#define r16 16 |
#define r17 17 |
#define r18 18 |
#define r19 19 |
#define r20 20 |
#define r21 21 |
#define r22 22 |
#define r23 23 |
#define r24 24 |
#define r25 25 |
#define r26 26 |
#define r27 27 |
#define r28 28 |
#define r29 29 |
#define r30 30 |
#define r31 31 |
/* GPR Aliases */ |
#define sp 1 |
/* Floating Point Registers (FPRs) */ |
#define fr0 0 |
#define fr1 1 |
#define fr2 2 |
#define fr3 3 |
#define fr4 4 |
#define fr5 5 |
#define fr6 6 |
#define fr7 7 |
#define fr8 8 |
#define fr9 9 |
#define fr10 10 |
#define fr11 11 |
#define fr12 12 |
#define fr13 13 |
#define fr14 14 |
#define fr15 15 |
#define fr16 16 |
#define fr17 17 |
#define fr18 18 |
#define fr19 19 |
#define fr20 20 |
#define fr21 21 |
#define fr22 22 |
#define fr23 23 |
#define fr24 24 |
#define fr25 25 |
#define fr26 26 |
#define fr27 27 |
#define fr28 28 |
#define fr29 29 |
#define fr30 30 |
#define fr31 31 |
#define vr0 0 |
#define vr1 1 |
#define vr2 2 |
#define vr3 3 |
#define vr4 4 |
#define vr5 5 |
#define vr6 6 |
#define vr7 7 |
#define vr8 8 |
#define vr9 9 |
#define vr10 10 |
#define vr11 11 |
#define vr12 12 |
#define vr13 13 |
#define vr14 14 |
#define vr15 15 |
#define vr16 16 |
#define vr17 17 |
#define vr18 18 |
#define vr19 19 |
#define vr20 20 |
#define vr21 21 |
#define vr22 22 |
#define vr23 23 |
#define vr24 24 |
#define vr25 25 |
#define vr26 26 |
#define vr27 27 |
#define vr28 28 |
#define vr29 29 |
#define vr30 30 |
#define vr31 31 |
#define evr0 0 |
#define evr1 1 |
#define evr2 2 |
#define evr3 3 |
#define evr4 4 |
#define evr5 5 |
#define evr6 6 |
#define evr7 7 |
#define evr8 8 |
#define evr9 9 |
#define evr10 10 |
#define evr11 11 |
#define evr12 12 |
#define evr13 13 |
#define evr14 14 |
#define evr15 15 |
#define evr16 16 |
#define evr17 17 |
#define evr18 18 |
#define evr19 19 |
#define evr20 20 |
#define evr21 21 |
#define evr22 22 |
#define evr23 23 |
#define evr24 24 |
#define evr25 25 |
#define evr26 26 |
#define evr27 27 |
#define evr28 28 |
#define evr29 29 |
#define evr30 30 |
#define evr31 31 |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/stackarg.h |
---|
0,0 → 1,41 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_STACKARG_H_ |
#define LIBC_STACKARG_H_ |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/faddr.h |
---|
0,0 → 1,45 |
/* |
* Copyright (c) 2005 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_FADDR_H_ |
#define LIBC_ppc64_FADDR_H_ |
#include <libarch/types.h> |
#define FADDR(fptr) ((uintptr_t) (fptr)) |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/include/limits.h |
---|
0,0 → 1,46 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ppc64_LIMITS_H_ |
#define LIBC_ppc64_LIMITS_H_ |
#define LONG_MIN MIN_INT64 |
#define LONG_MAX MAX_INT64 |
#define ULONG_MIN MIN_UINT64 |
#define ULONG_MAX MAX_UINT64 |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/src/entry.s |
---|
0,0 → 1,40 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
.section .init, "ax" |
.org 0 |
.globl __entry |
## User-space task entry point |
# |
# |
__entry: |
bl __main |
bl __exit |
/branches/arm/uspace/lib/libc/arch/ppc64/src/fibril.S |
---|
0,0 → 1,62 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
.text |
.global context_save |
.global context_restore |
#include <libarch/regname.h> |
#include <kernel/arch/context_offset.h> |
context_save: |
CONTEXT_SAVE_ARCH_CORE r3 |
mflr r4 |
stw r4, OFFSET_PC(r3) |
mfcr r4 |
stw r4, OFFSET_CR(r3) |
# context_save returns 1 |
li r3, 1 |
blr |
context_restore: |
CONTEXT_RESTORE_ARCH_CORE r3 |
lwz r4, OFFSET_CR(r3) |
mtcr r4 |
lwz r4, OFFSET_PC(r3) |
mtlr r4 |
# context_restore returns 0 |
li r3, 0 |
blr |
/branches/arm/uspace/lib/libc/arch/ppc64/src/syscall.c |
---|
0,0 → 1,66 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 ppc64 |
* @brief ppc64 architecture dependent parts of libc |
* @ingroup lc |
* @{ |
*/ |
/** @file |
*/ |
#include <libc.h> |
sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, |
const sysarg_t p4, const sysarg_t p5, const sysarg_t p6, const syscall_t id) |
{ |
register sysarg_t __ppc32_reg_r3 asm("3") = p1; |
register sysarg_t __ppc32_reg_r4 asm("4") = p2; |
register sysarg_t __ppc32_reg_r5 asm("5") = p3; |
register sysarg_t __ppc32_reg_r6 asm("6") = p4; |
register sysarg_t __ppc32_reg_r7 asm("7") = p5; |
register sysarg_t __ppc32_reg_r8 asm("8") = p6; |
register sysarg_t __ppc32_reg_r9 asm("9") = id; |
asm volatile ( |
"sc\n" |
: "=r" (__ppc32_reg_r3) |
: "r" (__ppc32_reg_r3), |
"r" (__ppc32_reg_r4), |
"r" (__ppc32_reg_r5), |
"r" (__ppc32_reg_r6), |
"r" (__ppc32_reg_r7), |
"r" (__ppc32_reg_r8), |
"r" (__ppc32_reg_r9) |
); |
return __ppc32_reg_r3; |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/src/tls.c |
---|
0,0 → 1,60 |
/* |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcppc64 |
* @{ |
*/ |
/** @file |
*/ |
#include <tls.h> |
#include <malloc.h> |
/** Allocate TLS & TCB for initial module threads |
* |
* @param data Start of data section |
* @return pointer to tcb_t structure |
* |
*/ |
tcb_t * __alloc_tls(void **data, size_t size) |
{ |
tcb_t *tcb; |
*data = malloc(sizeof(tcb_t) + size); |
tcb = (tcb_t *) (*data + size); |
return tcb; |
} |
void __free_tls_arch(tcb_t *tcb, size_t size) |
{ |
void *start = ((void *) tcb) - size; |
free(start); |
} |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ppc64/src/thread_entry.s |
---|
0,0 → 1,39 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
.text |
.globl __thread_entry |
## User-space thread entry point for all but the first threads. |
# |
# |
__thread_entry: |
b __thread_main |
.end __thread_entry |
/branches/arm/uspace/lib/libc/arch/ppc64/_link.ld.in |
---|
0,0 → 1,52 |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
text PT_LOAD FLAGS(5); |
data PT_LOAD FLAGS(6); |
} |
SECTIONS { |
. = 0x1000 + SIZEOF_HEADERS; |
.init : { |
*(.init); |
} :text |
.text : { |
*(.text); |
*(.toc); |
*(.rodata*); |
} :text |
. = . + 0x1000; |
.data : { |
*(.opd); |
*(.data*); |
*(.sdata); |
} :data |
.tdata : { |
_tdata_start = .; |
*(.tdata); |
_tdata_end = .; |
} :data |
.tbss : { |
_tbss_start = .; |
*(.tbss); |
_tbss_end = .; |
} :data |
_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); |
.bss : { |
*(.sbss); |
*(COMMON); |
*(.bss); |
} :data |
. = ALIGN(0x1000); |
_heap = .; |
/DISCARD/ : { |
*(*); |
} |
} |
/branches/arm/uspace/lib/libc/arch/mips32/Makefile.inc |
---|
29,16 → 29,23 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = mipsel-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/mipsel/bin |
CFLAGS += -mips3 |
ARCH_SOURCES += arch/$(UARCH)/src/syscall.c \ |
arch/$(UARCH)/src/fibril.S \ |
arch/$(UARCH)/src/tls.c |
-include ../../Makefile.config |
ifeq ($(CONFIG_MIPS_FPU),y) |
CFLAGS += -DCONFIG_MIPS_FPU |
endif |
CFLAGS += -mips3 |
ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \ |
arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c |
ENDIANESS = LE |
BFD_ARCH = mips |
BFD_NAME = elf32-tradlittlemips |
/branches/arm/uspace/lib/libc/arch/mips32/include/ddi.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/arch/mips32/include/atomic.h |
---|
59,14 → 59,13 |
asm volatile ( |
"1:\n" |
" ll %0, %1\n" |
" addu %0, %0, %3\n" /* same as add, but never traps on overflow */ |
" addiu %0, %0, %3\n" /* same as addi, but never traps on overflow */ |
" move %2, %0\n" |
" sc %0, %1\n" |
" beq %0, %4, 1b\n" /* if the atomic operation failed, try again */ |
/* nop */ /* nop is inserted automatically by compiler */ |
" nop\n" |
: "=&r" (tmp), "+m" (val->count), "=&r" (v) |
: "r" (i), "i" (0) |
: "i" (i), "i" (0) |
); |
return v; |
/branches/arm/uspace/lib/libc/arch/mips32/include/byteorder.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcmips32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_mips32_BYTEORDER_H_ |
#define LIBC_mips32_BYTEORDER_H_ |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/mips32/include/types.h |
---|
48,9 → 48,6 |
typedef unsigned long int uint32_t; |
typedef unsigned long long int uint64_t; |
typedef int32_t ssize_t; |
typedef uint32_t size_t; |
typedef uint32_t uintptr_t; |
#endif |
/branches/arm/uspace/lib/libc/arch/mips32/include/syscall.h |
---|
36,8 → 36,6 |
#ifndef LIBC_mips32_SYSCALL_H_ |
#define LIBC_mips32_SYSCALL_H_ |
#define LIBARCH_SYSCALL_GENERIC |
#include <syscall.h> |
#endif |
/branches/arm/uspace/lib/libc/arch/mips32/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
33,11 → 33,13 |
_tdata_start = .; |
*(.tdata); |
_tdata_end = .; |
} :data |
.tbss : { |
_tbss_start = .; |
*(.tbss); |
_tbss_end = .; |
} :data |
_tls_alignment = ALIGNOF(.tdata); |
_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); |
.sbss : { |
*(.scommon); |
/branches/arm/uspace/lib/libc/arch/ia32/Makefile.inc |
---|
29,17 → 29,19 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = i686-pc-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/i686/bin |
ARCH_SOURCES += arch/$(UARCH)/src/syscall.S \ |
arch/$(UARCH)/src/fibril.S \ |
arch/$(UARCH)/src/tls.c \ |
arch/$(UARCH)/src/setjmp.S |
ARCH_SOURCES += arch/$(ARCH)/src/syscall.S \ |
arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c \ |
arch/$(ARCH)/src/setjmp.S |
LFLAGS += -N |
ENDIANESS = LE |
BFD_NAME = elf32-i386 |
BFD_ARCH = i386 |
/branches/arm/uspace/lib/libc/arch/ia32/include/byteorder.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcia32 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_ia32_BYTEORDER_H_ |
#define LIBC_ia32_BYTEORDER_H_ |
/* IA-32 is little-endian */ |
#define ARCH_IS_LITTLE_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/ia32/include/types.h |
---|
47,9 → 47,6 |
typedef unsigned int uint32_t; |
typedef unsigned long long int uint64_t; |
typedef int32_t ssize_t; |
typedef uint32_t size_t; |
typedef uint32_t uintptr_t; |
#endif |
/branches/arm/uspace/lib/libc/arch/ia32/include/syscall.h |
---|
36,25 → 36,8 |
#ifndef LIBC_ia32_SYSCALL_H_ |
#define LIBC_ia32_SYSCALL_H_ |
#include <sys/types.h> |
#include <kernel/syscall/syscall.h> |
#include <syscall.h> |
#define __syscall0 __syscall_sysenter |
#define __syscall1 __syscall_sysenter |
#define __syscall2 __syscall_sysenter |
#define __syscall3 __syscall_sysenter |
#define __syscall4 __syscall_sysenter |
#define __syscall5 __syscall_int |
#define __syscall6 __syscall_int |
extern sysarg_t |
__syscall_sysenter(const sysarg_t, const sysarg_t, const sysarg_t, const sysarg_t, |
const sysarg_t, const sysarg_t, const syscall_t); |
extern sysarg_t |
__syscall_int(const sysarg_t, const sysarg_t, const sysarg_t, const sysarg_t, |
const sysarg_t, const sysarg_t, const syscall_t); |
#endif |
/** @} |
/branches/arm/uspace/lib/libc/arch/ia32/include/ddi.h |
---|
33,72 → 33,43 |
#ifndef LIBC_ia32_DDI_H_ |
#define LIBC_ia32_DDI_H_ |
#include <sys/types.h> |
#include <libarch/types.h> |
static inline void outb(int16_t port, uint8_t b) |
{ |
asm volatile ("outb %0, %1\n" :: "a" (b), "d" (port)); |
} |
#define IO_SPACE_BOUNDARY ((void *) (64 * 1024)) |
static inline uint8_t pio_read_8(ioport8_t *port) |
static inline void outw(int16_t port, int16_t w) |
{ |
uint8_t val; |
asm volatile ( |
"inb %w[port], %b[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
return val; |
asm volatile ("outw %0, %1\n" :: "a" (w), "d" (port)); |
} |
static inline uint16_t pio_read_16(ioport16_t *port) |
static inline void outl(int16_t port, uint32_t l) |
{ |
uint16_t val; |
asm volatile ( |
"inw %w[port], %w[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
return val; |
asm volatile ("outl %0, %1\n" :: "a" (l), "d" (port)); |
} |
static inline uint32_t pio_read_32(ioport32_t *port) |
static inline uint8_t inb(int16_t port) |
{ |
uint32_t val; |
asm volatile ( |
"inl %w[port], %[val]\n" |
: [val] "=a" (val) |
: [port] "d" (port) |
); |
uint8_t val; |
asm volatile ("inb %1, %0 \n" : "=a" (val) : "d"(port)); |
return val; |
} |
static inline void pio_write_8(ioport8_t *port, uint8_t val) |
static inline int16_t inw(int16_t port) |
{ |
asm volatile ( |
"outb %b[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
int16_t val; |
asm volatile ("inw %1, %0 \n" : "=a" (val) : "d"(port)); |
return val; |
} |
static inline void pio_write_16(ioport16_t *port, uint16_t val) |
static inline uint32_t inl(int16_t port) |
{ |
asm volatile ( |
"outw %w[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
} |
uint32_t val; |
static inline void pio_write_32(ioport32_t *port, uint32_t val) |
{ |
asm volatile ( |
"outl %[val], %w[port]\n" |
:: [val] "a" (val), [port] "d" (port) |
); |
asm volatile ("inl %1, %0 \n" : "=a" (val) : "d"(port)); |
return val; |
} |
#endif |
/branches/arm/uspace/lib/libc/arch/ia32/src/syscall.S |
---|
28,14 → 28,14 |
.text |
/** Syscall wrapper - INT $0x30 version. |
/** Syscall wrapper. |
* |
* Mind the order of arguments. First two arguments and the syscall number go to |
* scratch registers. An optimized version of this wrapper for fewer arguments |
* could benefit from this and not save unused registers on the stack. |
*/ |
.global __syscall_int |
__syscall_int: |
.global __syscall |
__syscall: |
pushl %ebx |
pushl %esi |
pushl %edi |
53,38 → 53,3 |
popl %esi |
popl %ebx |
ret |
/** Syscall wrapper - SYSENTER version. |
* |
* This is an optimized version of syscall for four or less arguments. Note |
* that EBP and EDI are used to remember user stack address and the return |
* address. The kernel part doesn't save DS, ES and FS so the handler restores |
* these to the selector immediately following CS (it must be the flat data |
* segment, otherwise the SYSENTER wouldn't work in the first place). |
*/ |
.global __syscall_sysenter |
__syscall_sysenter: |
pushl %ebx |
pushl %esi |
pushl %edi |
pushl %ebp |
mov %esp, %ebp |
lea ra, %edi |
movl 20(%esp), %edx # First argument. |
movl 24(%esp), %ecx # Second argument. |
movl 28(%esp), %ebx # Third argument. |
movl 32(%esp), %esi # Fourth argument. |
movl 44(%esp), %eax # Syscall number. |
sysenter |
ra: |
movw %cs, %cx |
addw $8, %cx |
movw %cx, %ds |
movw %cx, %es |
movw %cx, %fs |
popl %ebp |
popl %edi |
popl %esi |
popl %ebx |
ret |
/branches/arm/uspace/lib/libc/arch/ia32/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
26,11 → 26,13 |
_tdata_start = .; |
*(.tdata); |
_tdata_end = .; |
} :data |
.tbss : { |
_tbss_start = .; |
*(.tbss); |
_tbss_end = .; |
} :data |
_tls_alignment = ALIGNOF(.tdata); |
_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); |
.bss : { |
*(COMMON); |
*(.bss); |
/branches/arm/uspace/lib/libc/arch/sparc64/Makefile.inc |
---|
29,16 → 29,18 |
## Toolchain configuration |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
TARGET = sparc64-linux-gnu |
TOOLCHAIN_DIR = $(CROSS_PREFIX)/sparc64/bin |
ARCH_SOURCES += arch/$(UARCH)/src/fibril.S \ |
arch/$(UARCH)/src/tls.c |
ARCH_SOURCES += arch/$(ARCH)/src/fibril.S \ |
arch/$(ARCH)/src/tls.c |
CFLAGS += -mcpu=ultrasparc -m64 |
LFLAGS += -no-check-sections -N |
ENDIANESS = BE |
BFD_NAME = elf64-sparc |
BFD_ARCH = sparc |
/branches/arm/uspace/lib/libc/arch/sparc64/include/ddi.h |
---|
File deleted |
/branches/arm/uspace/lib/libc/arch/sparc64/include/byteorder.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcsparc64 |
* @{ |
*/ |
/** @file |
*/ |
#ifndef LIBC_sparc64_BYTEORDER_H_ |
#define LIBC_sparc64_BYTEORDER_H_ |
#define ARCH_IS_BIG_ENDIAN |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/arch/sparc64/include/syscall.h |
---|
38,14 → 38,6 |
#include <sys/types.h> |
#include <kernel/syscall/syscall.h> |
#define __syscall0 __syscall |
#define __syscall1 __syscall |
#define __syscall2 __syscall |
#define __syscall3 __syscall |
#define __syscall4 __syscall |
#define __syscall5 __syscall |
#define __syscall6 __syscall |
static inline sysarg_t |
__syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, |
const sysarg_t p4, const sysarg_t p5, const sysarg_t p6, const syscall_t id) |
/branches/arm/uspace/lib/libc/arch/sparc64/include/types.h |
---|
47,9 → 47,6 |
typedef unsigned int uint32_t; |
typedef unsigned long int uint64_t; |
typedef int64_t ssize_t; |
typedef uint64_t size_t; |
typedef uint64_t uintptr_t; |
#endif |
/branches/arm/uspace/lib/libc/arch/sparc64/include/fibril.h |
---|
39,7 → 39,7 |
#include <sys/types.h> |
#include <align.h> |
#define SP_DELTA (STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE) |
#define SP_DELTA STACK_WINDOW_SAVE_AREA_SIZE |
#ifdef context_set |
#undef context_set |
/branches/arm/uspace/lib/libc/arch/sparc64/include/stack.h |
---|
45,11 → 45,6 |
*/ |
#define STACK_WINDOW_SAVE_AREA_SIZE (16 * STACK_ITEM_SIZE) |
/* |
* Six extended words for first six arguments. |
*/ |
#define STACK_ARG_SAVE_AREA_SIZE (6 * STACK_ITEM_SIZE) |
/** |
* By convention, the actual top of the stack is %sp + STACK_BIAS. |
*/ |
/branches/arm/uspace/lib/libc/arch/sparc64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
31,11 → 31,13 |
_tdata_start = .; |
*(.tdata); |
_tdata_end = .; |
} :data |
.tbss : { |
_tbss_start = .; |
*(.tbss); |
_tbss_end = .; |
} :data |
_tls_alignment = ALIGNOF(.tdata); |
_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)); |
.bss : { |
*(.sbss); |
*(COMMON); |
/branches/arm/uspace/lib/libc/malloc/malloc.c |
---|
0,0 → 1,4431 |
#include <stdio.h> |
#include <libc.h> |
/* |
This is a version (aka dlmalloc) of malloc/free/realloc written by |
Doug Lea and released to the public domain, as explained at |
http://creativecommons.org/licenses/publicdomain. Send questions, |
comments, complaints, performance data, etc to dl@cs.oswego.edu |
* Version 2.8.3 Thu Sep 22 11:16:15 2005 Doug Lea (dl at gee) |
Note: There may be an updated version of this malloc obtainable at |
ftp://gee.cs.oswego.edu/pub/misc/malloc.c |
Check before installing! |
* Quickstart |
This library is all in one file to simplify the most common usage: |
ftp it, compile it (-O3), and link it into another program. All of |
the compile-time options default to reasonable values for use on |
most platforms. You might later want to step through various |
compile-time and dynamic tuning options. |
For convenience, an include file for code using this malloc is at: |
ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.3.h |
You don't really need this .h file unless you call functions not |
defined in your system include files. The .h file contains only the |
excerpts from this file needed for using this malloc on ANSI C/C++ |
systems, so long as you haven't changed compile-time options about |
naming and tuning parameters. If you do, then you can create your |
own malloc.h that does include all settings by cutting at the point |
indicated below. Note that you may already by default be using a C |
library containing a malloc that is based on some version of this |
malloc (for example in linux). You might still want to use the one |
in this file to customize settings or to avoid overheads associated |
with library versions. |
* Vital statistics: |
Supported pointer/size_t representation: 4 or 8 bytes |
size_t MUST be an unsigned type of the same width as |
pointers. (If you are using an ancient system that declares |
size_t as a signed type, or need it to be a different width |
than pointers, you can use a previous release of this malloc |
(e.g. 2.7.2) supporting these.) |
Alignment: 8 bytes (default) |
This suffices for nearly all current machines and C compilers. |
However, you can define MALLOC_ALIGNMENT to be wider than this |
if necessary (up to 128bytes), at the expense of using more space. |
Minimum overhead per allocated chunk: 4 or 8 bytes (if 4byte sizes) |
8 or 16 bytes (if 8byte sizes) |
Each malloced chunk has a hidden word of overhead holding size |
and status information, and additional cross-check word |
if FOOTERS is defined. |
Minimum allocated size: 4-byte ptrs: 16 bytes (including overhead) |
8-byte ptrs: 32 bytes (including overhead) |
Even a request for zero bytes (i.e., malloc(0)) returns a |
pointer to something of the minimum allocatable size. |
The maximum overhead wastage (i.e., number of extra bytes |
allocated than were requested in malloc) is less than or equal |
to the minimum size, except for requests >= mmap_threshold that |
are serviced via mmap(), where the worst case wastage is about |
32 bytes plus the remainder from a system page (the minimal |
mmap unit); typically 4096 or 8192 bytes. |
Security: static-safe; optionally more or less |
The "security" of malloc refers to the ability of malicious |
code to accentuate the effects of errors (for example, freeing |
space that is not currently malloc'ed or overwriting past the |
ends of chunks) in code that calls malloc. This malloc |
guarantees not to modify any memory locations below the base of |
heap, i.e., static variables, even in the presence of usage |
errors. The routines additionally detect most improper frees |
and reallocs. All this holds as long as the static bookkeeping |
for malloc itself is not corrupted by some other means. This |
is only one aspect of security -- these checks do not, and |
cannot, detect all possible programming errors. |
If FOOTERS is defined nonzero, then each allocated chunk |
carries an additional check word to verify that it was malloced |
from its space. These check words are the same within each |
execution of a program using malloc, but differ across |
executions, so externally crafted fake chunks cannot be |
freed. This improves security by rejecting frees/reallocs that |
could corrupt heap memory, in addition to the checks preventing |
writes to statics that are always on. This may further improve |
security at the expense of time and space overhead. (Note that |
FOOTERS may also be worth using with MSPACES.) |
By default detected errors cause the program to abort (calling |
"abort()"). You can override this to instead proceed past |
errors by defining PROCEED_ON_ERROR. In this case, a bad free |
has no effect, and a malloc that encounters a bad address |
caused by user overwrites will ignore the bad address by |
dropping pointers and indices to all known memory. This may |
be appropriate for programs that should continue if at all |
possible in the face of programming errors, although they may |
run out of memory because dropped memory is never reclaimed. |
If you don't like either of these options, you can define |
CORRUPTION_ERROR_ACTION and USAGE_ERROR_ACTION to do anything |
else. And if if you are sure that your program using malloc has |
no errors or vulnerabilities, you can define INSECURE to 1, |
which might (or might not) provide a small performance improvement. |
Thread-safety: NOT thread-safe unless USE_LOCKS defined |
When USE_LOCKS is defined, each public call to malloc, free, |
etc is surrounded with either a pthread mutex or a win32 |
spinlock (depending on WIN32). This is not especially fast, and |
can be a major bottleneck. It is designed only to provide |
minimal protection in concurrent environments, and to provide a |
basis for extensions. If you are using malloc in a concurrent |
program, consider instead using ptmalloc, which is derived from |
a version of this malloc. (See http://www.malloc.de). |
System requirements: Any combination of MORECORE and/or MMAP/MUNMAP |
This malloc can use unix sbrk or any emulation (invoked using |
the CALL_MORECORE macro) and/or mmap/munmap or any emulation |
(invoked using CALL_MMAP/CALL_MUNMAP) to get and release system |
memory. On most unix systems, it tends to work best if both |
MORECORE and MMAP are enabled. On Win32, it uses emulations |
based on VirtualAlloc. It also uses common C library functions |
like memset. |
Compliance: I believe it is compliant with the Single Unix Specification |
(See http://www.unix.org). Also SVID/XPG, ANSI C, and probably |
others as well. |
* Overview of algorithms |
This is not the fastest, most space-conserving, most portable, or |
most tunable malloc ever written. However it is among the fastest |
while also being among the most space-conserving, portable and |
tunable. Consistent balance across these factors results in a good |
general-purpose allocator for malloc-intensive programs. |
In most ways, this malloc is a best-fit allocator. Generally, it |
chooses the best-fitting existing chunk for a request, with ties |
broken in approximately least-recently-used order. (This strategy |
normally maintains low fragmentation.) However, for requests less |
than 256bytes, it deviates from best-fit when there is not an |
exactly fitting available chunk by preferring to use space adjacent |
to that used for the previous small request, as well as by breaking |
ties in approximately most-recently-used order. (These enhance |
locality of series of small allocations.) And for very large requests |
(>= 256Kb by default), it relies on system memory mapping |
facilities, if supported. (This helps avoid carrying around and |
possibly fragmenting memory used only for large chunks.) |
All operations (except malloc_stats and mallinfo) have execution |
times that are bounded by a constant factor of the number of bits in |
a size_t, not counting any clearing in calloc or copying in realloc, |
or actions surrounding MORECORE and MMAP that have times |
proportional to the number of non-contiguous regions returned by |
system allocation routines, which is often just 1. |
The implementation is not very modular and seriously overuses |
macros. Perhaps someday all C compilers will do as good a job |
inlining modular code as can now be done by brute-force expansion, |
but now, enough of them seem not to. |
Some compilers issue a lot of warnings about code that is |
dead/unreachable only on some platforms, and also about intentional |
uses of negation on unsigned types. All known cases of each can be |
ignored. |
For a longer but out of date high-level description, see |
http://gee.cs.oswego.edu/dl/html/malloc.html |
* MSPACES |
If MSPACES is defined, then in addition to malloc, free, etc., |
this file also defines mspace_malloc, mspace_free, etc. These |
are versions of malloc routines that take an "mspace" argument |
obtained using create_mspace, to control all internal bookkeeping. |
If ONLY_MSPACES is defined, only these versions are compiled. |
So if you would like to use this allocator for only some allocations, |
and your system malloc for others, you can compile with |
ONLY_MSPACES and then do something like... |
static mspace mymspace = create_mspace(0,0); // for example |
#define mymalloc(bytes) mspace_malloc(mymspace, bytes) |
(Note: If you only need one instance of an mspace, you can instead |
use "USE_DL_PREFIX" to relabel the global malloc.) |
You can similarly create thread-local allocators by storing |
mspaces as thread-locals. For example: |
static __thread mspace tlms = 0; |
void* tlmalloc(size_t bytes) { |
if (tlms == 0) tlms = create_mspace(0, 0); |
return mspace_malloc(tlms, bytes); |
} |
void tlfree(void* mem) { mspace_free(tlms, mem); } |
Unless FOOTERS is defined, each mspace is completely independent. |
You cannot allocate from one and free to another (although |
conformance is only weakly checked, so usage errors are not always |
caught). If FOOTERS is defined, then each chunk carries around a tag |
indicating its originating mspace, and frees are directed to their |
originating spaces. |
------------------------- Compile-time options --------------------------- |
Be careful in setting #define values for numerical constants of type |
size_t. On some systems, literal values are not automatically extended |
to size_t precision unless they are explicitly casted. |
WIN32 default: defined if _WIN32 defined |
Defining WIN32 sets up defaults for MS environment and compilers. |
Otherwise defaults are for unix. |
MALLOC_ALIGNMENT default: (size_t)8 |
Controls the minimum alignment for malloc'ed chunks. It must be a |
power of two and at least 8, even on machines for which smaller |
alignments would suffice. It may be defined as larger than this |
though. Note however that code and data structures are optimized for |
the case of 8-byte alignment. |
MSPACES default: 0 (false) |
If true, compile in support for independent allocation spaces. |
This is only supported if HAVE_MMAP is true. |
ONLY_MSPACES default: 0 (false) |
If true, only compile in mspace versions, not regular versions. |
USE_LOCKS default: 0 (false) |
Causes each call to each public routine to be surrounded with |
pthread or WIN32 mutex lock/unlock. (If set true, this can be |
overridden on a per-mspace basis for mspace versions.) |
FOOTERS default: 0 |
If true, provide extra checking and dispatching by placing |
information in the footers of allocated chunks. This adds |
space and time overhead. |
INSECURE default: 0 |
If true, omit checks for usage errors and heap space overwrites. |
USE_DL_PREFIX default: NOT defined |
Causes compiler to prefix all public routines with the string 'dl'. |
This can be useful when you only want to use this malloc in one part |
of a program, using your regular system malloc elsewhere. |
ABORT default: defined as abort() |
Defines how to abort on failed checks. On most systems, a failed |
check cannot die with an "assert" or even print an informative |
message, because the underlying print routines in turn call malloc, |
which will fail again. Generally, the best policy is to simply call |
abort(). It's not very useful to do more than this because many |
errors due to overwriting will show up as address faults (null, odd |
addresses etc) rather than malloc-triggered checks, so will also |
abort. Also, most compilers know that abort() does not return, so |
can better optimize code conditionally calling it. |
PROCEED_ON_ERROR default: defined as 0 (false) |
Controls whether detected bad addresses cause them to bypassed |
rather than aborting. If set, detected bad arguments to free and |
realloc are ignored. And all bookkeeping information is zeroed out |
upon a detected overwrite of freed heap space, thus losing the |
ability to ever return it from malloc again, but enabling the |
application to proceed. If PROCEED_ON_ERROR is defined, the |
static variable malloc_corruption_error_count is compiled in |
and can be examined to see if errors have occurred. This option |
generates slower code than the default abort policy. |
DEBUG default: NOT defined |
The DEBUG setting is mainly intended for people trying to modify |
this code or diagnose problems when porting to new platforms. |
However, it may also be able to better isolate user errors than just |
using runtime checks. The assertions in the check routines spell |
out in more detail the assumptions and invariants underlying the |
algorithms. The checking is fairly extensive, and will slow down |
execution noticeably. Calling malloc_stats or mallinfo with DEBUG |
set will attempt to check every non-mmapped allocated and free chunk |
in the course of computing the summaries. |
ABORT_ON_ASSERT_FAILURE default: defined as 1 (true) |
Debugging assertion failures can be nearly impossible if your |
version of the assert macro causes malloc to be called, which will |
lead to a cascade of further failures, blowing the runtime stack. |
ABORT_ON_ASSERT_FAILURE cause assertions failures to call abort(), |
which will usually make debugging easier. |
MALLOC_FAILURE_ACTION default: sets errno to ENOMEM, or no-op on win32 |
The action to take before "return 0" when malloc fails to be able to |
return memory because there is none available. |
HAVE_MORECORE default: 1 (true) unless win32 or ONLY_MSPACES |
True if this system supports sbrk or an emulation of it. |
MORECORE default: sbrk |
The name of the sbrk-style system routine to call to obtain more |
memory. See below for guidance on writing custom MORECORE |
functions. The type of the argument to sbrk/MORECORE varies across |
systems. It cannot be size_t, because it supports negative |
arguments, so it is normally the signed type of the same width as |
size_t (sometimes declared as "intptr_t"). It doesn't much matter |
though. Internally, we only call it with arguments less than half |
the max value of a size_t, which should work across all reasonable |
possibilities, although sometimes generating compiler warnings. See |
near the end of this file for guidelines for creating a custom |
version of MORECORE. |
MORECORE_CONTIGUOUS default: 1 (true) |
If true, take advantage of fact that consecutive calls to MORECORE |
with positive arguments always return contiguous increasing |
addresses. This is true of unix sbrk. It does not hurt too much to |
set it true anyway, since malloc copes with non-contiguities. |
Setting it false when definitely non-contiguous saves time |
and possibly wasted space it would take to discover this though. |
MORECORE_CANNOT_TRIM default: NOT defined |
True if MORECORE cannot release space back to the system when given |
negative arguments. This is generally necessary only if you are |
using a hand-crafted MORECORE function that cannot handle negative |
arguments. |
HAVE_MMAP default: 1 (true) |
True if this system supports mmap or an emulation of it. If so, and |
HAVE_MORECORE is not true, MMAP is used for all system |
allocation. If set and HAVE_MORECORE is true as well, MMAP is |
primarily used to directly allocate very large blocks. It is also |
used as a backup strategy in cases where MORECORE fails to provide |
space from system. Note: A single call to MUNMAP is assumed to be |
able to unmap memory that may have be allocated using multiple calls |
to MMAP, so long as they are adjacent. |
HAVE_MREMAP default: 1 on linux, else 0 |
If true realloc() uses mremap() to re-allocate large blocks and |
extend or shrink allocation spaces. |
MMAP_CLEARS default: 1 on unix |
True if mmap clears memory so calloc doesn't need to. This is true |
for standard unix mmap using /dev/zero. |
USE_BUILTIN_FFS default: 0 (i.e., not used) |
Causes malloc to use the builtin ffs() function to compute indices. |
Some compilers may recognize and intrinsify ffs to be faster than the |
supplied C version. Also, the case of x86 using gcc is special-cased |
to an asm instruction, so is already as fast as it can be, and so |
this setting has no effect. (On most x86s, the asm version is only |
slightly faster than the C version.) |
malloc_getpagesize default: derive from system includes, or 4096. |
The system page size. To the extent possible, this malloc manages |
memory from the system in page-size units. This may be (and |
usually is) a function rather than a constant. This is ignored |
if WIN32, where page size is determined using getSystemInfo during |
initialization. |
USE_DEV_RANDOM default: 0 (i.e., not used) |
Causes malloc to use /dev/random to initialize secure magic seed for |
stamping footers. Otherwise, the current time is used. |
NO_MALLINFO default: 0 |
If defined, don't compile "mallinfo". This can be a simple way |
of dealing with mismatches between system declarations and |
those in this file. |
MALLINFO_FIELD_TYPE default: size_t |
The type of the fields in the mallinfo struct. This was originally |
defined as "int" in SVID etc, but is more usefully defined as |
size_t. The value is used only if HAVE_USR_INCLUDE_MALLOC_H is not set |
REALLOC_ZERO_BYTES_FREES default: not defined |
This should be set if a call to realloc with zero bytes should |
be the same as a call to free. Some people think it should. Otherwise, |
since this malloc returns a unique pointer for malloc(0), so does |
realloc(p, 0). |
LACKS_UNISTD_H, LACKS_FCNTL_H, LACKS_SYS_PARAM_H, LACKS_SYS_MMAN_H |
LACKS_STRINGS_H, LACKS_STRING_H, LACKS_SYS_TYPES_H, LACKS_ERRNO_H |
LACKS_STDLIB_H default: NOT defined unless on WIN32 |
Define these if your system does not have these header files. |
You might need to manually insert some of the declarations they provide. |
DEFAULT_GRANULARITY default: page size if MORECORE_CONTIGUOUS, |
system_info.dwAllocationGranularity in WIN32, |
otherwise 64K. |
Also settable using mallopt(M_GRANULARITY, x) |
The unit for allocating and deallocating memory from the system. On |
most systems with contiguous MORECORE, there is no reason to |
make this more than a page. However, systems with MMAP tend to |
either require or encourage larger granularities. You can increase |
this value to prevent system allocation functions to be called so |
often, especially if they are slow. The value must be at least one |
page and must be a power of two. Setting to 0 causes initialization |
to either page size or win32 region size. (Note: In previous |
versions of malloc, the equivalent of this option was called |
"TOP_PAD") |
DEFAULT_TRIM_THRESHOLD default: 2MB |
Also settable using mallopt(M_TRIM_THRESHOLD, x) |
The maximum amount of unused top-most memory to keep before |
releasing via malloc_trim in free(). Automatic trimming is mainly |
useful in long-lived programs using contiguous MORECORE. Because |
trimming via sbrk can be slow on some systems, and can sometimes be |
wasteful (in cases where programs immediately afterward allocate |
more large chunks) the value should be high enough so that your |
overall system performance would improve by releasing this much |
memory. As a rough guide, you might set to a value close to the |
average size of a process (program) running on your system. |
Releasing this much memory would allow such a process to run in |
memory. Generally, it is worth tuning trim thresholds when a |
program undergoes phases where several large chunks are allocated |
and released in ways that can reuse each other's storage, perhaps |
mixed with phases where there are no such chunks at all. The trim |
value must be greater than page size to have any useful effect. To |
disable trimming completely, you can set to MAX_SIZE_T. Note that the trick |
some people use of mallocing a huge space and then freeing it at |
program startup, in an attempt to reserve system memory, doesn't |
have the intended effect under automatic trimming, since that memory |
will immediately be returned to the system. |
DEFAULT_MMAP_THRESHOLD default: 256K |
Also settable using mallopt(M_MMAP_THRESHOLD, x) |
The request size threshold for using MMAP to directly service a |
request. Requests of at least this size that cannot be allocated |
using already-existing space will be serviced via mmap. (If enough |
normal freed space already exists it is used instead.) Using mmap |
segregates relatively large chunks of memory so that they can be |
individually obtained and released from the host system. A request |
serviced through mmap is never reused by any other request (at least |
not directly; the system may just so happen to remap successive |
requests to the same locations). Segregating space in this way has |
the benefits that: Mmapped space can always be individually released |
back to the system, which helps keep the system level memory demands |
of a long-lived program low. Also, mapped memory doesn't become |
`locked' between other chunks, as can happen with normally allocated |
chunks, which means that even trimming via malloc_trim would not |
release them. However, it has the disadvantage that the space |
cannot be reclaimed, consolidated, and then used to service later |
requests, as happens with normal chunks. The advantages of mmap |
nearly always outweigh disadvantages for "large" chunks, but the |
value of "large" may vary across systems. The default is an |
empirically derived value that works well in most systems. You can |
disable mmap by setting to MAX_SIZE_T. |
*/ |
/** @addtogroup libcmalloc malloc |
* @brief Malloc originally written by Doug Lea and ported to HelenOS. |
* @ingroup libc |
* @{ |
*/ |
/** @file |
*/ |
#include <sys/types.h> /* For size_t */ |
/** Non-default helenos customizations */ |
#define LACKS_FCNTL_H |
#define LACKS_SYS_MMAN_H |
#define LACKS_SYS_PARAM_H |
#undef HAVE_MMAP |
#define HAVE_MMAP 0 |
#define LACKS_ERRNO_H |
/* Set errno? */ |
#undef MALLOC_FAILURE_ACTION |
#define MALLOC_FAILURE_ACTION |
/* The maximum possible size_t value has all bits set */ |
#define MAX_SIZE_T (~(size_t)0) |
#define ONLY_MSPACES 0 |
#define MSPACES 0 |
#ifdef MALLOC_ALIGNMENT_16 |
#define MALLOC_ALIGNMENT ((size_t)16U) |
#else |
#define MALLOC_ALIGNMENT ((size_t)8U) |
#endif |
#define FOOTERS 0 |
#define ABORT \ |
{ \ |
DEBUG("%s abort in %s on line %d\n", __FILE__, __func__, __LINE__); \ |
abort(); \ |
} |
#define ABORT_ON_ASSERT_FAILURE 1 |
#define PROCEED_ON_ERROR 0 |
#define USE_LOCKS 1 |
#define INSECURE 0 |
#define HAVE_MMAP 0 |
#define MMAP_CLEARS 1 |
#define HAVE_MORECORE 1 |
#define MORECORE_CONTIGUOUS 1 |
#define MORECORE sbrk |
#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */ |
#ifndef DEFAULT_TRIM_THRESHOLD |
#ifndef MORECORE_CANNOT_TRIM |
#define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U) |
#else /* MORECORE_CANNOT_TRIM */ |
#define DEFAULT_TRIM_THRESHOLD MAX_SIZE_T |
#endif /* MORECORE_CANNOT_TRIM */ |
#endif /* DEFAULT_TRIM_THRESHOLD */ |
#ifndef DEFAULT_MMAP_THRESHOLD |
#if HAVE_MMAP |
#define DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U) |
#else /* HAVE_MMAP */ |
#define DEFAULT_MMAP_THRESHOLD MAX_SIZE_T |
#endif /* HAVE_MMAP */ |
#endif /* DEFAULT_MMAP_THRESHOLD */ |
#ifndef USE_BUILTIN_FFS |
#define USE_BUILTIN_FFS 0 |
#endif /* USE_BUILTIN_FFS */ |
#ifndef USE_DEV_RANDOM |
#define USE_DEV_RANDOM 0 |
#endif /* USE_DEV_RANDOM */ |
#ifndef NO_MALLINFO |
#define NO_MALLINFO 0 |
#endif /* NO_MALLINFO */ |
#ifndef MALLINFO_FIELD_TYPE |
#define MALLINFO_FIELD_TYPE size_t |
#endif /* MALLINFO_FIELD_TYPE */ |
/* |
mallopt tuning options. SVID/XPG defines four standard parameter |
numbers for mallopt, normally defined in malloc.h. None of these |
are used in this malloc, so setting them has no effect. But this |
malloc does support the following options. |
*/ |
#define M_TRIM_THRESHOLD (-1) |
#define M_GRANULARITY (-2) |
#define M_MMAP_THRESHOLD (-3) |
/* |
======================================================================== |
To make a fully customizable malloc.h header file, cut everything |
above this line, put into file malloc.h, edit to suit, and #include it |
on the next line, as well as in programs that use this malloc. |
======================================================================== |
*/ |
#include "malloc.h" |
/*------------------------------ internal #includes ---------------------- */ |
#include <stdio.h> /* for printing in malloc_stats */ |
#include <string.h> |
#ifndef LACKS_ERRNO_H |
#include <errno.h> /* for MALLOC_FAILURE_ACTION */ |
#endif /* LACKS_ERRNO_H */ |
#if FOOTERS |
#include <time.h> /* for magic initialization */ |
#endif /* FOOTERS */ |
#ifndef LACKS_STDLIB_H |
#include <stdlib.h> /* for abort() */ |
#endif /* LACKS_STDLIB_H */ |
#ifdef DEBUG |
#if ABORT_ON_ASSERT_FAILURE |
#define assert(x) {if(!(x)) {DEBUG(#x);ABORT;}} |
#else /* ABORT_ON_ASSERT_FAILURE */ |
#include <assert.h> |
#endif /* ABORT_ON_ASSERT_FAILURE */ |
#else /* DEBUG */ |
#define assert(x) |
#endif /* DEBUG */ |
#if USE_BUILTIN_FFS |
#ifndef LACKS_STRINGS_H |
#include <strings.h> /* for ffs */ |
#endif /* LACKS_STRINGS_H */ |
#endif /* USE_BUILTIN_FFS */ |
#if HAVE_MMAP |
#ifndef LACKS_SYS_MMAN_H |
#include <sys/mman.h> /* for mmap */ |
#endif /* LACKS_SYS_MMAN_H */ |
#ifndef LACKS_FCNTL_H |
#include <fcntl.h> |
#endif /* LACKS_FCNTL_H */ |
#endif /* HAVE_MMAP */ |
#if HAVE_MORECORE |
#ifndef LACKS_UNISTD_H |
#include <unistd.h> /* for sbrk */ |
#else /* LACKS_UNISTD_H */ |
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) |
extern void* sbrk(ptrdiff_t); |
#endif /* FreeBSD etc */ |
#endif /* LACKS_UNISTD_H */ |
#endif /* HAVE_MMAP */ |
#ifndef WIN32 |
#ifndef malloc_getpagesize |
# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */ |
# ifndef _SC_PAGE_SIZE |
# define _SC_PAGE_SIZE _SC_PAGESIZE |
# endif |
# endif |
# ifdef _SC_PAGE_SIZE |
# define malloc_getpagesize sysconf(_SC_PAGE_SIZE) |
# else |
# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE) |
extern size_t getpagesize(); |
# define malloc_getpagesize getpagesize() |
# else |
# ifdef WIN32 /* use supplied emulation of getpagesize */ |
# define malloc_getpagesize getpagesize() |
# else |
# ifndef LACKS_SYS_PARAM_H |
# include <sys/param.h> |
# endif |
# ifdef EXEC_PAGESIZE |
# define malloc_getpagesize EXEC_PAGESIZE |
# else |
# ifdef NBPG |
# ifndef CLSIZE |
# define malloc_getpagesize NBPG |
# else |
# define malloc_getpagesize (NBPG * CLSIZE) |
# endif |
# else |
# ifdef NBPC |
# define malloc_getpagesize NBPC |
# else |
# ifdef PAGESIZE |
# define malloc_getpagesize PAGESIZE |
# else /* just guess */ |
# define malloc_getpagesize ((size_t)4096U) |
# endif |
# endif |
# endif |
# endif |
# endif |
# endif |
# endif |
#endif |
#endif |
/* ------------------- size_t and alignment properties -------------------- */ |
/* The byte and bit size of a size_t */ |
#define SIZE_T_SIZE (sizeof(size_t)) |
#define SIZE_T_BITSIZE (sizeof(size_t) << 3) |
/* Some constants coerced to size_t */ |
/* Annoying but necessary to avoid errors on some plaftorms */ |
#define SIZE_T_ZERO ((size_t)0) |
#define SIZE_T_ONE ((size_t)1) |
#define SIZE_T_TWO ((size_t)2) |
#define TWO_SIZE_T_SIZES (SIZE_T_SIZE<<1) |
#define FOUR_SIZE_T_SIZES (SIZE_T_SIZE<<2) |
#define SIX_SIZE_T_SIZES (FOUR_SIZE_T_SIZES+TWO_SIZE_T_SIZES) |
#define HALF_MAX_SIZE_T (MAX_SIZE_T / 2U) |
/* The bit mask value corresponding to MALLOC_ALIGNMENT */ |
#define CHUNK_ALIGN_MASK (MALLOC_ALIGNMENT - SIZE_T_ONE) |
/* True if address a has acceptable alignment */ |
#define is_aligned(A) (((size_t)((A)) & (CHUNK_ALIGN_MASK)) == 0) |
/* the number of bytes to offset an address to align it */ |
#define align_offset(A)\ |
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\ |
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK)) |
/* -------------------------- MMAP preliminaries ------------------------- */ |
/* |
If HAVE_MORECORE or HAVE_MMAP are false, we just define calls and |
checks to fail so compiler optimizer can delete code rather than |
using so many "#if"s. |
*/ |
/* MORECORE and MMAP must return MFAIL on failure */ |
#define MFAIL ((void*)(MAX_SIZE_T)) |
#define CMFAIL ((char*)(MFAIL)) /* defined for convenience */ |
#if !HAVE_MMAP |
#define IS_MMAPPED_BIT (SIZE_T_ZERO) |
#define USE_MMAP_BIT (SIZE_T_ZERO) |
#define CALL_MMAP(s) MFAIL |
#define CALL_MUNMAP(a, s) (-1) |
#define DIRECT_MMAP(s) MFAIL |
#else /* HAVE_MMAP */ |
#define IS_MMAPPED_BIT (SIZE_T_ONE) |
#define USE_MMAP_BIT (SIZE_T_ONE) |
#ifndef WIN32 |
#define CALL_MUNMAP(a, s) munmap((a), (s)) |
#define MMAP_PROT (PROT_READ|PROT_WRITE) |
#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) |
#define MAP_ANONYMOUS MAP_ANON |
#endif /* MAP_ANON */ |
#ifdef MAP_ANONYMOUS |
#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS) |
#define CALL_MMAP(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0) |
#else /* MAP_ANONYMOUS */ |
/* |
Nearly all versions of mmap support MAP_ANONYMOUS, so the following |
is unlikely to be needed, but is supplied just in case. |
*/ |
#define MMAP_FLAGS (MAP_PRIVATE) |
static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */ |
#define CALL_MMAP(s) ((dev_zero_fd < 0) ? \ |
(dev_zero_fd = open("/dev/zero", O_RDWR), \ |
mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) : \ |
mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) |
#endif /* MAP_ANONYMOUS */ |
#define DIRECT_MMAP(s) CALL_MMAP(s) |
#else /* WIN32 */ |
/* Win32 MMAP via VirtualAlloc */ |
static void* win32mmap(size_t size) { |
void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); |
return (ptr != 0)? ptr: MFAIL; |
} |
/* For direct MMAP, use MEM_TOP_DOWN to minimize interference */ |
static void* win32direct_mmap(size_t size) { |
void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN, |
PAGE_READWRITE); |
return (ptr != 0)? ptr: MFAIL; |
} |
/* This function supports releasing coalesed segments */ |
static int win32munmap(void* ptr, size_t size) { |
MEMORY_BASIC_INFORMATION minfo; |
char* cptr = ptr; |
while (size) { |
if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0) |
return -1; |
if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr || |
minfo.State != MEM_COMMIT || minfo.RegionSize > size) |
return -1; |
if (VirtualFree(cptr, 0, MEM_RELEASE) == 0) |
return -1; |
cptr += minfo.RegionSize; |
size -= minfo.RegionSize; |
} |
return 0; |
} |
#define CALL_MMAP(s) win32mmap(s) |
#define CALL_MUNMAP(a, s) win32munmap((a), (s)) |
#define DIRECT_MMAP(s) win32direct_mmap(s) |
#endif /* WIN32 */ |
#endif /* HAVE_MMAP */ |
#if HAVE_MMAP && HAVE_MREMAP |
#define CALL_MREMAP(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv)) |
#else /* HAVE_MMAP && HAVE_MREMAP */ |
#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL |
#endif /* HAVE_MMAP && HAVE_MREMAP */ |
#if HAVE_MORECORE |
#define CALL_MORECORE(S) MORECORE(S) |
#else /* HAVE_MORECORE */ |
#define CALL_MORECORE(S) MFAIL |
#endif /* HAVE_MORECORE */ |
/* mstate bit set if continguous morecore disabled or failed */ |
#define USE_NONCONTIGUOUS_BIT (4U) |
/* segment bit set in create_mspace_with_base */ |
#define EXTERN_BIT (8U) |
/* --------------------------- Lock preliminaries ------------------------ */ |
#if USE_LOCKS |
/* |
When locks are defined, there are up to two global locks: |
* If HAVE_MORECORE, morecore_mutex protects sequences of calls to |
MORECORE. In many cases sys_alloc requires two calls, that should |
not be interleaved with calls by other threads. This does not |
protect against direct calls to MORECORE by other threads not |
using this lock, so there is still code to cope the best we can on |
interference. |
* magic_init_mutex ensures that mparams.magic and other |
unique mparams values are initialized only once. |
*/ |
/* By default use posix locks */ |
#include <futex.h> |
#define MLOCK_T atomic_t |
#define INITIAL_LOCK(l) futex_initialize(l, 1) |
/* futex_down cannot fail, but can return different |
* retvals for OK |
*/ |
#define ACQUIRE_LOCK(l) ({futex_down(l);0;}) |
#define RELEASE_LOCK(l) futex_up(l) |
#if HAVE_MORECORE |
static MLOCK_T morecore_mutex = FUTEX_INITIALIZER; |
#endif /* HAVE_MORECORE */ |
static MLOCK_T magic_init_mutex = FUTEX_INITIALIZER; |
#define USE_LOCK_BIT (2U) |
#else /* USE_LOCKS */ |
#define USE_LOCK_BIT (0U) |
#define INITIAL_LOCK(l) |
#endif /* USE_LOCKS */ |
#if USE_LOCKS && HAVE_MORECORE |
#define ACQUIRE_MORECORE_LOCK() ACQUIRE_LOCK(&morecore_mutex); |
#define RELEASE_MORECORE_LOCK() RELEASE_LOCK(&morecore_mutex); |
#else /* USE_LOCKS && HAVE_MORECORE */ |
#define ACQUIRE_MORECORE_LOCK() |
#define RELEASE_MORECORE_LOCK() |
#endif /* USE_LOCKS && HAVE_MORECORE */ |
#if USE_LOCKS |
#define ACQUIRE_MAGIC_INIT_LOCK() ACQUIRE_LOCK(&magic_init_mutex); |
#define RELEASE_MAGIC_INIT_LOCK() RELEASE_LOCK(&magic_init_mutex); |
#else /* USE_LOCKS */ |
#define ACQUIRE_MAGIC_INIT_LOCK() |
#define RELEASE_MAGIC_INIT_LOCK() |
#endif /* USE_LOCKS */ |
/* ----------------------- Chunk representations ------------------------ */ |
/* |
(The following includes lightly edited explanations by Colin Plumb.) |
The malloc_chunk declaration below is misleading (but accurate and |
necessary). It declares a "view" into memory allowing access to |
necessary fields at known offsets from a given base. |
Chunks of memory are maintained using a `boundary tag' method as |
originally described by Knuth. (See the paper by Paul Wilson |
ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a survey of such |
techniques.) Sizes of free chunks are stored both in the front of |
each chunk and at the end. This makes consolidating fragmented |
chunks into bigger chunks fast. The head fields also hold bits |
representing whether chunks are free or in use. |
Here are some pictures to make it clearer. They are "exploded" to |
show that the state of a chunk can be thought of as extending from |
the high 31 bits of the head field of its header through the |
prev_foot and PINUSE_BIT bit of the following chunk header. |
A chunk that's in use looks like: |
chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Size of previous chunk (if P = 1) | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P| |
| Size of this chunk 1| +-+ |
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| | |
+- -+ |
| | |
+- -+ |
| : |
+- size - sizeof(size_t) available payload bytes -+ |
: | |
chunk-> +- -+ |
| | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1| |
| Size of next chunk (may or may not be in use) | +-+ |
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
And if it's free, it looks like this: |
chunk-> +- -+ |
| User payload (must be in use, or we would have merged!) | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P| |
| Size of this chunk 0| +-+ |
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Next pointer | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Prev pointer | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| : |
+- size - sizeof(struct chunk) unused bytes -+ |
: | |
chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Size of this chunk | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0| |
| Size of next chunk (must be in use, or we would have merged)| +-+ |
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| : |
+- User payload -+ |
: | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
|0| |
+-+ |
Note that since we always merge adjacent free chunks, the chunks |
adjacent to a free chunk must be in use. |
Given a pointer to a chunk (which can be derived trivially from the |
payload pointer) we can, in O(1) time, find out whether the adjacent |
chunks are free, and if so, unlink them from the lists that they |
are on and merge them with the current chunk. |
Chunks always begin on even word boundaries, so the mem portion |
(which is returned to the user) is also on an even word boundary, and |
thus at least double-word aligned. |
The P (PINUSE_BIT) bit, stored in the unused low-order bit of the |
chunk size (which is always a multiple of two words), is an in-use |
bit for the *previous* chunk. If that bit is *clear*, then the |
word before the current chunk size contains the previous chunk |
size, and can be used to find the front of the previous chunk. |
The very first chunk allocated always has this bit set, preventing |
access to non-existent (or non-owned) memory. If pinuse is set for |
any given chunk, then you CANNOT determine the size of the |
previous chunk, and might even get a memory addressing fault when |
trying to do so. |
The C (CINUSE_BIT) bit, stored in the unused second-lowest bit of |
the chunk size redundantly records whether the current chunk is |
inuse. This redundancy enables usage checks within free and realloc, |
and reduces indirection when freeing and consolidating chunks. |
Each freshly allocated chunk must have both cinuse and pinuse set. |
That is, each allocated chunk borders either a previously allocated |
and still in-use chunk, or the base of its memory arena. This is |
ensured by making all allocations from the the `lowest' part of any |
found chunk. Further, no free chunk physically borders another one, |
so each free chunk is known to be preceded and followed by either |
inuse chunks or the ends of memory. |
Note that the `foot' of the current chunk is actually represented |
as the prev_foot of the NEXT chunk. This makes it easier to |
deal with alignments etc but can be very confusing when trying |
to extend or adapt this code. |
The exceptions to all this are |
1. The special chunk `top' is the top-most available chunk (i.e., |
the one bordering the end of available memory). It is treated |
specially. Top is never included in any bin, is used only if |
no other chunk is available, and is released back to the |
system if it is very large (see M_TRIM_THRESHOLD). In effect, |
the top chunk is treated as larger (and thus less well |
fitting) than any other available chunk. The top chunk |
doesn't update its trailing size field since there is no next |
contiguous chunk that would have to index off it. However, |
space is still allocated for it (TOP_FOOT_SIZE) to enable |
separation or merging when space is extended. |
3. Chunks allocated via mmap, which have the lowest-order bit |
(IS_MMAPPED_BIT) set in their prev_foot fields, and do not set |
PINUSE_BIT in their head fields. Because they are allocated |
one-by-one, each must carry its own prev_foot field, which is |
also used to hold the offset this chunk has within its mmapped |
region, which is needed to preserve alignment. Each mmapped |
chunk is trailed by the first two fields of a fake next-chunk |
for sake of usage checks. |
*/ |
struct malloc_chunk { |
size_t prev_foot; /* Size of previous chunk (if free). */ |
size_t head; /* Size and inuse bits. */ |
struct malloc_chunk* fd; /* double links -- used only if free. */ |
struct malloc_chunk* bk; |
}; |
typedef struct malloc_chunk mchunk; |
typedef struct malloc_chunk* mchunkptr; |
typedef struct malloc_chunk* sbinptr; /* The type of bins of chunks */ |
typedef unsigned int bindex_t; /* Described below */ |
typedef unsigned int binmap_t; /* Described below */ |
typedef unsigned int flag_t; /* The type of various bit flag sets */ |
/* ------------------- Chunks sizes and alignments ----------------------- */ |
#define MCHUNK_SIZE (sizeof(mchunk)) |
#if FOOTERS |
#define CHUNK_OVERHEAD (TWO_SIZE_T_SIZES) |
#else /* FOOTERS */ |
#define CHUNK_OVERHEAD (SIZE_T_SIZE) |
#endif /* FOOTERS */ |
/* MMapped chunks need a second word of overhead ... */ |
#define MMAP_CHUNK_OVERHEAD (TWO_SIZE_T_SIZES) |
/* ... and additional padding for fake next-chunk at foot */ |
#define MMAP_FOOT_PAD (FOUR_SIZE_T_SIZES) |
/* The smallest size we can malloc is an aligned minimal chunk */ |
#define MIN_CHUNK_SIZE\ |
((MCHUNK_SIZE + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK) |
/* conversion from malloc headers to user pointers, and back */ |
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES)) |
#define mem2chunk(mem) ((mchunkptr)((char*)(mem) - TWO_SIZE_T_SIZES)) |
/* chunk associated with aligned address A */ |
#define align_as_chunk(A) (mchunkptr)((A) + align_offset(chunk2mem(A))) |
/* Bounds on request (not chunk) sizes. */ |
#define MAX_REQUEST ((-MIN_CHUNK_SIZE) << 2) |
#define MIN_REQUEST (MIN_CHUNK_SIZE - CHUNK_OVERHEAD - SIZE_T_ONE) |
/* pad request bytes into a usable size */ |
#define pad_request(req) \ |
(((req) + CHUNK_OVERHEAD + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK) |
/* pad request, checking for minimum (but not maximum) */ |
#define request2size(req) \ |
(((req) < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(req)) |
/* ------------------ Operations on head and foot fields ----------------- */ |
/* |
The head field of a chunk is or'ed with PINUSE_BIT when previous |
adjacent chunk in use, and or'ed with CINUSE_BIT if this chunk is in |
use. If the chunk was obtained with mmap, the prev_foot field has |
IS_MMAPPED_BIT set, otherwise holding the offset of the base of the |
mmapped region to the base of the chunk. |
*/ |
#define PINUSE_BIT (SIZE_T_ONE) |
#define CINUSE_BIT (SIZE_T_TWO) |
#define INUSE_BITS (PINUSE_BIT|CINUSE_BIT) |
/* Head value for fenceposts */ |
#define FENCEPOST_HEAD (INUSE_BITS|SIZE_T_SIZE) |
/* extraction of fields from head words */ |
#define cinuse(p) ((p)->head & CINUSE_BIT) |
#define pinuse(p) ((p)->head & PINUSE_BIT) |
#define chunksize(p) ((p)->head & ~(INUSE_BITS)) |
#define clear_pinuse(p) ((p)->head &= ~PINUSE_BIT) |
#define clear_cinuse(p) ((p)->head &= ~CINUSE_BIT) |
/* Treat space at ptr +/- offset as a chunk */ |
#define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s))) |
#define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s))) |
/* Ptr to next or previous physical malloc_chunk. */ |
#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~INUSE_BITS))) |
#define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) )) |
/* extract next chunk's pinuse bit */ |
#define next_pinuse(p) ((next_chunk(p)->head) & PINUSE_BIT) |
/* Get/set size at footer */ |
#define get_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot) |
#define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot = (s)) |
/* Set size, pinuse bit, and foot */ |
#define set_size_and_pinuse_of_free_chunk(p, s)\ |
((p)->head = (s|PINUSE_BIT), set_foot(p, s)) |
/* Set size, pinuse bit, foot, and clear next pinuse */ |
#define set_free_with_pinuse(p, s, n)\ |
(clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s)) |
#define is_mmapped(p)\ |
(!((p)->head & PINUSE_BIT) && ((p)->prev_foot & IS_MMAPPED_BIT)) |
/* Get the internal overhead associated with chunk p */ |
#define overhead_for(p)\ |
(is_mmapped(p)? MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD) |
/* Return true if malloced space is not necessarily cleared */ |
#if MMAP_CLEARS |
#define calloc_must_clear(p) (!is_mmapped(p)) |
#else /* MMAP_CLEARS */ |
#define calloc_must_clear(p) (1) |
#endif /* MMAP_CLEARS */ |
/* ---------------------- Overlaid data structures ----------------------- */ |
/* |
When chunks are not in use, they are treated as nodes of either |
lists or trees. |
"Small" chunks are stored in circular doubly-linked lists, and look |
like this: |
chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Size of previous chunk | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
`head:' | Size of chunk, in bytes |P| |
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Forward pointer to next chunk in list | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Back pointer to previous chunk in list | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Unused space (may be 0 bytes long) . |
. . |
. | |
nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
`foot:' | Size of chunk, in bytes | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
Larger chunks are kept in a form of bitwise digital trees (aka |
tries) keyed on chunksizes. Because malloc_tree_chunks are only for |
free chunks greater than 256 bytes, their size doesn't impose any |
constraints on user chunk sizes. Each node looks like: |
chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Size of previous chunk | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
`head:' | Size of chunk, in bytes |P| |
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Forward pointer to next chunk of same size | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Back pointer to previous chunk of same size | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Pointer to left child (child[0]) | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Pointer to right child (child[1]) | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Pointer to parent | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| bin index of this chunk | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| Unused space . |
. | |
nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
`foot:' | Size of chunk, in bytes | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
Each tree holding treenodes is a tree of unique chunk sizes. Chunks |
of the same size are arranged in a circularly-linked list, with only |
the oldest chunk (the next to be used, in our FIFO ordering) |
actually in the tree. (Tree members are distinguished by a non-null |
parent pointer.) If a chunk with the same size an an existing node |
is inserted, it is linked off the existing node using pointers that |
work in the same way as fd/bk pointers of small chunks. |
Each tree contains a power of 2 sized range of chunk sizes (the |
smallest is 0x100 <= x < 0x180), which is is divided in half at each |
tree level, with the chunks in the smaller half of the range (0x100 |
<= x < 0x140 for the top nose) in the left subtree and the larger |
half (0x140 <= x < 0x180) in the right subtree. This is, of course, |
done by inspecting individual bits. |
Using these rules, each node's left subtree contains all smaller |
sizes than its right subtree. However, the node at the root of each |
subtree has no particular ordering relationship to either. (The |
dividing line between the subtree sizes is based on trie relation.) |
If we remove the last chunk of a given size from the interior of the |
tree, we need to replace it with a leaf node. The tree ordering |
rules permit a node to be replaced by any leaf below it. |
The smallest chunk in a tree (a common operation in a best-fit |
allocator) can be found by walking a path to the leftmost leaf in |
the tree. Unlike a usual binary tree, where we follow left child |
pointers until we reach a null, here we follow the right child |
pointer any time the left one is null, until we reach a leaf with |
both child pointers null. The smallest chunk in the tree will be |
somewhere along that path. |
The worst case number of steps to add, find, or remove a node is |
bounded by the number of bits differentiating chunks within |
bins. Under current bin calculations, this ranges from 6 up to 21 |
(for 32 bit sizes) or up to 53 (for 64 bit sizes). The typical case |
is of course much better. |
*/ |
struct malloc_tree_chunk { |
/* The first four fields must be compatible with malloc_chunk */ |
size_t prev_foot; |
size_t head; |
struct malloc_tree_chunk* fd; |
struct malloc_tree_chunk* bk; |
struct malloc_tree_chunk* child[2]; |
struct malloc_tree_chunk* parent; |
bindex_t index; |
}; |
typedef struct malloc_tree_chunk tchunk; |
typedef struct malloc_tree_chunk* tchunkptr; |
typedef struct malloc_tree_chunk* tbinptr; /* The type of bins of trees */ |
/* A little helper macro for trees */ |
#define leftmost_child(t) ((t)->child[0] != 0? (t)->child[0] : (t)->child[1]) |
/* ----------------------------- Segments -------------------------------- */ |
/* |
Each malloc space may include non-contiguous segments, held in a |
list headed by an embedded malloc_segment record representing the |
top-most space. Segments also include flags holding properties of |
the space. Large chunks that are directly allocated by mmap are not |
included in this list. They are instead independently created and |
destroyed without otherwise keeping track of them. |
Segment management mainly comes into play for spaces allocated by |
MMAP. Any call to MMAP might or might not return memory that is |
adjacent to an existing segment. MORECORE normally contiguously |
extends the current space, so this space is almost always adjacent, |
which is simpler and faster to deal with. (This is why MORECORE is |
used preferentially to MMAP when both are available -- see |
sys_alloc.) When allocating using MMAP, we don't use any of the |
hinting mechanisms (inconsistently) supported in various |
implementations of unix mmap, or distinguish reserving from |
committing memory. Instead, we just ask for space, and exploit |
contiguity when we get it. It is probably possible to do |
better than this on some systems, but no general scheme seems |
to be significantly better. |
Management entails a simpler variant of the consolidation scheme |
used for chunks to reduce fragmentation -- new adjacent memory is |
normally prepended or appended to an existing segment. However, |
there are limitations compared to chunk consolidation that mostly |
reflect the fact that segment processing is relatively infrequent |
(occurring only when getting memory from system) and that we |
don't expect to have huge numbers of segments: |
* Segments are not indexed, so traversal requires linear scans. (It |
would be possible to index these, but is not worth the extra |
overhead and complexity for most programs on most platforms.) |
* New segments are only appended to old ones when holding top-most |
memory; if they cannot be prepended to others, they are held in |
different segments. |
Except for the top-most segment of an mstate, each segment record |
is kept at the tail of its segment. Segments are added by pushing |
segment records onto the list headed by &mstate.seg for the |
containing mstate. |
Segment flags control allocation/merge/deallocation policies: |
* If EXTERN_BIT set, then we did not allocate this segment, |
and so should not try to deallocate or merge with others. |
(This currently holds only for the initial segment passed |
into create_mspace_with_base.) |
* If IS_MMAPPED_BIT set, the segment may be merged with |
other surrounding mmapped segments and trimmed/de-allocated |
using munmap. |
* If neither bit is set, then the segment was obtained using |
MORECORE so can be merged with surrounding MORECORE'd segments |
and deallocated/trimmed using MORECORE with negative arguments. |
*/ |
struct malloc_segment { |
char* base; /* base address */ |
size_t size; /* allocated size */ |
struct malloc_segment* next; /* ptr to next segment */ |
flag_t sflags; /* mmap and extern flag */ |
}; |
#define is_mmapped_segment(S) ((S)->sflags & IS_MMAPPED_BIT) |
#define is_extern_segment(S) ((S)->sflags & EXTERN_BIT) |
typedef struct malloc_segment msegment; |
typedef struct malloc_segment* msegmentptr; |
/* ---------------------------- malloc_state ----------------------------- */ |
/* |
A malloc_state holds all of the bookkeeping for a space. |
The main fields are: |
Top |
The topmost chunk of the currently active segment. Its size is |
cached in topsize. The actual size of topmost space is |
topsize+TOP_FOOT_SIZE, which includes space reserved for adding |
fenceposts and segment records if necessary when getting more |
space from the system. The size at which to autotrim top is |
cached from mparams in trim_check, except that it is disabled if |
an autotrim fails. |
Designated victim (dv) |
This is the preferred chunk for servicing small requests that |
don't have exact fits. It is normally the chunk split off most |
recently to service another small request. Its size is cached in |
dvsize. The link fields of this chunk are not maintained since it |
is not kept in a bin. |
SmallBins |
An array of bin headers for free chunks. These bins hold chunks |
with sizes less than MIN_LARGE_SIZE bytes. Each bin contains |
chunks of all the same size, spaced 8 bytes apart. To simplify |
use in double-linked lists, each bin header acts as a malloc_chunk |
pointing to the real first node, if it exists (else pointing to |
itself). This avoids special-casing for headers. But to avoid |
waste, we allocate only the fd/bk pointers of bins, and then use |
repositioning tricks to treat these as the fields of a chunk. |
TreeBins |
Treebins are pointers to the roots of trees holding a range of |
sizes. There are 2 equally spaced treebins for each power of two |
from TREE_SHIFT to TREE_SHIFT+16. The last bin holds anything |
larger. |
Bin maps |
There is one bit map for small bins ("smallmap") and one for |
treebins ("treemap). Each bin sets its bit when non-empty, and |
clears the bit when empty. Bit operations are then used to avoid |
bin-by-bin searching -- nearly all "search" is done without ever |
looking at bins that won't be selected. The bit maps |
conservatively use 32 bits per map word, even if on 64bit system. |
For a good description of some of the bit-based techniques used |
here, see Henry S. Warren Jr's book "Hacker's Delight" (and |
supplement at http://hackersdelight.org/). Many of these are |
intended to reduce the branchiness of paths through malloc etc, as |
well as to reduce the number of memory locations read or written. |
Segments |
A list of segments headed by an embedded malloc_segment record |
representing the initial space. |
Address check support |
The least_addr field is the least address ever obtained from |
MORECORE or MMAP. Attempted frees and reallocs of any address less |
than this are trapped (unless INSECURE is defined). |
Magic tag |
A cross-check field that should always hold same value as mparams.magic. |
Flags |
Bits recording whether to use MMAP, locks, or contiguous MORECORE |
Statistics |
Each space keeps track of current and maximum system memory |
obtained via MORECORE or MMAP. |
Locking |
If USE_LOCKS is defined, the "mutex" lock is acquired and released |
around every public call using this mspace. |
*/ |
/* Bin types, widths and sizes */ |
#define NSMALLBINS (32U) |
#define NTREEBINS (32U) |
#define SMALLBIN_SHIFT (3U) |
#define SMALLBIN_WIDTH (SIZE_T_ONE << SMALLBIN_SHIFT) |
#define TREEBIN_SHIFT (8U) |
#define MIN_LARGE_SIZE (SIZE_T_ONE << TREEBIN_SHIFT) |
#define MAX_SMALL_SIZE (MIN_LARGE_SIZE - SIZE_T_ONE) |
#define MAX_SMALL_REQUEST (MAX_SMALL_SIZE - CHUNK_ALIGN_MASK - CHUNK_OVERHEAD) |
struct malloc_state { |
binmap_t smallmap; |
binmap_t treemap; |
size_t dvsize; |
size_t topsize; |
char* least_addr; |
mchunkptr dv; |
mchunkptr top; |
size_t trim_check; |
size_t magic; |
mchunkptr smallbins[(NSMALLBINS+1)*2]; |
tbinptr treebins[NTREEBINS]; |
size_t footprint; |
size_t max_footprint; |
flag_t mflags; |
#if USE_LOCKS |
MLOCK_T mutex; /* locate lock among fields that rarely change */ |
#endif /* USE_LOCKS */ |
msegment seg; |
}; |
typedef struct malloc_state* mstate; |
/* ------------- Global malloc_state and malloc_params ------------------- */ |
/* |
malloc_params holds global properties, including those that can be |
dynamically set using mallopt. There is a single instance, mparams, |
initialized in init_mparams. |
*/ |
struct malloc_params { |
size_t magic; |
size_t page_size; |
size_t granularity; |
size_t mmap_threshold; |
size_t trim_threshold; |
flag_t default_mflags; |
}; |
static struct malloc_params mparams; |
/* The global malloc_state used for all non-"mspace" calls */ |
static struct malloc_state _gm_; |
#define gm (&_gm_) |
#define is_global(M) ((M) == &_gm_) |
#define is_initialized(M) ((M)->top != 0) |
/* -------------------------- system alloc setup ------------------------- */ |
/* Operations on mflags */ |
#define use_lock(M) ((M)->mflags & USE_LOCK_BIT) |
#define enable_lock(M) ((M)->mflags |= USE_LOCK_BIT) |
#define disable_lock(M) ((M)->mflags &= ~USE_LOCK_BIT) |
#define use_mmap(M) ((M)->mflags & USE_MMAP_BIT) |
#define enable_mmap(M) ((M)->mflags |= USE_MMAP_BIT) |
#define disable_mmap(M) ((M)->mflags &= ~USE_MMAP_BIT) |
#define use_noncontiguous(M) ((M)->mflags & USE_NONCONTIGUOUS_BIT) |
#define disable_contiguous(M) ((M)->mflags |= USE_NONCONTIGUOUS_BIT) |
#define set_lock(M,L)\ |
((M)->mflags = (L)?\ |
((M)->mflags | USE_LOCK_BIT) :\ |
((M)->mflags & ~USE_LOCK_BIT)) |
/* page-align a size */ |
#define page_align(S)\ |
(((S) + (mparams.page_size)) & ~(mparams.page_size - SIZE_T_ONE)) |
/* granularity-align a size */ |
#define granularity_align(S)\ |
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE)) |
#define is_page_aligned(S)\ |
(((size_t)(S) & (mparams.page_size - SIZE_T_ONE)) == 0) |
#define is_granularity_aligned(S)\ |
(((size_t)(S) & (mparams.granularity - SIZE_T_ONE)) == 0) |
/* True if segment S holds address A */ |
#define segment_holds(S, A)\ |
((char*)(A) >= S->base && (char*)(A) < S->base + S->size) |
/* Return segment holding given address */ |
static msegmentptr segment_holding(mstate m, char* addr) { |
msegmentptr sp = &m->seg; |
for (;;) { |
if (addr >= sp->base && addr < sp->base + sp->size) |
return sp; |
if ((sp = sp->next) == 0) |
return 0; |
} |
} |
/* Return true if segment contains a segment link */ |
static int has_segment_link(mstate m, msegmentptr ss) { |
msegmentptr sp = &m->seg; |
for (;;) { |
if ((char*)sp >= ss->base && (char*)sp < ss->base + ss->size) |
return 1; |
if ((sp = sp->next) == 0) |
return 0; |
} |
} |
#ifndef MORECORE_CANNOT_TRIM |
#define should_trim(M,s) ((s) > (M)->trim_check) |
#else /* MORECORE_CANNOT_TRIM */ |
#define should_trim(M,s) (0) |
#endif /* MORECORE_CANNOT_TRIM */ |
/* |
TOP_FOOT_SIZE is padding at the end of a segment, including space |
that may be needed to place segment records and fenceposts when new |
noncontiguous segments are added. |
*/ |
#define TOP_FOOT_SIZE\ |
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE) |
/* ------------------------------- Hooks -------------------------------- */ |
/* |
PREACTION should be defined to return 0 on success, and nonzero on |
failure. If you are not using locking, you can redefine these to do |
anything you like. |
*/ |
#if USE_LOCKS |
/* Ensure locks are initialized */ |
#define GLOBALLY_INITIALIZE() (mparams.page_size == 0 && init_mparams()) |
#define PREACTION(M) ((GLOBALLY_INITIALIZE() || use_lock(M))? ACQUIRE_LOCK(&(M)->mutex) : 0) |
#define POSTACTION(M) { if (use_lock(M)) RELEASE_LOCK(&(M)->mutex); } |
#else /* USE_LOCKS */ |
#ifndef PREACTION |
#define PREACTION(M) (0) |
#endif /* PREACTION */ |
#ifndef POSTACTION |
#define POSTACTION(M) |
#endif /* POSTACTION */ |
#endif /* USE_LOCKS */ |
/* |
CORRUPTION_ERROR_ACTION is triggered upon detected bad addresses. |
USAGE_ERROR_ACTION is triggered on detected bad frees and |
reallocs. The argument p is an address that might have triggered the |
fault. It is ignored by the two predefined actions, but might be |
useful in custom actions that try to help diagnose errors. |
*/ |
#if PROCEED_ON_ERROR |
/* A count of the number of corruption errors causing resets */ |
int malloc_corruption_error_count; |
/* default corruption action */ |
static void reset_on_error(mstate m); |
#define CORRUPTION_ERROR_ACTION(m) reset_on_error(m) |
#define USAGE_ERROR_ACTION(m, p) |
#else /* PROCEED_ON_ERROR */ |
#ifndef CORRUPTION_ERROR_ACTION |
#define CORRUPTION_ERROR_ACTION(m) ABORT |
#endif /* CORRUPTION_ERROR_ACTION */ |
#ifndef USAGE_ERROR_ACTION |
#define USAGE_ERROR_ACTION(m,p) ABORT |
#endif /* USAGE_ERROR_ACTION */ |
#endif /* PROCEED_ON_ERROR */ |
/* -------------------------- Debugging setup ---------------------------- */ |
#if ! DEBUG |
#define check_free_chunk(M,P) |
#define check_inuse_chunk(M,P) |
#define check_malloced_chunk(M,P,N) |
#define check_mmapped_chunk(M,P) |
#define check_malloc_state(M) |
#define check_top_chunk(M,P) |
#else /* DEBUG */ |
#define check_free_chunk(M,P) do_check_free_chunk(M,P) |
#define check_inuse_chunk(M,P) do_check_inuse_chunk(M,P) |
#define check_top_chunk(M,P) do_check_top_chunk(M,P) |
#define check_malloced_chunk(M,P,N) do_check_malloced_chunk(M,P,N) |
#define check_mmapped_chunk(M,P) do_check_mmapped_chunk(M,P) |
#define check_malloc_state(M) do_check_malloc_state(M) |
static void do_check_any_chunk(mstate m, mchunkptr p); |
static void do_check_top_chunk(mstate m, mchunkptr p); |
static void do_check_mmapped_chunk(mstate m, mchunkptr p); |
static void do_check_inuse_chunk(mstate m, mchunkptr p); |
static void do_check_free_chunk(mstate m, mchunkptr p); |
static void do_check_malloced_chunk(mstate m, void* mem, size_t s); |
static void do_check_tree(mstate m, tchunkptr t); |
static void do_check_treebin(mstate m, bindex_t i); |
static void do_check_smallbin(mstate m, bindex_t i); |
static void do_check_malloc_state(mstate m); |
static int bin_find(mstate m, mchunkptr x); |
static size_t traverse_and_check(mstate m); |
#endif /* DEBUG */ |
/* ---------------------------- Indexing Bins ---------------------------- */ |
#define is_small(s) (((s) >> SMALLBIN_SHIFT) < NSMALLBINS) |
#define small_index(s) ((s) >> SMALLBIN_SHIFT) |
#define small_index2size(i) ((i) << SMALLBIN_SHIFT) |
#define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE)) |
/* addressing by index. See above about smallbin repositioning */ |
#define smallbin_at(M, i) ((sbinptr)((char*)&((M)->smallbins[(i)<<1]))) |
#define treebin_at(M,i) (&((M)->treebins[i])) |
/* assign tree index for size S to variable I */ |
#if defined(__GNUC__) && defined(i386) |
#define compute_tree_index(S, I)\ |
{\ |
size_t X = S >> TREEBIN_SHIFT;\ |
if (X == 0)\ |
I = 0;\ |
else if (X > 0xFFFF)\ |
I = NTREEBINS-1;\ |
else {\ |
unsigned int K;\ |
asm("bsrl %1,%0\n\t" : "=r" (K) : "rm" (X));\ |
I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\ |
}\ |
} |
#else /* GNUC */ |
#define compute_tree_index(S, I)\ |
{\ |
size_t X = S >> TREEBIN_SHIFT;\ |
if (X == 0)\ |
I = 0;\ |
else if (X > 0xFFFF)\ |
I = NTREEBINS-1;\ |
else {\ |
unsigned int Y = (unsigned int)X;\ |
unsigned int N = ((Y - 0x100) >> 16) & 8;\ |
unsigned int K = (((Y <<= N) - 0x1000) >> 16) & 4;\ |
N += K;\ |
N += K = (((Y <<= K) - 0x4000) >> 16) & 2;\ |
K = 14 - N + ((Y <<= K) >> 15);\ |
I = (K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1));\ |
}\ |
} |
#endif /* GNUC */ |
/* Bit representing maximum resolved size in a treebin at i */ |
#define bit_for_tree_index(i) \ |
(i == NTREEBINS-1)? (SIZE_T_BITSIZE-1) : (((i) >> 1) + TREEBIN_SHIFT - 2) |
/* Shift placing maximum resolved bit in a treebin at i as sign bit */ |
#define leftshift_for_tree_index(i) \ |
((i == NTREEBINS-1)? 0 : \ |
((SIZE_T_BITSIZE-SIZE_T_ONE) - (((i) >> 1) + TREEBIN_SHIFT - 2))) |
/* The size of the smallest chunk held in bin with index i */ |
#define minsize_for_tree_index(i) \ |
((SIZE_T_ONE << (((i) >> 1) + TREEBIN_SHIFT)) | \ |
(((size_t)((i) & SIZE_T_ONE)) << (((i) >> 1) + TREEBIN_SHIFT - 1))) |
/* ------------------------ Operations on bin maps ----------------------- */ |
/* bit corresponding to given index */ |
#define idx2bit(i) ((binmap_t)(1) << (i)) |
/* Mark/Clear bits with given index */ |
#define mark_smallmap(M,i) ((M)->smallmap |= idx2bit(i)) |
#define clear_smallmap(M,i) ((M)->smallmap &= ~idx2bit(i)) |
#define smallmap_is_marked(M,i) ((M)->smallmap & idx2bit(i)) |
#define mark_treemap(M,i) ((M)->treemap |= idx2bit(i)) |
#define clear_treemap(M,i) ((M)->treemap &= ~idx2bit(i)) |
#define treemap_is_marked(M,i) ((M)->treemap & idx2bit(i)) |
/* index corresponding to given bit */ |
#if defined(__GNUC__) && defined(i386) |
#define compute_bit2idx(X, I)\ |
{\ |
unsigned int J;\ |
asm("bsfl %1,%0\n\t" : "=r" (J) : "rm" (X));\ |
I = (bindex_t)J;\ |
} |
#else /* GNUC */ |
#if USE_BUILTIN_FFS |
#define compute_bit2idx(X, I) I = ffs(X)-1 |
#else /* USE_BUILTIN_FFS */ |
#define compute_bit2idx(X, I)\ |
{\ |
unsigned int Y = X - 1;\ |
unsigned int K = Y >> (16-4) & 16;\ |
unsigned int N = K; Y >>= K;\ |
N += K = Y >> (8-3) & 8; Y >>= K;\ |
N += K = Y >> (4-2) & 4; Y >>= K;\ |
N += K = Y >> (2-1) & 2; Y >>= K;\ |
N += K = Y >> (1-0) & 1; Y >>= K;\ |
I = (bindex_t)(N + Y);\ |
} |
#endif /* USE_BUILTIN_FFS */ |
#endif /* GNUC */ |
/* isolate the least set bit of a bitmap */ |
#define least_bit(x) ((x) & -(x)) |
/* mask with all bits to left of least bit of x on */ |
#define left_bits(x) ((x<<1) | -(x<<1)) |
/* mask with all bits to left of or equal to least bit of x on */ |
#define same_or_left_bits(x) ((x) | -(x)) |
/* ----------------------- Runtime Check Support ------------------------- */ |
/* |
For security, the main invariant is that malloc/free/etc never |
writes to a static address other than malloc_state, unless static |
malloc_state itself has been corrupted, which cannot occur via |
malloc (because of these checks). In essence this means that we |
believe all pointers, sizes, maps etc held in malloc_state, but |
check all of those linked or offsetted from other embedded data |
structures. These checks are interspersed with main code in a way |
that tends to minimize their run-time cost. |
When FOOTERS is defined, in addition to range checking, we also |
verify footer fields of inuse chunks, which can be used guarantee |
that the mstate controlling malloc/free is intact. This is a |
streamlined version of the approach described by William Robertson |
et al in "Run-time Detection of Heap-based Overflows" LISA'03 |
http://www.usenix.org/events/lisa03/tech/robertson.html The footer |
of an inuse chunk holds the xor of its mstate and a random seed, |
that is checked upon calls to free() and realloc(). This is |
(probablistically) unguessable from outside the program, but can be |
computed by any code successfully malloc'ing any chunk, so does not |
itself provide protection against code that has already broken |
security through some other means. Unlike Robertson et al, we |
always dynamically check addresses of all offset chunks (previous, |
next, etc). This turns out to be cheaper than relying on hashes. |
*/ |
#if !INSECURE |
/* Check if address a is at least as high as any from MORECORE or MMAP */ |
#define ok_address(M, a) ((char*)(a) >= (M)->least_addr) |
/* Check if address of next chunk n is higher than base chunk p */ |
#define ok_next(p, n) ((char*)(p) < (char*)(n)) |
/* Check if p has its cinuse bit on */ |
#define ok_cinuse(p) cinuse(p) |
/* Check if p has its pinuse bit on */ |
#define ok_pinuse(p) pinuse(p) |
#else /* !INSECURE */ |
#define ok_address(M, a) (1) |
#define ok_next(b, n) (1) |
#define ok_cinuse(p) (1) |
#define ok_pinuse(p) (1) |
#endif /* !INSECURE */ |
#if (FOOTERS && !INSECURE) |
/* Check if (alleged) mstate m has expected magic field */ |
#define ok_magic(M) ((M)->magic == mparams.magic) |
#else /* (FOOTERS && !INSECURE) */ |
#define ok_magic(M) (1) |
#endif /* (FOOTERS && !INSECURE) */ |
/* In gcc, use __builtin_expect to minimize impact of checks */ |
#if !INSECURE |
#if defined(__GNUC__) && __GNUC__ >= 3 |
#define RTCHECK(e) __builtin_expect(e, 1) |
#else /* GNUC */ |
#define RTCHECK(e) (e) |
#endif /* GNUC */ |
#else /* !INSECURE */ |
#define RTCHECK(e) (1) |
#endif /* !INSECURE */ |
/* macros to set up inuse chunks with or without footers */ |
#if !FOOTERS |
#define mark_inuse_foot(M,p,s) |
/* Set cinuse bit and pinuse bit of next chunk */ |
#define set_inuse(M,p,s)\ |
((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\ |
((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT) |
/* Set cinuse and pinuse of this chunk and pinuse of next chunk */ |
#define set_inuse_and_pinuse(M,p,s)\ |
((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\ |
((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT) |
/* Set size, cinuse and pinuse bit of this chunk */ |
#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\ |
((p)->head = (s|PINUSE_BIT|CINUSE_BIT)) |
#else /* FOOTERS */ |
/* Set foot of inuse chunk to be xor of mstate and seed */ |
#define mark_inuse_foot(M,p,s)\ |
(((mchunkptr)((char*)(p) + (s)))->prev_foot = ((size_t)(M) ^ mparams.magic)) |
#define get_mstate_for(p)\ |
((mstate)(((mchunkptr)((char*)(p) +\ |
(chunksize(p))))->prev_foot ^ mparams.magic)) |
#define set_inuse(M,p,s)\ |
((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\ |
(((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT), \ |
mark_inuse_foot(M,p,s)) |
#define set_inuse_and_pinuse(M,p,s)\ |
((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\ |
(((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT),\ |
mark_inuse_foot(M,p,s)) |
#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\ |
((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\ |
mark_inuse_foot(M, p, s)) |
#endif /* !FOOTERS */ |
/* ---------------------------- setting mparams -------------------------- */ |
/* Initialize mparams */ |
static int init_mparams(void) { |
if (mparams.page_size == 0) { |
size_t s; |
mparams.mmap_threshold = DEFAULT_MMAP_THRESHOLD; |
mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD; |
#if MORECORE_CONTIGUOUS |
mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT; |
#else /* MORECORE_CONTIGUOUS */ |
mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT; |
#endif /* MORECORE_CONTIGUOUS */ |
#if (FOOTERS && !INSECURE) |
{ |
#if USE_DEV_RANDOM |
int fd; |
unsigned char buf[sizeof(size_t)]; |
/* Try to use /dev/urandom, else fall back on using time */ |
if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 && |
read(fd, buf, sizeof(buf)) == sizeof(buf)) { |
s = *((size_t *) buf); |
close(fd); |
} |
else |
#endif /* USE_DEV_RANDOM */ |
s = (size_t)(time(0) ^ (size_t)0x55555555U); |
s |= (size_t)8U; /* ensure nonzero */ |
s &= ~(size_t)7U; /* improve chances of fault for bad values */ |
} |
#else /* (FOOTERS && !INSECURE) */ |
s = (size_t)0x58585858U; |
#endif /* (FOOTERS && !INSECURE) */ |
ACQUIRE_MAGIC_INIT_LOCK(); |
if (mparams.magic == 0) { |
mparams.magic = s; |
/* Set up lock for main malloc area */ |
INITIAL_LOCK(&gm->mutex); |
gm->mflags = mparams.default_mflags; |
} |
RELEASE_MAGIC_INIT_LOCK(); |
#ifndef WIN32 |
mparams.page_size = malloc_getpagesize; |
mparams.granularity = ((DEFAULT_GRANULARITY != 0)? |
DEFAULT_GRANULARITY : mparams.page_size); |
#else /* WIN32 */ |
{ |
SYSTEM_INFO system_info; |
GetSystemInfo(&system_info); |
mparams.page_size = system_info.dwPageSize; |
mparams.granularity = system_info.dwAllocationGranularity; |
} |
#endif /* WIN32 */ |
/* Sanity-check configuration: |
size_t must be unsigned and as wide as pointer type. |
ints must be at least 4 bytes. |
alignment must be at least 8. |
Alignment, min chunk size, and page size must all be powers of 2. |
*/ |
if ((sizeof(size_t) != sizeof(char*)) || |
(MAX_SIZE_T < MIN_CHUNK_SIZE) || |
(sizeof(int) < 4) || |
(MALLOC_ALIGNMENT < (size_t)8U) || |
((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-SIZE_T_ONE)) != 0) || |
((MCHUNK_SIZE & (MCHUNK_SIZE-SIZE_T_ONE)) != 0) || |
((mparams.granularity & (mparams.granularity-SIZE_T_ONE)) != 0) || |
((mparams.page_size & (mparams.page_size-SIZE_T_ONE)) != 0)) |
ABORT; |
} |
return 0; |
} |
/* support for mallopt */ |
static int change_mparam(int param_number, int value) { |
size_t val = (size_t)value; |
init_mparams(); |
switch(param_number) { |
case M_TRIM_THRESHOLD: |
mparams.trim_threshold = val; |
return 1; |
case M_GRANULARITY: |
if (val >= mparams.page_size && ((val & (val-1)) == 0)) { |
mparams.granularity = val; |
return 1; |
} |
else |
return 0; |
case M_MMAP_THRESHOLD: |
mparams.mmap_threshold = val; |
return 1; |
default: |
return 0; |
} |
} |
#if DEBUG |
/* ------------------------- Debugging Support --------------------------- */ |
/* Check properties of any chunk, whether free, inuse, mmapped etc */ |
static void do_check_any_chunk(mstate m, mchunkptr p) { |
assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); |
assert(ok_address(m, p)); |
} |
/* Check properties of top chunk */ |
static void do_check_top_chunk(mstate m, mchunkptr p) { |
msegmentptr sp = segment_holding(m, (char*)p); |
size_t sz = chunksize(p); |
assert(sp != 0); |
assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); |
assert(ok_address(m, p)); |
assert(sz == m->topsize); |
assert(sz > 0); |
assert(sz == ((sp->base + sp->size) - (char*)p) - TOP_FOOT_SIZE); |
assert(pinuse(p)); |
assert(!next_pinuse(p)); |
} |
/* Check properties of (inuse) mmapped chunks */ |
static void do_check_mmapped_chunk(mstate m, mchunkptr p) { |
size_t sz = chunksize(p); |
size_t len = (sz + (p->prev_foot & ~IS_MMAPPED_BIT) + MMAP_FOOT_PAD); |
assert(is_mmapped(p)); |
assert(use_mmap(m)); |
assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); |
assert(ok_address(m, p)); |
assert(!is_small(sz)); |
assert((len & (mparams.page_size-SIZE_T_ONE)) == 0); |
assert(chunk_plus_offset(p, sz)->head == FENCEPOST_HEAD); |
assert(chunk_plus_offset(p, sz+SIZE_T_SIZE)->head == 0); |
} |
/* Check properties of inuse chunks */ |
static void do_check_inuse_chunk(mstate m, mchunkptr p) { |
do_check_any_chunk(m, p); |
assert(cinuse(p)); |
assert(next_pinuse(p)); |
/* If not pinuse and not mmapped, previous chunk has OK offset */ |
assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p); |
if (is_mmapped(p)) |
do_check_mmapped_chunk(m, p); |
} |
/* Check properties of free chunks */ |
static void do_check_free_chunk(mstate m, mchunkptr p) { |
size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT); |
mchunkptr next = chunk_plus_offset(p, sz); |
do_check_any_chunk(m, p); |
assert(!cinuse(p)); |
assert(!next_pinuse(p)); |
assert (!is_mmapped(p)); |
if (p != m->dv && p != m->top) { |
if (sz >= MIN_CHUNK_SIZE) { |
assert((sz & CHUNK_ALIGN_MASK) == 0); |
assert(is_aligned(chunk2mem(p))); |
assert(next->prev_foot == sz); |
assert(pinuse(p)); |
assert (next == m->top || cinuse(next)); |
assert(p->fd->bk == p); |
assert(p->bk->fd == p); |
} |
else /* markers are always of size SIZE_T_SIZE */ |
assert(sz == SIZE_T_SIZE); |
} |
} |
/* Check properties of malloced chunks at the point they are malloced */ |
static void do_check_malloced_chunk(mstate m, void* mem, size_t s) { |
if (mem != 0) { |
mchunkptr p = mem2chunk(mem); |
size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT); |
do_check_inuse_chunk(m, p); |
assert((sz & CHUNK_ALIGN_MASK) == 0); |
assert(sz >= MIN_CHUNK_SIZE); |
assert(sz >= s); |
/* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */ |
assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE)); |
} |
} |
/* Check a tree and its subtrees. */ |
static void do_check_tree(mstate m, tchunkptr t) { |
tchunkptr head = 0; |
tchunkptr u = t; |
bindex_t tindex = t->index; |
size_t tsize = chunksize(t); |
bindex_t idx; |
compute_tree_index(tsize, idx); |
assert(tindex == idx); |
assert(tsize >= MIN_LARGE_SIZE); |
assert(tsize >= minsize_for_tree_index(idx)); |
assert((idx == NTREEBINS-1) || (tsize < minsize_for_tree_index((idx+1)))); |
do { /* traverse through chain of same-sized nodes */ |
do_check_any_chunk(m, ((mchunkptr)u)); |
assert(u->index == tindex); |
assert(chunksize(u) == tsize); |
assert(!cinuse(u)); |
assert(!next_pinuse(u)); |
assert(u->fd->bk == u); |
assert(u->bk->fd == u); |
if (u->parent == 0) { |
assert(u->child[0] == 0); |
assert(u->child[1] == 0); |
} |
else { |
assert(head == 0); /* only one node on chain has parent */ |
head = u; |
assert(u->parent != u); |
assert (u->parent->child[0] == u || |
u->parent->child[1] == u || |
*((tbinptr*)(u->parent)) == u); |
if (u->child[0] != 0) { |
assert(u->child[0]->parent == u); |
assert(u->child[0] != u); |
do_check_tree(m, u->child[0]); |
} |
if (u->child[1] != 0) { |
assert(u->child[1]->parent == u); |
assert(u->child[1] != u); |
do_check_tree(m, u->child[1]); |
} |
if (u->child[0] != 0 && u->child[1] != 0) { |
assert(chunksize(u->child[0]) < chunksize(u->child[1])); |
} |
} |
u = u->fd; |
} while (u != t); |
assert(head != 0); |
} |
/* Check all the chunks in a treebin. */ |
static void do_check_treebin(mstate m, bindex_t i) { |
tbinptr* tb = treebin_at(m, i); |
tchunkptr t = *tb; |
int empty = (m->treemap & (1U << i)) == 0; |
if (t == 0) |
assert(empty); |
if (!empty) |
do_check_tree(m, t); |
} |
/* Check all the chunks in a smallbin. */ |
static void do_check_smallbin(mstate m, bindex_t i) { |
sbinptr b = smallbin_at(m, i); |
mchunkptr p = b->bk; |
unsigned int empty = (m->smallmap & (1U << i)) == 0; |
if (p == b) |
assert(empty); |
if (!empty) { |
for (; p != b; p = p->bk) { |
size_t size = chunksize(p); |
mchunkptr q; |
/* each chunk claims to be free */ |
do_check_free_chunk(m, p); |
/* chunk belongs in bin */ |
assert(small_index(size) == i); |
assert(p->bk == b || chunksize(p->bk) == chunksize(p)); |
/* chunk is followed by an inuse chunk */ |
q = next_chunk(p); |
if (q->head != FENCEPOST_HEAD) |
do_check_inuse_chunk(m, q); |
} |
} |
} |
/* Find x in a bin. Used in other check functions. */ |
static int bin_find(mstate m, mchunkptr x) { |
size_t size = chunksize(x); |
if (is_small(size)) { |
bindex_t sidx = small_index(size); |
sbinptr b = smallbin_at(m, sidx); |
if (smallmap_is_marked(m, sidx)) { |
mchunkptr p = b; |
do { |
if (p == x) |
return 1; |
} while ((p = p->fd) != b); |
} |
} |
else { |
bindex_t tidx; |
compute_tree_index(size, tidx); |
if (treemap_is_marked(m, tidx)) { |
tchunkptr t = *treebin_at(m, tidx); |
size_t sizebits = size << leftshift_for_tree_index(tidx); |
while (t != 0 && chunksize(t) != size) { |
t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]; |
sizebits <<= 1; |
} |
if (t != 0) { |
tchunkptr u = t; |
do { |
if (u == (tchunkptr)x) |
return 1; |
} while ((u = u->fd) != t); |
} |
} |
} |
return 0; |
} |
/* Traverse each chunk and check it; return total */ |
static size_t traverse_and_check(mstate m) { |
size_t sum = 0; |
if (is_initialized(m)) { |
msegmentptr s = &m->seg; |
sum += m->topsize + TOP_FOOT_SIZE; |
while (s != 0) { |
mchunkptr q = align_as_chunk(s->base); |
mchunkptr lastq = 0; |
assert(pinuse(q)); |
while (segment_holds(s, q) && |
q != m->top && q->head != FENCEPOST_HEAD) { |
sum += chunksize(q); |
if (cinuse(q)) { |
assert(!bin_find(m, q)); |
do_check_inuse_chunk(m, q); |
} |
else { |
assert(q == m->dv || bin_find(m, q)); |
assert(lastq == 0 || cinuse(lastq)); /* Not 2 consecutive free */ |
do_check_free_chunk(m, q); |
} |
lastq = q; |
q = next_chunk(q); |
} |
s = s->next; |
} |
} |
return sum; |
} |
/* Check all properties of malloc_state. */ |
static void do_check_malloc_state(mstate m) { |
bindex_t i; |
size_t total; |
/* check bins */ |
for (i = 0; i < NSMALLBINS; ++i) |
do_check_smallbin(m, i); |
for (i = 0; i < NTREEBINS; ++i) |
do_check_treebin(m, i); |
if (m->dvsize != 0) { /* check dv chunk */ |
do_check_any_chunk(m, m->dv); |
assert(m->dvsize == chunksize(m->dv)); |
assert(m->dvsize >= MIN_CHUNK_SIZE); |
assert(bin_find(m, m->dv) == 0); |
} |
if (m->top != 0) { /* check top chunk */ |
do_check_top_chunk(m, m->top); |
assert(m->topsize == chunksize(m->top)); |
assert(m->topsize > 0); |
assert(bin_find(m, m->top) == 0); |
} |
total = traverse_and_check(m); |
assert(total <= m->footprint); |
assert(m->footprint <= m->max_footprint); |
} |
#endif /* DEBUG */ |
/* ----------------------------- statistics ------------------------------ */ |
#if !NO_MALLINFO |
static struct mallinfo internal_mallinfo(mstate m) { |
struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
if (!PREACTION(m)) { |
check_malloc_state(m); |
if (is_initialized(m)) { |
size_t nfree = SIZE_T_ONE; /* top always free */ |
size_t mfree = m->topsize + TOP_FOOT_SIZE; |
size_t sum = mfree; |
msegmentptr s = &m->seg; |
while (s != 0) { |
mchunkptr q = align_as_chunk(s->base); |
while (segment_holds(s, q) && |
q != m->top && q->head != FENCEPOST_HEAD) { |
size_t sz = chunksize(q); |
sum += sz; |
if (!cinuse(q)) { |
mfree += sz; |
++nfree; |
} |
q = next_chunk(q); |
} |
s = s->next; |
} |
nm.arena = sum; |
nm.ordblks = nfree; |
nm.hblkhd = m->footprint - sum; |
nm.usmblks = m->max_footprint; |
nm.uordblks = m->footprint - mfree; |
nm.fordblks = mfree; |
nm.keepcost = m->topsize; |
} |
POSTACTION(m); |
} |
return nm; |
} |
#endif /* !NO_MALLINFO */ |
static void internal_malloc_stats(mstate m) { |
if (!PREACTION(m)) { |
size_t maxfp = 0; |
size_t fp = 0; |
size_t used = 0; |
check_malloc_state(m); |
if (is_initialized(m)) { |
msegmentptr s = &m->seg; |
maxfp = m->max_footprint; |
fp = m->footprint; |
used = fp - (m->topsize + TOP_FOOT_SIZE); |
while (s != 0) { |
mchunkptr q = align_as_chunk(s->base); |
while (segment_holds(s, q) && |
q != m->top && q->head != FENCEPOST_HEAD) { |
if (!cinuse(q)) |
used -= chunksize(q); |
q = next_chunk(q); |
} |
s = s->next; |
} |
} |
fprintf(stderr, "max system bytes = %10lu\n", (unsigned long)(maxfp)); |
fprintf(stderr, "system bytes = %10lu\n", (unsigned long)(fp)); |
fprintf(stderr, "in use bytes = %10lu\n", (unsigned long)(used)); |
POSTACTION(m); |
} |
} |
/* ----------------------- Operations on smallbins ----------------------- */ |
/* |
Various forms of linking and unlinking are defined as macros. Even |
the ones for trees, which are very long but have very short typical |
paths. This is ugly but reduces reliance on inlining support of |
compilers. |
*/ |
/* Link a free chunk into a smallbin */ |
#define insert_small_chunk(M, P, S) {\ |
bindex_t I = small_index(S);\ |
mchunkptr B = smallbin_at(M, I);\ |
mchunkptr F = B;\ |
assert(S >= MIN_CHUNK_SIZE);\ |
if (!smallmap_is_marked(M, I))\ |
mark_smallmap(M, I);\ |
else if (RTCHECK(ok_address(M, B->fd)))\ |
F = B->fd;\ |
else {\ |
CORRUPTION_ERROR_ACTION(M);\ |
}\ |
B->fd = P;\ |
F->bk = P;\ |
P->fd = F;\ |
P->bk = B;\ |
} |
/* Unlink a chunk from a smallbin */ |
#define unlink_small_chunk(M, P, S) {\ |
mchunkptr F = P->fd;\ |
mchunkptr B = P->bk;\ |
bindex_t I = small_index(S);\ |
assert(P != B);\ |
assert(P != F);\ |
assert(chunksize(P) == small_index2size(I));\ |
if (F == B)\ |
clear_smallmap(M, I);\ |
else if (RTCHECK((F == smallbin_at(M,I) || ok_address(M, F)) &&\ |
(B == smallbin_at(M,I) || ok_address(M, B)))) {\ |
F->bk = B;\ |
B->fd = F;\ |
}\ |
else {\ |
CORRUPTION_ERROR_ACTION(M);\ |
}\ |
} |
/* Unlink the first chunk from a smallbin */ |
#define unlink_first_small_chunk(M, B, P, I) {\ |
mchunkptr F = P->fd;\ |
assert(P != B);\ |
assert(P != F);\ |
assert(chunksize(P) == small_index2size(I));\ |
if (B == F)\ |
clear_smallmap(M, I);\ |
else if (RTCHECK(ok_address(M, F))) {\ |
B->fd = F;\ |
F->bk = B;\ |
}\ |
else {\ |
CORRUPTION_ERROR_ACTION(M);\ |
}\ |
} |
/* Replace dv node, binning the old one */ |
/* Used only when dvsize known to be small */ |
#define replace_dv(M, P, S) {\ |
size_t DVS = M->dvsize;\ |
if (DVS != 0) {\ |
mchunkptr DV = M->dv;\ |
assert(is_small(DVS));\ |
insert_small_chunk(M, DV, DVS);\ |
}\ |
M->dvsize = S;\ |
M->dv = P;\ |
} |
/* ------------------------- Operations on trees ------------------------- */ |
/* Insert chunk into tree */ |
#define insert_large_chunk(M, X, S) {\ |
tbinptr* H;\ |
bindex_t I;\ |
compute_tree_index(S, I);\ |
H = treebin_at(M, I);\ |
X->index = I;\ |
X->child[0] = X->child[1] = 0;\ |
if (!treemap_is_marked(M, I)) {\ |
mark_treemap(M, I);\ |
*H = X;\ |
X->parent = (tchunkptr)H;\ |
X->fd = X->bk = X;\ |
}\ |
else {\ |
tchunkptr T = *H;\ |
size_t K = S << leftshift_for_tree_index(I);\ |
for (;;) {\ |
if (chunksize(T) != S) {\ |
tchunkptr* C = &(T->child[(K >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]);\ |
K <<= 1;\ |
if (*C != 0)\ |
T = *C;\ |
else if (RTCHECK(ok_address(M, C))) {\ |
*C = X;\ |
X->parent = T;\ |
X->fd = X->bk = X;\ |
break;\ |
}\ |
else {\ |
CORRUPTION_ERROR_ACTION(M);\ |
break;\ |
}\ |
}\ |
else {\ |
tchunkptr F = T->fd;\ |
if (RTCHECK(ok_address(M, T) && ok_address(M, F))) {\ |
T->fd = F->bk = X;\ |
X->fd = F;\ |
X->bk = T;\ |
X->parent = 0;\ |
break;\ |
}\ |
else {\ |
CORRUPTION_ERROR_ACTION(M);\ |
break;\ |
}\ |
}\ |
}\ |
}\ |
} |
/* |
Unlink steps: |
1. If x is a chained node, unlink it from its same-sized fd/bk links |
and choose its bk node as its replacement. |
2. If x was the last node of its size, but not a leaf node, it must |
be replaced with a leaf node (not merely one with an open left or |
right), to make sure that lefts and rights of descendents |
correspond properly to bit masks. We use the rightmost descendent |
of x. We could use any other leaf, but this is easy to locate and |
tends to counteract removal of leftmosts elsewhere, and so keeps |
paths shorter than minimally guaranteed. This doesn't loop much |
because on average a node in a tree is near the bottom. |
3. If x is the base of a chain (i.e., has parent links) relink |
x's parent and children to x's replacement (or null if none). |
*/ |
#define unlink_large_chunk(M, X) {\ |
tchunkptr XP = X->parent;\ |
tchunkptr R;\ |
if (X->bk != X) {\ |
tchunkptr F = X->fd;\ |
R = X->bk;\ |
if (RTCHECK(ok_address(M, F))) {\ |
F->bk = R;\ |
R->fd = F;\ |
}\ |
else {\ |
CORRUPTION_ERROR_ACTION(M);\ |
}\ |
}\ |
else {\ |
tchunkptr* RP;\ |
if (((R = *(RP = &(X->child[1]))) != 0) ||\ |
((R = *(RP = &(X->child[0]))) != 0)) {\ |
tchunkptr* CP;\ |
while ((*(CP = &(R->child[1])) != 0) ||\ |
(*(CP = &(R->child[0])) != 0)) {\ |
R = *(RP = CP);\ |
}\ |
if (RTCHECK(ok_address(M, RP)))\ |
*RP = 0;\ |
else {\ |
CORRUPTION_ERROR_ACTION(M);\ |
}\ |
}\ |
}\ |
if (XP != 0) {\ |
tbinptr* H = treebin_at(M, X->index);\ |
if (X == *H) {\ |
if ((*H = R) == 0) \ |
clear_treemap(M, X->index);\ |
}\ |
else if (RTCHECK(ok_address(M, XP))) {\ |
if (XP->child[0] == X) \ |
XP->child[0] = R;\ |
else \ |
XP->child[1] = R;\ |
}\ |
else\ |
CORRUPTION_ERROR_ACTION(M);\ |
if (R != 0) {\ |
if (RTCHECK(ok_address(M, R))) {\ |
tchunkptr C0, C1;\ |
R->parent = XP;\ |
if ((C0 = X->child[0]) != 0) {\ |
if (RTCHECK(ok_address(M, C0))) {\ |
R->child[0] = C0;\ |
C0->parent = R;\ |
}\ |
else\ |
CORRUPTION_ERROR_ACTION(M);\ |
}\ |
if ((C1 = X->child[1]) != 0) {\ |
if (RTCHECK(ok_address(M, C1))) {\ |
R->child[1] = C1;\ |
C1->parent = R;\ |
}\ |
else\ |
CORRUPTION_ERROR_ACTION(M);\ |
}\ |
}\ |
else\ |
CORRUPTION_ERROR_ACTION(M);\ |
}\ |
}\ |
} |
/* Relays to large vs small bin operations */ |
#define insert_chunk(M, P, S)\ |
if (is_small(S)) insert_small_chunk(M, P, S)\ |
else { tchunkptr TP = (tchunkptr)(P); insert_large_chunk(M, TP, S); } |
#define unlink_chunk(M, P, S)\ |
if (is_small(S)) unlink_small_chunk(M, P, S)\ |
else { tchunkptr TP = (tchunkptr)(P); unlink_large_chunk(M, TP); } |
/* Relays to internal calls to malloc/free from realloc, memalign etc */ |
#if ONLY_MSPACES |
#define internal_malloc(m, b) mspace_malloc(m, b) |
#define internal_free(m, mem) mspace_free(m,mem); |
#else /* ONLY_MSPACES */ |
#if MSPACES |
#define internal_malloc(m, b)\ |
(m == gm)? dlmalloc(b) : mspace_malloc(m, b) |
#define internal_free(m, mem)\ |
if (m == gm) dlfree(mem); else mspace_free(m,mem); |
#else /* MSPACES */ |
#define internal_malloc(m, b) dlmalloc(b) |
#define internal_free(m, mem) dlfree(mem) |
#endif /* MSPACES */ |
#endif /* ONLY_MSPACES */ |
/* ----------------------- Direct-mmapping chunks ----------------------- */ |
/* |
Directly mmapped chunks are set up with an offset to the start of |
the mmapped region stored in the prev_foot field of the chunk. This |
allows reconstruction of the required argument to MUNMAP when freed, |
and also allows adjustment of the returned chunk to meet alignment |
requirements (especially in memalign). There is also enough space |
allocated to hold a fake next chunk of size SIZE_T_SIZE to maintain |
the PINUSE bit so frees can be checked. |
*/ |
/* Malloc using mmap */ |
static void* mmap_alloc(mstate m, size_t nb) { |
size_t mmsize = granularity_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK); |
if (mmsize > nb) { /* Check for wrap around 0 */ |
char* mm = (char*)(DIRECT_MMAP(mmsize)); |
if (mm != CMFAIL) { |
size_t offset = align_offset(chunk2mem(mm)); |
size_t psize = mmsize - offset - MMAP_FOOT_PAD; |
mchunkptr p = (mchunkptr)(mm + offset); |
p->prev_foot = offset | IS_MMAPPED_BIT; |
(p)->head = (psize|CINUSE_BIT); |
mark_inuse_foot(m, p, psize); |
chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD; |
chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0; |
if (mm < m->least_addr) |
m->least_addr = mm; |
if ((m->footprint += mmsize) > m->max_footprint) |
m->max_footprint = m->footprint; |
assert(is_aligned(chunk2mem(p))); |
check_mmapped_chunk(m, p); |
return chunk2mem(p); |
} |
} |
return 0; |
} |
/* Realloc using mmap */ |
static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb) { |
size_t oldsize = chunksize(oldp); |
if (is_small(nb)) /* Can't shrink mmap regions below small size */ |
return 0; |
/* Keep old chunk if big enough but not too big */ |
if (oldsize >= nb + SIZE_T_SIZE && |
(oldsize - nb) <= (mparams.granularity << 1)) |
return oldp; |
else { |
size_t offset = oldp->prev_foot & ~IS_MMAPPED_BIT; |
size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD; |
size_t newmmsize = granularity_align(nb + SIX_SIZE_T_SIZES + |
CHUNK_ALIGN_MASK); |
char* cp = (char*)CALL_MREMAP((char*)oldp - offset, |
oldmmsize, newmmsize, 1); |
if (cp != CMFAIL) { |
mchunkptr newp = (mchunkptr)(cp + offset); |
size_t psize = newmmsize - offset - MMAP_FOOT_PAD; |
newp->head = (psize|CINUSE_BIT); |
mark_inuse_foot(m, newp, psize); |
chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD; |
chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0; |
if (cp < m->least_addr) |
m->least_addr = cp; |
if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint) |
m->max_footprint = m->footprint; |
check_mmapped_chunk(m, newp); |
return newp; |
} |
} |
return 0; |
} |
/* -------------------------- mspace management -------------------------- */ |
/* Initialize top chunk and its size */ |
static void init_top(mstate m, mchunkptr p, size_t psize) { |
/* Ensure alignment */ |
size_t offset = align_offset(chunk2mem(p)); |
p = (mchunkptr)((char*)p + offset); |
psize -= offset; |
m->top = p; |
m->topsize = psize; |
p->head = psize | PINUSE_BIT; |
/* set size of fake trailing chunk holding overhead space only once */ |
chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE; |
m->trim_check = mparams.trim_threshold; /* reset on each update */ |
} |
/* Initialize bins for a new mstate that is otherwise zeroed out */ |
static void init_bins(mstate m) { |
/* Establish circular links for smallbins */ |
bindex_t i; |
for (i = 0; i < NSMALLBINS; ++i) { |
sbinptr bin = smallbin_at(m,i); |
bin->fd = bin->bk = bin; |
} |
} |
#if PROCEED_ON_ERROR |
/* default corruption action */ |
static void reset_on_error(mstate m) { |
int i; |
++malloc_corruption_error_count; |
/* Reinitialize fields to forget about all memory */ |
m->smallbins = m->treebins = 0; |
m->dvsize = m->topsize = 0; |
m->seg.base = 0; |
m->seg.size = 0; |
m->seg.next = 0; |
m->top = m->dv = 0; |
for (i = 0; i < NTREEBINS; ++i) |
*treebin_at(m, i) = 0; |
init_bins(m); |
} |
#endif /* PROCEED_ON_ERROR */ |
/* Allocate chunk and prepend remainder with chunk in successor base. */ |
static void* prepend_alloc(mstate m, char* newbase, char* oldbase, |
size_t nb) { |
mchunkptr p = align_as_chunk(newbase); |
mchunkptr oldfirst = align_as_chunk(oldbase); |
size_t psize = (char*)oldfirst - (char*)p; |
mchunkptr q = chunk_plus_offset(p, nb); |
size_t qsize = psize - nb; |
set_size_and_pinuse_of_inuse_chunk(m, p, nb); |
assert((char*)oldfirst > (char*)q); |
assert(pinuse(oldfirst)); |
assert(qsize >= MIN_CHUNK_SIZE); |
/* consolidate remainder with first chunk of old base */ |
if (oldfirst == m->top) { |
size_t tsize = m->topsize += qsize; |
m->top = q; |
q->head = tsize | PINUSE_BIT; |
check_top_chunk(m, q); |
} |
else if (oldfirst == m->dv) { |
size_t dsize = m->dvsize += qsize; |
m->dv = q; |
set_size_and_pinuse_of_free_chunk(q, dsize); |
} |
else { |
if (!cinuse(oldfirst)) { |
size_t nsize = chunksize(oldfirst); |
unlink_chunk(m, oldfirst, nsize); |
oldfirst = chunk_plus_offset(oldfirst, nsize); |
qsize += nsize; |
} |
set_free_with_pinuse(q, qsize, oldfirst); |
insert_chunk(m, q, qsize); |
check_free_chunk(m, q); |
} |
check_malloced_chunk(m, chunk2mem(p), nb); |
return chunk2mem(p); |
} |
/* Add a segment to hold a new noncontiguous region */ |
static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) { |
/* Determine locations and sizes of segment, fenceposts, old top */ |
char* old_top = (char*)m->top; |
msegmentptr oldsp = segment_holding(m, old_top); |
char* old_end = oldsp->base + oldsp->size; |
size_t ssize = pad_request(sizeof(struct malloc_segment)); |
char* rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK); |
size_t offset = align_offset(chunk2mem(rawsp)); |
char* asp = rawsp + offset; |
char* csp = (asp < (old_top + MIN_CHUNK_SIZE))? old_top : asp; |
mchunkptr sp = (mchunkptr)csp; |
msegmentptr ss = (msegmentptr)(chunk2mem(sp)); |
mchunkptr tnext = chunk_plus_offset(sp, ssize); |
mchunkptr p = tnext; |
int nfences = 0; |
/* reset top to new space */ |
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); |
/* Set up segment record */ |
assert(is_aligned(ss)); |
set_size_and_pinuse_of_inuse_chunk(m, sp, ssize); |
*ss = m->seg; /* Push current record */ |
m->seg.base = tbase; |
m->seg.size = tsize; |
m->seg.sflags = mmapped; |
m->seg.next = ss; |
/* Insert trailing fenceposts */ |
for (;;) { |
mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE); |
p->head = FENCEPOST_HEAD; |
++nfences; |
if ((char*)(&(nextp->head)) < old_end) |
p = nextp; |
else |
break; |
} |
assert(nfences >= 2); |
/* Insert the rest of old top into a bin as an ordinary free chunk */ |
if (csp != old_top) { |
mchunkptr q = (mchunkptr)old_top; |
size_t psize = csp - old_top; |
mchunkptr tn = chunk_plus_offset(q, psize); |
set_free_with_pinuse(q, psize, tn); |
insert_chunk(m, q, psize); |
} |
check_top_chunk(m, m->top); |
} |
/* -------------------------- System allocation -------------------------- */ |
/* Get memory from system using MORECORE or MMAP */ |
static void* sys_alloc(mstate m, size_t nb) { |
char* tbase = CMFAIL; |
size_t tsize = 0; |
flag_t mmap_flag = 0; |
init_mparams(); |
/* Directly map large chunks */ |
if (use_mmap(m) && nb >= mparams.mmap_threshold) { |
void* mem = mmap_alloc(m, nb); |
if (mem != 0) |
return mem; |
} |
/* |
Try getting memory in any of three ways (in most-preferred to |
least-preferred order): |
1. A call to MORECORE that can normally contiguously extend memory. |
(disabled if not MORECORE_CONTIGUOUS or not HAVE_MORECORE or |
or main space is mmapped or a previous contiguous call failed) |
2. A call to MMAP new space (disabled if not HAVE_MMAP). |
Note that under the default settings, if MORECORE is unable to |
fulfill a request, and HAVE_MMAP is true, then mmap is |
used as a noncontiguous system allocator. This is a useful backup |
strategy for systems with holes in address spaces -- in this case |
sbrk cannot contiguously expand the heap, but mmap may be able to |
find space. |
3. A call to MORECORE that cannot usually contiguously extend memory. |
(disabled if not HAVE_MORECORE) |
*/ |
if (MORECORE_CONTIGUOUS && !use_noncontiguous(m)) { |
char* br = CMFAIL; |
msegmentptr ss = (m->top == 0)? 0 : segment_holding(m, (char*)m->top); |
size_t asize = 0; |
ACQUIRE_MORECORE_LOCK(); |
if (ss == 0) { /* First time through or recovery */ |
char* base = (char*)CALL_MORECORE(0); |
if (base != CMFAIL) { |
asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE); |
/* Adjust to end on a page boundary */ |
if (!is_page_aligned(base)) |
asize += (page_align((size_t)base) - (size_t)base); |
/* Can't call MORECORE if size is negative when treated as signed */ |
if (asize < HALF_MAX_SIZE_T && |
(br = (char*)(CALL_MORECORE(asize))) == base) { |
tbase = base; |
tsize = asize; |
} |
} |
} |
else { |
/* Subtract out existing available top space from MORECORE request. */ |
asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE); |
/* Use mem here only if it did continuously extend old space */ |
if (asize < HALF_MAX_SIZE_T && |
(br = (char*)(CALL_MORECORE(asize))) == ss->base+ss->size) { |
tbase = br; |
tsize = asize; |
} |
} |
if (tbase == CMFAIL) { /* Cope with partial failure */ |
if (br != CMFAIL) { /* Try to use/extend the space we did get */ |
if (asize < HALF_MAX_SIZE_T && |
asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) { |
size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize); |
if (esize < HALF_MAX_SIZE_T) { |
char* end = (char*)CALL_MORECORE(esize); |
if (end != CMFAIL) |
asize += esize; |
else { /* Can't use; try to release */ |
CALL_MORECORE(-asize); |
br = CMFAIL; |
} |
} |
} |
} |
if (br != CMFAIL) { /* Use the space we did get */ |
tbase = br; |
tsize = asize; |
} |
else |
disable_contiguous(m); /* Don't try contiguous path in the future */ |
} |
RELEASE_MORECORE_LOCK(); |
} |
if (HAVE_MMAP && tbase == CMFAIL) { /* Try MMAP */ |
size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE; |
size_t rsize = granularity_align(req); |
if (rsize > nb) { /* Fail if wraps around zero */ |
char* mp = (char*)(CALL_MMAP(rsize)); |
if (mp != CMFAIL) { |
tbase = mp; |
tsize = rsize; |
mmap_flag = IS_MMAPPED_BIT; |
} |
} |
} |
if (HAVE_MORECORE && tbase == CMFAIL) { /* Try noncontiguous MORECORE */ |
size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE); |
if (asize < HALF_MAX_SIZE_T) { |
char* br = CMFAIL; |
char* end = CMFAIL; |
ACQUIRE_MORECORE_LOCK(); |
br = (char*)(CALL_MORECORE(asize)); |
end = (char*)(CALL_MORECORE(0)); |
RELEASE_MORECORE_LOCK(); |
if (br != CMFAIL && end != CMFAIL && br < end) { |
size_t ssize = end - br; |
if (ssize > nb + TOP_FOOT_SIZE) { |
tbase = br; |
tsize = ssize; |
} |
} |
} |
} |
if (tbase != CMFAIL) { |
if ((m->footprint += tsize) > m->max_footprint) |
m->max_footprint = m->footprint; |
if (!is_initialized(m)) { /* first-time initialization */ |
m->seg.base = m->least_addr = tbase; |
m->seg.size = tsize; |
m->seg.sflags = mmap_flag; |
m->magic = mparams.magic; |
init_bins(m); |
if (is_global(m)) |
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); |
else { |
/* Offset top by embedded malloc_state */ |
mchunkptr mn = next_chunk(mem2chunk(m)); |
init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE); |
} |
} |
else { |
/* Try to merge with an existing segment */ |
msegmentptr sp = &m->seg; |
while (sp != 0 && tbase != sp->base + sp->size) |
sp = sp->next; |
if (sp != 0 && |
!is_extern_segment(sp) && |
(sp->sflags & IS_MMAPPED_BIT) == mmap_flag && |
segment_holds(sp, m->top)) { /* append */ |
sp->size += tsize; |
init_top(m, m->top, m->topsize + tsize); |
} |
else { |
if (tbase < m->least_addr) |
m->least_addr = tbase; |
sp = &m->seg; |
while (sp != 0 && sp->base != tbase + tsize) |
sp = sp->next; |
if (sp != 0 && |
!is_extern_segment(sp) && |
(sp->sflags & IS_MMAPPED_BIT) == mmap_flag) { |
char* oldbase = sp->base; |
sp->base = tbase; |
sp->size += tsize; |
return prepend_alloc(m, tbase, oldbase, nb); |
} |
else |
add_segment(m, tbase, tsize, mmap_flag); |
} |
} |
if (nb < m->topsize) { /* Allocate from new or extended top space */ |
size_t rsize = m->topsize -= nb; |
mchunkptr p = m->top; |
mchunkptr r = m->top = chunk_plus_offset(p, nb); |
r->head = rsize | PINUSE_BIT; |
set_size_and_pinuse_of_inuse_chunk(m, p, nb); |
check_top_chunk(m, m->top); |
check_malloced_chunk(m, chunk2mem(p), nb); |
return chunk2mem(p); |
} |
} |
MALLOC_FAILURE_ACTION; |
return 0; |
} |
/* ----------------------- system deallocation -------------------------- */ |
/* Unmap and unlink any mmapped segments that don't contain used chunks */ |
static size_t release_unused_segments(mstate m) { |
size_t released = 0; |
msegmentptr pred = &m->seg; |
msegmentptr sp = pred->next; |
while (sp != 0) { |
char* base = sp->base; |
size_t size = sp->size; |
msegmentptr next = sp->next; |
if (is_mmapped_segment(sp) && !is_extern_segment(sp)) { |
mchunkptr p = align_as_chunk(base); |
size_t psize = chunksize(p); |
/* Can unmap if first chunk holds entire segment and not pinned */ |
if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) { |
tchunkptr tp = (tchunkptr)p; |
assert(segment_holds(sp, (char*)sp)); |
if (p == m->dv) { |
m->dv = 0; |
m->dvsize = 0; |
} |
else { |
unlink_large_chunk(m, tp); |
} |
if (CALL_MUNMAP(base, size) == 0) { |
released += size; |
m->footprint -= size; |
/* unlink obsoleted record */ |
sp = pred; |
sp->next = next; |
} |
else { /* back out if cannot unmap */ |
insert_large_chunk(m, tp, psize); |
} |
} |
} |
pred = sp; |
sp = next; |
} |
return released; |
} |
static int sys_trim(mstate m, size_t pad) { |
size_t released = 0; |
if (pad < MAX_REQUEST && is_initialized(m)) { |
pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */ |
if (m->topsize > pad) { |
/* Shrink top space in granularity-size units, keeping at least one */ |
size_t unit = mparams.granularity; |
size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit - |
SIZE_T_ONE) * unit; |
msegmentptr sp = segment_holding(m, (char*)m->top); |
if (!is_extern_segment(sp)) { |
if (is_mmapped_segment(sp)) { |
if (HAVE_MMAP && |
sp->size >= extra && |
!has_segment_link(m, sp)) { /* can't shrink if pinned */ |
/* Prefer mremap, fall back to munmap */ |
if ((CALL_MREMAP(sp->base, sp->size, sp->size - extra, 0) != MFAIL) || |
(CALL_MUNMAP(sp->base + sp->size - extra, extra) == 0)) { |
released = extra; |
} |
} |
} |
else if (HAVE_MORECORE) { |
if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */ |
extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit; |
ACQUIRE_MORECORE_LOCK(); |
{ |
/* Make sure end of memory is where we last set it. */ |
char* old_br = (char*)(CALL_MORECORE(0)); |
if (old_br == sp->base + sp->size) { |
char* rel_br = (char*)(CALL_MORECORE(-extra)); |
char* new_br = (char*)(CALL_MORECORE(0)); |
if (rel_br != CMFAIL && new_br < old_br) |
released = old_br - new_br; |
} |
} |
RELEASE_MORECORE_LOCK(); |
} |
} |
if (released != 0) { |
sp->size -= released; |
m->footprint -= released; |
init_top(m, m->top, m->topsize - released); |
check_top_chunk(m, m->top); |
} |
} |
/* Unmap any unused mmapped segments */ |
if (HAVE_MMAP) |
released += release_unused_segments(m); |
/* On failure, disable autotrim to avoid repeated failed future calls */ |
if (released == 0) |
m->trim_check = MAX_SIZE_T; |
} |
return (released != 0)? 1 : 0; |
} |
/* ---------------------------- malloc support --------------------------- */ |
/* allocate a large request from the best fitting chunk in a treebin */ |
static void* tmalloc_large(mstate m, size_t nb) { |
tchunkptr v = 0; |
size_t rsize = -nb; /* Unsigned negation */ |
tchunkptr t; |
bindex_t idx; |
compute_tree_index(nb, idx); |
if ((t = *treebin_at(m, idx)) != 0) { |
/* Traverse tree for this bin looking for node with size == nb */ |
size_t sizebits = nb << leftshift_for_tree_index(idx); |
tchunkptr rst = 0; /* The deepest untaken right subtree */ |
for (;;) { |
tchunkptr rt; |
size_t trem = chunksize(t) - nb; |
if (trem < rsize) { |
v = t; |
if ((rsize = trem) == 0) |
break; |
} |
rt = t->child[1]; |
t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]; |
if (rt != 0 && rt != t) |
rst = rt; |
if (t == 0) { |
t = rst; /* set t to least subtree holding sizes > nb */ |
break; |
} |
sizebits <<= 1; |
} |
} |
if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */ |
binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap; |
if (leftbits != 0) { |
bindex_t i; |
binmap_t leastbit = least_bit(leftbits); |
compute_bit2idx(leastbit, i); |
t = *treebin_at(m, i); |
} |
} |
while (t != 0) { /* find smallest of tree or subtree */ |
size_t trem = chunksize(t) - nb; |
if (trem < rsize) { |
rsize = trem; |
v = t; |
} |
t = leftmost_child(t); |
} |
/* If dv is a better fit, return 0 so malloc will use it */ |
if (v != 0 && rsize < (size_t)(m->dvsize - nb)) { |
if (RTCHECK(ok_address(m, v))) { /* split */ |
mchunkptr r = chunk_plus_offset(v, nb); |
assert(chunksize(v) == rsize + nb); |
if (RTCHECK(ok_next(v, r))) { |
unlink_large_chunk(m, v); |
if (rsize < MIN_CHUNK_SIZE) |
set_inuse_and_pinuse(m, v, (rsize + nb)); |
else { |
set_size_and_pinuse_of_inuse_chunk(m, v, nb); |
set_size_and_pinuse_of_free_chunk(r, rsize); |
insert_chunk(m, r, rsize); |
} |
return chunk2mem(v); |
} |
} |
CORRUPTION_ERROR_ACTION(m); |
} |
return 0; |
} |
/* allocate a small request from the best fitting chunk in a treebin */ |
static void* tmalloc_small(mstate m, size_t nb) { |
tchunkptr t, v; |
size_t rsize; |
bindex_t i; |
binmap_t leastbit = least_bit(m->treemap); |
compute_bit2idx(leastbit, i); |
v = t = *treebin_at(m, i); |
rsize = chunksize(t) - nb; |
while ((t = leftmost_child(t)) != 0) { |
size_t trem = chunksize(t) - nb; |
if (trem < rsize) { |
rsize = trem; |
v = t; |
} |
} |
if (RTCHECK(ok_address(m, v))) { |
mchunkptr r = chunk_plus_offset(v, nb); |
assert(chunksize(v) == rsize + nb); |
if (RTCHECK(ok_next(v, r))) { |
unlink_large_chunk(m, v); |
if (rsize < MIN_CHUNK_SIZE) |
set_inuse_and_pinuse(m, v, (rsize + nb)); |
else { |
set_size_and_pinuse_of_inuse_chunk(m, v, nb); |
set_size_and_pinuse_of_free_chunk(r, rsize); |
replace_dv(m, r, rsize); |
} |
return chunk2mem(v); |
} |
} |
CORRUPTION_ERROR_ACTION(m); |
return 0; |
} |
/* --------------------------- realloc support --------------------------- */ |
static void* internal_realloc(mstate m, void* oldmem, size_t bytes) { |
if (bytes >= MAX_REQUEST) { |
MALLOC_FAILURE_ACTION; |
return 0; |
} |
if (!PREACTION(m)) { |
mchunkptr oldp = mem2chunk(oldmem); |
size_t oldsize = chunksize(oldp); |
mchunkptr next = chunk_plus_offset(oldp, oldsize); |
mchunkptr newp = 0; |
void* extra = 0; |
/* Try to either shrink or extend into top. Else malloc-copy-free */ |
if (RTCHECK(ok_address(m, oldp) && ok_cinuse(oldp) && |
ok_next(oldp, next) && ok_pinuse(next))) { |
size_t nb = request2size(bytes); |
if (is_mmapped(oldp)) |
newp = mmap_resize(m, oldp, nb); |
else if (oldsize >= nb) { /* already big enough */ |
size_t rsize = oldsize - nb; |
newp = oldp; |
if (rsize >= MIN_CHUNK_SIZE) { |
mchunkptr remainder = chunk_plus_offset(newp, nb); |
set_inuse(m, newp, nb); |
set_inuse(m, remainder, rsize); |
extra = chunk2mem(remainder); |
} |
} |
else if (next == m->top && oldsize + m->topsize > nb) { |
/* Expand into top */ |
size_t newsize = oldsize + m->topsize; |
size_t newtopsize = newsize - nb; |
mchunkptr newtop = chunk_plus_offset(oldp, nb); |
set_inuse(m, oldp, nb); |
newtop->head = newtopsize |PINUSE_BIT; |
m->top = newtop; |
m->topsize = newtopsize; |
newp = oldp; |
} |
} |
else { |
USAGE_ERROR_ACTION(m, oldmem); |
POSTACTION(m); |
return 0; |
} |
POSTACTION(m); |
if (newp != 0) { |
if (extra != 0) { |
internal_free(m, extra); |
} |
check_inuse_chunk(m, newp); |
return chunk2mem(newp); |
} |
else { |
void* newmem = internal_malloc(m, bytes); |
if (newmem != 0) { |
size_t oc = oldsize - overhead_for(oldp); |
memcpy(newmem, oldmem, (oc < bytes)? oc : bytes); |
internal_free(m, oldmem); |
} |
return newmem; |
} |
} |
return 0; |
} |
/* --------------------------- memalign support -------------------------- */ |
static void* internal_memalign(mstate m, size_t alignment, size_t bytes) { |
if (alignment <= MALLOC_ALIGNMENT) /* Can just use malloc */ |
return internal_malloc(m, bytes); |
if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */ |
alignment = MIN_CHUNK_SIZE; |
if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */ |
size_t a = MALLOC_ALIGNMENT << 1; |
while (a < alignment) a <<= 1; |
alignment = a; |
} |
if (bytes >= MAX_REQUEST - alignment) { |
if (m != 0) { /* Test isn't needed but avoids compiler warning */ |
MALLOC_FAILURE_ACTION; |
} |
} |
else { |
size_t nb = request2size(bytes); |
size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD; |
char* mem = (char*)internal_malloc(m, req); |
if (mem != 0) { |
void* leader = 0; |
void* trailer = 0; |
mchunkptr p = mem2chunk(mem); |
if (PREACTION(m)) return 0; |
if ((((size_t)(mem)) % alignment) != 0) { /* misaligned */ |
/* |
Find an aligned spot inside chunk. Since we need to give |
back leading space in a chunk of at least MIN_CHUNK_SIZE, if |
the first calculation places us at a spot with less than |
MIN_CHUNK_SIZE leader, we can move to the next aligned spot. |
We've allocated enough total room so that this is always |
possible. |
*/ |
char* br = (char*)mem2chunk((size_t)(((size_t)(mem + |
alignment - |
SIZE_T_ONE)) & |
-alignment)); |
char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)? |
br : br+alignment; |
mchunkptr newp = (mchunkptr)pos; |
size_t leadsize = pos - (char*)(p); |
size_t newsize = chunksize(p) - leadsize; |
if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */ |
newp->prev_foot = p->prev_foot + leadsize; |
newp->head = (newsize|CINUSE_BIT); |
} |
else { /* Otherwise, give back leader, use the rest */ |
set_inuse(m, newp, newsize); |
set_inuse(m, p, leadsize); |
leader = chunk2mem(p); |
} |
p = newp; |
} |
/* Give back spare room at the end */ |
if (!is_mmapped(p)) { |
size_t size = chunksize(p); |
if (size > nb + MIN_CHUNK_SIZE) { |
size_t remainder_size = size - nb; |
mchunkptr remainder = chunk_plus_offset(p, nb); |
set_inuse(m, p, nb); |
set_inuse(m, remainder, remainder_size); |
trailer = chunk2mem(remainder); |
} |
} |
assert (chunksize(p) >= nb); |
assert((((size_t)(chunk2mem(p))) % alignment) == 0); |
check_inuse_chunk(m, p); |
POSTACTION(m); |
if (leader != 0) { |
internal_free(m, leader); |
} |
if (trailer != 0) { |
internal_free(m, trailer); |
} |
return chunk2mem(p); |
} |
} |
return 0; |
} |
/* ------------------------ comalloc/coalloc support --------------------- */ |
static void** ialloc(mstate m, |
size_t n_elements, |
size_t* sizes, |
int opts, |
void* chunks[]) { |
/* |
This provides common support for independent_X routines, handling |
all of the combinations that can result. |
The opts arg has: |
bit 0 set if all elements are same size (using sizes[0]) |
bit 1 set if elements should be zeroed |
*/ |
size_t element_size; /* chunksize of each element, if all same */ |
size_t contents_size; /* total size of elements */ |
size_t array_size; /* request size of pointer array */ |
void* mem; /* malloced aggregate space */ |
mchunkptr p; /* corresponding chunk */ |
size_t remainder_size; /* remaining bytes while splitting */ |
void** marray; /* either "chunks" or malloced ptr array */ |
mchunkptr array_chunk; /* chunk for malloced ptr array */ |
flag_t was_enabled; /* to disable mmap */ |
size_t size; |
size_t i; |
/* compute array length, if needed */ |
if (chunks != 0) { |
if (n_elements == 0) |
return chunks; /* nothing to do */ |
marray = chunks; |
array_size = 0; |
} |
else { |
/* if empty req, must still return chunk representing empty array */ |
if (n_elements == 0) |
return (void**)internal_malloc(m, 0); |
marray = 0; |
array_size = request2size(n_elements * (sizeof(void*))); |
} |
/* compute total element size */ |
if (opts & 0x1) { /* all-same-size */ |
element_size = request2size(*sizes); |
contents_size = n_elements * element_size; |
} |
else { /* add up all the sizes */ |
element_size = 0; |
contents_size = 0; |
for (i = 0; i != n_elements; ++i) |
contents_size += request2size(sizes[i]); |
} |
size = contents_size + array_size; |
/* |
Allocate the aggregate chunk. First disable direct-mmapping so |
malloc won't use it, since we would not be able to later |
free/realloc space internal to a segregated mmap region. |
*/ |
was_enabled = use_mmap(m); |
disable_mmap(m); |
mem = internal_malloc(m, size - CHUNK_OVERHEAD); |
if (was_enabled) |
enable_mmap(m); |
if (mem == 0) |
return 0; |
if (PREACTION(m)) return 0; |
p = mem2chunk(mem); |
remainder_size = chunksize(p); |
assert(!is_mmapped(p)); |
if (opts & 0x2) { /* optionally clear the elements */ |
memset((size_t*)mem, 0, remainder_size - SIZE_T_SIZE - array_size); |
} |
/* If not provided, allocate the pointer array as final part of chunk */ |
if (marray == 0) { |
size_t array_chunk_size; |
array_chunk = chunk_plus_offset(p, contents_size); |
array_chunk_size = remainder_size - contents_size; |
marray = (void**) (chunk2mem(array_chunk)); |
set_size_and_pinuse_of_inuse_chunk(m, array_chunk, array_chunk_size); |
remainder_size = contents_size; |
} |
/* split out elements */ |
for (i = 0; ; ++i) { |
marray[i] = chunk2mem(p); |
if (i != n_elements-1) { |
if (element_size != 0) |
size = element_size; |
else |
size = request2size(sizes[i]); |
remainder_size -= size; |
set_size_and_pinuse_of_inuse_chunk(m, p, size); |
p = chunk_plus_offset(p, size); |
} |
else { /* the final element absorbs any overallocation slop */ |
set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size); |
break; |
} |
} |
#if DEBUG |
if (marray != chunks) { |
/* final element must have exactly exhausted chunk */ |
if (element_size != 0) { |
assert(remainder_size == element_size); |
} |
else { |
assert(remainder_size == request2size(sizes[i])); |
} |
check_inuse_chunk(m, mem2chunk(marray)); |
} |
for (i = 0; i != n_elements; ++i) |
check_inuse_chunk(m, mem2chunk(marray[i])); |
#endif /* DEBUG */ |
POSTACTION(m); |
return marray; |
} |
/* -------------------------- public routines ---------------------------- */ |
#if !ONLY_MSPACES |
void* dlmalloc(size_t bytes) { |
/* |
Basic algorithm: |
If a small request (< 256 bytes minus per-chunk overhead): |
1. If one exists, use a remainderless chunk in associated smallbin. |
(Remainderless means that there are too few excess bytes to |
represent as a chunk.) |
2. If it is big enough, use the dv chunk, which is normally the |
chunk adjacent to the one used for the most recent small request. |
3. If one exists, split the smallest available chunk in a bin, |
saving remainder in dv. |
4. If it is big enough, use the top chunk. |
5. If available, get memory from system and use it |
Otherwise, for a large request: |
1. Find the smallest available binned chunk that fits, and use it |
if it is better fitting than dv chunk, splitting if necessary. |
2. If better fitting than any binned chunk, use the dv chunk. |
3. If it is big enough, use the top chunk. |
4. If request size >= mmap threshold, try to directly mmap this chunk. |
5. If available, get memory from system and use it |
The ugly goto's here ensure that postaction occurs along all paths. |
*/ |
if (!PREACTION(gm)) { |
void* mem; |
size_t nb; |
if (bytes <= MAX_SMALL_REQUEST) { |
bindex_t idx; |
binmap_t smallbits; |
nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes); |
idx = small_index(nb); |
smallbits = gm->smallmap >> idx; |
if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ |
mchunkptr b, p; |
idx += ~smallbits & 1; /* Uses next bin if idx empty */ |
b = smallbin_at(gm, idx); |
p = b->fd; |
assert(chunksize(p) == small_index2size(idx)); |
unlink_first_small_chunk(gm, b, p, idx); |
set_inuse_and_pinuse(gm, p, small_index2size(idx)); |
mem = chunk2mem(p); |
check_malloced_chunk(gm, mem, nb); |
goto postaction; |
} |
else if (nb > gm->dvsize) { |
if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ |
mchunkptr b, p, r; |
size_t rsize; |
bindex_t i; |
binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx)); |
binmap_t leastbit = least_bit(leftbits); |
compute_bit2idx(leastbit, i); |
b = smallbin_at(gm, i); |
p = b->fd; |
assert(chunksize(p) == small_index2size(i)); |
unlink_first_small_chunk(gm, b, p, i); |
rsize = small_index2size(i) - nb; |
/* Fit here cannot be remainderless if 4byte sizes */ |
if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) |
set_inuse_and_pinuse(gm, p, small_index2size(i)); |
else { |
set_size_and_pinuse_of_inuse_chunk(gm, p, nb); |
r = chunk_plus_offset(p, nb); |
set_size_and_pinuse_of_free_chunk(r, rsize); |
replace_dv(gm, r, rsize); |
} |
mem = chunk2mem(p); |
check_malloced_chunk(gm, mem, nb); |
goto postaction; |
} |
else if (gm->treemap != 0 && (mem = tmalloc_small(gm, nb)) != 0) { |
check_malloced_chunk(gm, mem, nb); |
goto postaction; |
} |
} |
} |
else if (bytes >= MAX_REQUEST) |
nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ |
else { |
nb = pad_request(bytes); |
if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) { |
check_malloced_chunk(gm, mem, nb); |
goto postaction; |
} |
} |
if (nb <= gm->dvsize) { |
size_t rsize = gm->dvsize - nb; |
mchunkptr p = gm->dv; |
if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ |
mchunkptr r = gm->dv = chunk_plus_offset(p, nb); |
gm->dvsize = rsize; |
set_size_and_pinuse_of_free_chunk(r, rsize); |
set_size_and_pinuse_of_inuse_chunk(gm, p, nb); |
} |
else { /* exhaust dv */ |
size_t dvs = gm->dvsize; |
gm->dvsize = 0; |
gm->dv = 0; |
set_inuse_and_pinuse(gm, p, dvs); |
} |
mem = chunk2mem(p); |
check_malloced_chunk(gm, mem, nb); |
goto postaction; |
} |
else if (nb < gm->topsize) { /* Split top */ |
size_t rsize = gm->topsize -= nb; |
mchunkptr p = gm->top; |
mchunkptr r = gm->top = chunk_plus_offset(p, nb); |
r->head = rsize | PINUSE_BIT; |
set_size_and_pinuse_of_inuse_chunk(gm, p, nb); |
mem = chunk2mem(p); |
check_top_chunk(gm, gm->top); |
check_malloced_chunk(gm, mem, nb); |
goto postaction; |
} |
mem = sys_alloc(gm, nb); |
postaction: |
POSTACTION(gm); |
return mem; |
} |
return 0; |
} |
void dlfree(void* mem) { |
/* |
Consolidate freed chunks with preceeding or succeeding bordering |
free chunks, if they exist, and then place in a bin. Intermixed |
with special cases for top, dv, mmapped chunks, and usage errors. |
*/ |
if (mem != 0) { |
mchunkptr p = mem2chunk(mem); |
#if FOOTERS |
mstate fm = get_mstate_for(p); |
if (!ok_magic(fm)) { |
USAGE_ERROR_ACTION(fm, p); |
return; |
} |
#else /* FOOTERS */ |
#define fm gm |
#endif /* FOOTERS */ |
if (!PREACTION(fm)) { |
check_inuse_chunk(fm, p); |
if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) { |
size_t psize = chunksize(p); |
mchunkptr next = chunk_plus_offset(p, psize); |
if (!pinuse(p)) { |
size_t prevsize = p->prev_foot; |
if ((prevsize & IS_MMAPPED_BIT) != 0) { |
prevsize &= ~IS_MMAPPED_BIT; |
psize += prevsize + MMAP_FOOT_PAD; |
if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) |
fm->footprint -= psize; |
goto postaction; |
} |
else { |
mchunkptr prev = chunk_minus_offset(p, prevsize); |
psize += prevsize; |
p = prev; |
if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */ |
if (p != fm->dv) { |
unlink_chunk(fm, p, prevsize); |
} |
else if ((next->head & INUSE_BITS) == INUSE_BITS) { |
fm->dvsize = psize; |
set_free_with_pinuse(p, psize, next); |
goto postaction; |
} |
} |
else |
goto erroraction; |
} |
} |
if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { |
if (!cinuse(next)) { /* consolidate forward */ |
if (next == fm->top) { |
size_t tsize = fm->topsize += psize; |
fm->top = p; |
p->head = tsize | PINUSE_BIT; |
if (p == fm->dv) { |
fm->dv = 0; |
fm->dvsize = 0; |
} |
if (should_trim(fm, tsize)) |
sys_trim(fm, 0); |
goto postaction; |
} |
else if (next == fm->dv) { |
size_t dsize = fm->dvsize += psize; |
fm->dv = p; |
set_size_and_pinuse_of_free_chunk(p, dsize); |
goto postaction; |
} |
else { |
size_t nsize = chunksize(next); |
psize += nsize; |
unlink_chunk(fm, next, nsize); |
set_size_and_pinuse_of_free_chunk(p, psize); |
if (p == fm->dv) { |
fm->dvsize = psize; |
goto postaction; |
} |
} |
} |
else |
set_free_with_pinuse(p, psize, next); |
insert_chunk(fm, p, psize); |
check_free_chunk(fm, p); |
goto postaction; |
} |
} |
erroraction: |
USAGE_ERROR_ACTION(fm, p); |
postaction: |
POSTACTION(fm); |
} |
} |
#if !FOOTERS |
#undef fm |
#endif /* FOOTERS */ |
} |
void* dlcalloc(size_t n_elements, size_t elem_size) { |
void* mem; |
size_t req = 0; |
if (n_elements != 0) { |
req = n_elements * elem_size; |
if (((n_elements | elem_size) & ~(size_t)0xffff) && |
(req / n_elements != elem_size)) |
req = MAX_SIZE_T; /* force downstream failure on overflow */ |
} |
mem = dlmalloc(req); |
if (mem != 0 && calloc_must_clear(mem2chunk(mem))) |
memset(mem, 0, req); |
return mem; |
} |
void* dlrealloc(void* oldmem, size_t bytes) { |
if (oldmem == 0) |
return dlmalloc(bytes); |
#ifdef REALLOC_ZERO_BYTES_FREES |
if (bytes == 0) { |
dlfree(oldmem); |
return 0; |
} |
#endif /* REALLOC_ZERO_BYTES_FREES */ |
else { |
#if ! FOOTERS |
mstate m = gm; |
#else /* FOOTERS */ |
mstate m = get_mstate_for(mem2chunk(oldmem)); |
if (!ok_magic(m)) { |
USAGE_ERROR_ACTION(m, oldmem); |
return 0; |
} |
#endif /* FOOTERS */ |
return internal_realloc(m, oldmem, bytes); |
} |
} |
void* dlmemalign(size_t alignment, size_t bytes) { |
return internal_memalign(gm, alignment, bytes); |
} |
void** dlindependent_calloc(size_t n_elements, size_t elem_size, |
void* chunks[]) { |
size_t sz = elem_size; /* serves as 1-element array */ |
return ialloc(gm, n_elements, &sz, 3, chunks); |
} |
void** dlindependent_comalloc(size_t n_elements, size_t sizes[], |
void* chunks[]) { |
return ialloc(gm, n_elements, sizes, 0, chunks); |
} |
void* dlvalloc(size_t bytes) { |
size_t pagesz; |
init_mparams(); |
pagesz = mparams.page_size; |
return dlmemalign(pagesz, bytes); |
} |
void* dlpvalloc(size_t bytes) { |
size_t pagesz; |
init_mparams(); |
pagesz = mparams.page_size; |
return dlmemalign(pagesz, (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE)); |
} |
int dlmalloc_trim(size_t pad) { |
int result = 0; |
if (!PREACTION(gm)) { |
result = sys_trim(gm, pad); |
POSTACTION(gm); |
} |
return result; |
} |
size_t dlmalloc_footprint(void) { |
return gm->footprint; |
} |
size_t dlmalloc_max_footprint(void) { |
return gm->max_footprint; |
} |
#if !NO_MALLINFO |
struct mallinfo dlmallinfo(void) { |
return internal_mallinfo(gm); |
} |
#endif /* NO_MALLINFO */ |
void dlmalloc_stats() { |
internal_malloc_stats(gm); |
} |
size_t dlmalloc_usable_size(void* mem) { |
if (mem != 0) { |
mchunkptr p = mem2chunk(mem); |
if (cinuse(p)) |
return chunksize(p) - overhead_for(p); |
} |
return 0; |
} |
int dlmallopt(int param_number, int value) { |
return change_mparam(param_number, value); |
} |
#endif /* !ONLY_MSPACES */ |
/* ----------------------------- user mspaces ---------------------------- */ |
#if MSPACES |
static mstate init_user_mstate(char* tbase, size_t tsize) { |
size_t msize = pad_request(sizeof(struct malloc_state)); |
mchunkptr mn; |
mchunkptr msp = align_as_chunk(tbase); |
mstate m = (mstate)(chunk2mem(msp)); |
memset(m, 0, msize); |
INITIAL_LOCK(&m->mutex); |
msp->head = (msize|PINUSE_BIT|CINUSE_BIT); |
m->seg.base = m->least_addr = tbase; |
m->seg.size = m->footprint = m->max_footprint = tsize; |
m->magic = mparams.magic; |
m->mflags = mparams.default_mflags; |
disable_contiguous(m); |
init_bins(m); |
mn = next_chunk(mem2chunk(m)); |
init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) - TOP_FOOT_SIZE); |
check_top_chunk(m, m->top); |
return m; |
} |
mspace create_mspace(size_t capacity, int locked) { |
mstate m = 0; |
size_t msize = pad_request(sizeof(struct malloc_state)); |
init_mparams(); /* Ensure pagesize etc initialized */ |
if (capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) { |
size_t rs = ((capacity == 0)? mparams.granularity : |
(capacity + TOP_FOOT_SIZE + msize)); |
size_t tsize = granularity_align(rs); |
char* tbase = (char*)(CALL_MMAP(tsize)); |
if (tbase != CMFAIL) { |
m = init_user_mstate(tbase, tsize); |
m->seg.sflags = IS_MMAPPED_BIT; |
set_lock(m, locked); |
} |
} |
return (mspace)m; |
} |
mspace create_mspace_with_base(void* base, size_t capacity, int locked) { |
mstate m = 0; |
size_t msize = pad_request(sizeof(struct malloc_state)); |
init_mparams(); /* Ensure pagesize etc initialized */ |
if (capacity > msize + TOP_FOOT_SIZE && |
capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) { |
m = init_user_mstate((char*)base, capacity); |
m->seg.sflags = EXTERN_BIT; |
set_lock(m, locked); |
} |
return (mspace)m; |
} |
size_t destroy_mspace(mspace msp) { |
size_t freed = 0; |
mstate ms = (mstate)msp; |
if (ok_magic(ms)) { |
msegmentptr sp = &ms->seg; |
while (sp != 0) { |
char* base = sp->base; |
size_t size = sp->size; |
flag_t flag = sp->sflags; |
sp = sp->next; |
if ((flag & IS_MMAPPED_BIT) && !(flag & EXTERN_BIT) && |
CALL_MUNMAP(base, size) == 0) |
freed += size; |
} |
} |
else { |
USAGE_ERROR_ACTION(ms,ms); |
} |
return freed; |
} |
/* |
mspace versions of routines are near-clones of the global |
versions. This is not so nice but better than the alternatives. |
*/ |
void* mspace_malloc(mspace msp, size_t bytes) { |
mstate ms = (mstate)msp; |
if (!ok_magic(ms)) { |
USAGE_ERROR_ACTION(ms,ms); |
return 0; |
} |
if (!PREACTION(ms)) { |
void* mem; |
size_t nb; |
if (bytes <= MAX_SMALL_REQUEST) { |
bindex_t idx; |
binmap_t smallbits; |
nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes); |
idx = small_index(nb); |
smallbits = ms->smallmap >> idx; |
if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ |
mchunkptr b, p; |
idx += ~smallbits & 1; /* Uses next bin if idx empty */ |
b = smallbin_at(ms, idx); |
p = b->fd; |
assert(chunksize(p) == small_index2size(idx)); |
unlink_first_small_chunk(ms, b, p, idx); |
set_inuse_and_pinuse(ms, p, small_index2size(idx)); |
mem = chunk2mem(p); |
check_malloced_chunk(ms, mem, nb); |
goto postaction; |
} |
else if (nb > ms->dvsize) { |
if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ |
mchunkptr b, p, r; |
size_t rsize; |
bindex_t i; |
binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx)); |
binmap_t leastbit = least_bit(leftbits); |
compute_bit2idx(leastbit, i); |
b = smallbin_at(ms, i); |
p = b->fd; |
assert(chunksize(p) == small_index2size(i)); |
unlink_first_small_chunk(ms, b, p, i); |
rsize = small_index2size(i) - nb; |
/* Fit here cannot be remainderless if 4byte sizes */ |
if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) |
set_inuse_and_pinuse(ms, p, small_index2size(i)); |
else { |
set_size_and_pinuse_of_inuse_chunk(ms, p, nb); |
r = chunk_plus_offset(p, nb); |
set_size_and_pinuse_of_free_chunk(r, rsize); |
replace_dv(ms, r, rsize); |
} |
mem = chunk2mem(p); |
check_malloced_chunk(ms, mem, nb); |
goto postaction; |
} |
else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) { |
check_malloced_chunk(ms, mem, nb); |
goto postaction; |
} |
} |
} |
else if (bytes >= MAX_REQUEST) |
nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ |
else { |
nb = pad_request(bytes); |
if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) { |
check_malloced_chunk(ms, mem, nb); |
goto postaction; |
} |
} |
if (nb <= ms->dvsize) { |
size_t rsize = ms->dvsize - nb; |
mchunkptr p = ms->dv; |
if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ |
mchunkptr r = ms->dv = chunk_plus_offset(p, nb); |
ms->dvsize = rsize; |
set_size_and_pinuse_of_free_chunk(r, rsize); |
set_size_and_pinuse_of_inuse_chunk(ms, p, nb); |
} |
else { /* exhaust dv */ |
size_t dvs = ms->dvsize; |
ms->dvsize = 0; |
ms->dv = 0; |
set_inuse_and_pinuse(ms, p, dvs); |
} |
mem = chunk2mem(p); |
check_malloced_chunk(ms, mem, nb); |
goto postaction; |
} |
else if (nb < ms->topsize) { /* Split top */ |
size_t rsize = ms->topsize -= nb; |
mchunkptr p = ms->top; |
mchunkptr r = ms->top = chunk_plus_offset(p, nb); |
r->head = rsize | PINUSE_BIT; |
set_size_and_pinuse_of_inuse_chunk(ms, p, nb); |
mem = chunk2mem(p); |
check_top_chunk(ms, ms->top); |
check_malloced_chunk(ms, mem, nb); |
goto postaction; |
} |
mem = sys_alloc(ms, nb); |
postaction: |
POSTACTION(ms); |
return mem; |
} |
return 0; |
} |
void mspace_free(mspace msp, void* mem) { |
if (mem != 0) { |
mchunkptr p = mem2chunk(mem); |
#if FOOTERS |
mstate fm = get_mstate_for(p); |
#else /* FOOTERS */ |
mstate fm = (mstate)msp; |
#endif /* FOOTERS */ |
if (!ok_magic(fm)) { |
USAGE_ERROR_ACTION(fm, p); |
return; |
} |
if (!PREACTION(fm)) { |
check_inuse_chunk(fm, p); |
if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) { |
size_t psize = chunksize(p); |
mchunkptr next = chunk_plus_offset(p, psize); |
if (!pinuse(p)) { |
size_t prevsize = p->prev_foot; |
if ((prevsize & IS_MMAPPED_BIT) != 0) { |
prevsize &= ~IS_MMAPPED_BIT; |
psize += prevsize + MMAP_FOOT_PAD; |
if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) |
fm->footprint -= psize; |
goto postaction; |
} |
else { |
mchunkptr prev = chunk_minus_offset(p, prevsize); |
psize += prevsize; |
p = prev; |
if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */ |
if (p != fm->dv) { |
unlink_chunk(fm, p, prevsize); |
} |
else if ((next->head & INUSE_BITS) == INUSE_BITS) { |
fm->dvsize = psize; |
set_free_with_pinuse(p, psize, next); |
goto postaction; |
} |
} |
else |
goto erroraction; |
} |
} |
if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { |
if (!cinuse(next)) { /* consolidate forward */ |
if (next == fm->top) { |
size_t tsize = fm->topsize += psize; |
fm->top = p; |
p->head = tsize | PINUSE_BIT; |
if (p == fm->dv) { |
fm->dv = 0; |
fm->dvsize = 0; |
} |
if (should_trim(fm, tsize)) |
sys_trim(fm, 0); |
goto postaction; |
} |
else if (next == fm->dv) { |
size_t dsize = fm->dvsize += psize; |
fm->dv = p; |
set_size_and_pinuse_of_free_chunk(p, dsize); |
goto postaction; |
} |
else { |
size_t nsize = chunksize(next); |
psize += nsize; |
unlink_chunk(fm, next, nsize); |
set_size_and_pinuse_of_free_chunk(p, psize); |
if (p == fm->dv) { |
fm->dvsize = psize; |
goto postaction; |
} |
} |
} |
else |
set_free_with_pinuse(p, psize, next); |
insert_chunk(fm, p, psize); |
check_free_chunk(fm, p); |
goto postaction; |
} |
} |
erroraction: |
USAGE_ERROR_ACTION(fm, p); |
postaction: |
POSTACTION(fm); |
} |
} |
} |
void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) { |
void* mem; |
size_t req = 0; |
mstate ms = (mstate)msp; |
if (!ok_magic(ms)) { |
USAGE_ERROR_ACTION(ms,ms); |
return 0; |
} |
if (n_elements != 0) { |
req = n_elements * elem_size; |
if (((n_elements | elem_size) & ~(size_t)0xffff) && |
(req / n_elements != elem_size)) |
req = MAX_SIZE_T; /* force downstream failure on overflow */ |
} |
mem = internal_malloc(ms, req); |
if (mem != 0 && calloc_must_clear(mem2chunk(mem))) |
memset(mem, 0, req); |
return mem; |
} |
void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) { |
if (oldmem == 0) |
return mspace_malloc(msp, bytes); |
#ifdef REALLOC_ZERO_BYTES_FREES |
if (bytes == 0) { |
mspace_free(msp, oldmem); |
return 0; |
} |
#endif /* REALLOC_ZERO_BYTES_FREES */ |
else { |
#if FOOTERS |
mchunkptr p = mem2chunk(oldmem); |
mstate ms = get_mstate_for(p); |
#else /* FOOTERS */ |
mstate ms = (mstate)msp; |
#endif /* FOOTERS */ |
if (!ok_magic(ms)) { |
USAGE_ERROR_ACTION(ms,ms); |
return 0; |
} |
return internal_realloc(ms, oldmem, bytes); |
} |
} |
void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) { |
mstate ms = (mstate)msp; |
if (!ok_magic(ms)) { |
USAGE_ERROR_ACTION(ms,ms); |
return 0; |
} |
return internal_memalign(ms, alignment, bytes); |
} |
void** mspace_independent_calloc(mspace msp, size_t n_elements, |
size_t elem_size, void* chunks[]) { |
size_t sz = elem_size; /* serves as 1-element array */ |
mstate ms = (mstate)msp; |
if (!ok_magic(ms)) { |
USAGE_ERROR_ACTION(ms,ms); |
return 0; |
} |
return ialloc(ms, n_elements, &sz, 3, chunks); |
} |
void** mspace_independent_comalloc(mspace msp, size_t n_elements, |
size_t sizes[], void* chunks[]) { |
mstate ms = (mstate)msp; |
if (!ok_magic(ms)) { |
USAGE_ERROR_ACTION(ms,ms); |
return 0; |
} |
return ialloc(ms, n_elements, sizes, 0, chunks); |
} |
int mspace_trim(mspace msp, size_t pad) { |
int result = 0; |
mstate ms = (mstate)msp; |
if (ok_magic(ms)) { |
if (!PREACTION(ms)) { |
result = sys_trim(ms, pad); |
POSTACTION(ms); |
} |
} |
else { |
USAGE_ERROR_ACTION(ms,ms); |
} |
return result; |
} |
void mspace_malloc_stats(mspace msp) { |
mstate ms = (mstate)msp; |
if (ok_magic(ms)) { |
internal_malloc_stats(ms); |
} |
else { |
USAGE_ERROR_ACTION(ms,ms); |
} |
} |
size_t mspace_footprint(mspace msp) { |
size_t result; |
mstate ms = (mstate)msp; |
if (ok_magic(ms)) { |
result = ms->footprint; |
} |
USAGE_ERROR_ACTION(ms,ms); |
return result; |
} |
size_t mspace_max_footprint(mspace msp) { |
size_t result; |
mstate ms = (mstate)msp; |
if (ok_magic(ms)) { |
result = ms->max_footprint; |
} |
USAGE_ERROR_ACTION(ms,ms); |
return result; |
} |
#if !NO_MALLINFO |
struct mallinfo mspace_mallinfo(mspace msp) { |
mstate ms = (mstate)msp; |
if (!ok_magic(ms)) { |
USAGE_ERROR_ACTION(ms,ms); |
} |
return internal_mallinfo(ms); |
} |
#endif /* NO_MALLINFO */ |
int mspace_mallopt(int param_number, int value) { |
return change_mparam(param_number, value); |
} |
#endif /* MSPACES */ |
/* -------------------- Alternative MORECORE functions ------------------- */ |
/* |
Guidelines for creating a custom version of MORECORE: |
* For best performance, MORECORE should allocate in multiples of pagesize. |
* MORECORE may allocate more memory than requested. (Or even less, |
but this will usually result in a malloc failure.) |
* MORECORE must not allocate memory when given argument zero, but |
instead return one past the end address of memory from previous |
nonzero call. |
* For best performance, consecutive calls to MORECORE with positive |
arguments should return increasing addresses, indicating that |
space has been contiguously extended. |
* Even though consecutive calls to MORECORE need not return contiguous |
addresses, it must be OK for malloc'ed chunks to span multiple |
regions in those cases where they do happen to be contiguous. |
* MORECORE need not handle negative arguments -- it may instead |
just return MFAIL when given negative arguments. |
Negative arguments are always multiples of pagesize. MORECORE |
must not misinterpret negative args as large positive unsigned |
args. You can suppress all such calls from even occurring by defining |
MORECORE_CANNOT_TRIM, |
As an example alternative MORECORE, here is a custom allocator |
kindly contributed for pre-OSX macOS. It uses virtually but not |
necessarily physically contiguous non-paged memory (locked in, |
present and won't get swapped out). You can use it by uncommenting |
this section, adding some #includes, and setting up the appropriate |
defines above: |
#define MORECORE osMoreCore |
There is also a shutdown routine that should somehow be called for |
cleanup upon program exit. |
#define MAX_POOL_ENTRIES 100 |
#define MINIMUM_MORECORE_SIZE (64 * 1024U) |
static int next_os_pool; |
void *our_os_pools[MAX_POOL_ENTRIES]; |
void *osMoreCore(int size) |
{ |
void *ptr = 0; |
static void *sbrk_top = 0; |
if (size > 0) |
{ |
if (size < MINIMUM_MORECORE_SIZE) |
size = MINIMUM_MORECORE_SIZE; |
if (CurrentExecutionLevel() == kTaskLevel) |
ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0); |
if (ptr == 0) |
{ |
return (void *) MFAIL; |
} |
// save ptrs so they can be freed during cleanup |
our_os_pools[next_os_pool] = ptr; |
next_os_pool++; |
ptr = (void *) ((((size_t) ptr) + RM_PAGE_MASK) & ~RM_PAGE_MASK); |
sbrk_top = (char *) ptr + size; |
return ptr; |
} |
else if (size < 0) |
{ |
// we don't currently support shrink behavior |
return (void *) MFAIL; |
} |
else |
{ |
return sbrk_top; |
} |
} |
// cleanup any allocated memory pools |
// called as last thing before shutting down driver |
void osCleanupMem(void) |
{ |
void **ptr; |
for (ptr = our_os_pools; ptr < &our_os_pools[MAX_POOL_ENTRIES]; ptr++) |
if (*ptr) |
{ |
PoolDeallocate(*ptr); |
*ptr = 0; |
} |
} |
*/ |
/* ----------------------------------------------------------------------- |
History: |
V2.8.3 Thu Sep 22 11:16:32 2005 Doug Lea (dl at gee) |
* Add max_footprint functions |
* Ensure all appropriate literals are size_t |
* Fix conditional compilation problem for some #define settings |
* Avoid concatenating segments with the one provided |
in create_mspace_with_base |
* Rename some variables to avoid compiler shadowing warnings |
* Use explicit lock initialization. |
* Better handling of sbrk interference. |
* Simplify and fix segment insertion, trimming and mspace_destroy |
* Reinstate REALLOC_ZERO_BYTES_FREES option from 2.7.x |
* Thanks especially to Dennis Flanagan for help on these. |
V2.8.2 Sun Jun 12 16:01:10 2005 Doug Lea (dl at gee) |
* Fix memalign brace error. |
V2.8.1 Wed Jun 8 16:11:46 2005 Doug Lea (dl at gee) |
* Fix improper #endif nesting in C++ |
* Add explicit casts needed for C++ |
V2.8.0 Mon May 30 14:09:02 2005 Doug Lea (dl at gee) |
* Use trees for large bins |
* Support mspaces |
* Use segments to unify sbrk-based and mmap-based system allocation, |
removing need for emulation on most platforms without sbrk. |
* Default safety checks |
* Optional footer checks. Thanks to William Robertson for the idea. |
* Internal code refactoring |
* Incorporate suggestions and platform-specific changes. |
Thanks to Dennis Flanagan, Colin Plumb, Niall Douglas, |
Aaron Bachmann, Emery Berger, and others. |
* Speed up non-fastbin processing enough to remove fastbins. |
* Remove useless cfree() to avoid conflicts with other apps. |
* Remove internal memcpy, memset. Compilers handle builtins better. |
* Remove some options that no one ever used and rename others. |
V2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee) |
* Fix malloc_state bitmap array misdeclaration |
V2.7.1 Thu Jul 25 10:58:03 2002 Doug Lea (dl at gee) |
* Allow tuning of FIRST_SORTED_BIN_SIZE |
* Use PTR_UINT as type for all ptr->int casts. Thanks to John Belmonte. |
* Better detection and support for non-contiguousness of MORECORE. |
Thanks to Andreas Mueller, Conal Walsh, and Wolfram Gloger |
* Bypass most of malloc if no frees. Thanks To Emery Berger. |
* Fix freeing of old top non-contiguous chunk im sysmalloc. |
* Raised default trim and map thresholds to 256K. |
* Fix mmap-related #defines. Thanks to Lubos Lunak. |
* Fix copy macros; added LACKS_FCNTL_H. Thanks to Neal Walfield. |
* Branch-free bin calculation |
* Default trim and mmap thresholds now 256K. |
V2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee) |
* Introduce independent_comalloc and independent_calloc. |
Thanks to Michael Pachos for motivation and help. |
* Make optional .h file available |
* Allow > 2GB requests on 32bit systems. |
* new WIN32 sbrk, mmap, munmap, lock code from <Walter@GeNeSys-e.de>. |
Thanks also to Andreas Mueller <a.mueller at paradatec.de>, |
and Anonymous. |
* Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for |
helping test this.) |
* memalign: check alignment arg |
* realloc: don't try to shift chunks backwards, since this |
leads to more fragmentation in some programs and doesn't |
seem to help in any others. |
* Collect all cases in malloc requiring system memory into sysmalloc |
* Use mmap as backup to sbrk |
* Place all internal state in malloc_state |
* Introduce fastbins (although similar to 2.5.1) |
* Many minor tunings and cosmetic improvements |
* Introduce USE_PUBLIC_MALLOC_WRAPPERS, USE_MALLOC_LOCK |
* Introduce MALLOC_FAILURE_ACTION, MORECORE_CONTIGUOUS |
Thanks to Tony E. Bennett <tbennett@nvidia.com> and others. |
* Include errno.h to support default failure action. |
V2.6.6 Sun Dec 5 07:42:19 1999 Doug Lea (dl at gee) |
* return null for negative arguments |
* Added Several WIN32 cleanups from Martin C. Fong <mcfong at yahoo.com> |
* Add 'LACKS_SYS_PARAM_H' for those systems without 'sys/param.h' |
(e.g. WIN32 platforms) |
* Cleanup header file inclusion for WIN32 platforms |
* Cleanup code to avoid Microsoft Visual C++ compiler complaints |
* Add 'USE_DL_PREFIX' to quickly allow co-existence with existing |
memory allocation routines |
* Set 'malloc_getpagesize' for WIN32 platforms (needs more work) |
* Use 'assert' rather than 'ASSERT' in WIN32 code to conform to |
usage of 'assert' in non-WIN32 code |
* Improve WIN32 'sbrk()' emulation's 'findRegion()' routine to |
avoid infinite loop |
* Always call 'fREe()' rather than 'free()' |
V2.6.5 Wed Jun 17 15:57:31 1998 Doug Lea (dl at gee) |
* Fixed ordering problem with boundary-stamping |
V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee) |
* Added pvalloc, as recommended by H.J. Liu |
* Added 64bit pointer support mainly from Wolfram Gloger |
* Added anonymously donated WIN32 sbrk emulation |
* Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen |
* malloc_extend_top: fix mask error that caused wastage after |
foreign sbrks |
* Add linux mremap support code from HJ Liu |
V2.6.2 Tue Dec 5 06:52:55 1995 Doug Lea (dl at gee) |
* Integrated most documentation with the code. |
* Add support for mmap, with help from |
Wolfram Gloger (Gloger@lrz.uni-muenchen.de). |
* Use last_remainder in more cases. |
* Pack bins using idea from colin@nyx10.cs.du.edu |
* Use ordered bins instead of best-fit threshhold |
* Eliminate block-local decls to simplify tracing and debugging. |
* Support another case of realloc via move into top |
* Fix error occuring when initial sbrk_base not word-aligned. |
* Rely on page size for units instead of SBRK_UNIT to |
avoid surprises about sbrk alignment conventions. |
* Add mallinfo, mallopt. Thanks to Raymond Nijssen |
(raymond@es.ele.tue.nl) for the suggestion. |
* Add `pad' argument to malloc_trim and top_pad mallopt parameter. |
* More precautions for cases where other routines call sbrk, |
courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de). |
* Added macros etc., allowing use in linux libc from |
H.J. Lu (hjl@gnu.ai.mit.edu) |
* Inverted this history list |
V2.6.1 Sat Dec 2 14:10:57 1995 Doug Lea (dl at gee) |
* Re-tuned and fixed to behave more nicely with V2.6.0 changes. |
* Removed all preallocation code since under current scheme |
the work required to undo bad preallocations exceeds |
the work saved in good cases for most test programs. |
* No longer use return list or unconsolidated bins since |
no scheme using them consistently outperforms those that don't |
given above changes. |
* Use best fit for very large chunks to prevent some worst-cases. |
* Added some support for debugging |
V2.6.0 Sat Nov 4 07:05:23 1995 Doug Lea (dl at gee) |
* Removed footers when chunks are in use. Thanks to |
Paul Wilson (wilson@cs.texas.edu) for the suggestion. |
V2.5.4 Wed Nov 1 07:54:51 1995 Doug Lea (dl at gee) |
* Added malloc_trim, with help from Wolfram Gloger |
(wmglo@Dent.MED.Uni-Muenchen.DE). |
V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g) |
V2.5.2 Tue Apr 5 16:20:40 1994 Doug Lea (dl at g) |
* realloc: try to expand in both directions |
* malloc: swap order of clean-bin strategy; |
* realloc: only conditionally expand backwards |
* Try not to scavenge used bins |
* Use bin counts as a guide to preallocation |
* Occasionally bin return list chunks in first scan |
* Add a few optimizations from colin@nyx10.cs.du.edu |
V2.5.1 Sat Aug 14 15:40:43 1993 Doug Lea (dl at g) |
* faster bin computation & slightly different binning |
* merged all consolidations to one part of malloc proper |
(eliminating old malloc_find_space & malloc_clean_bin) |
* Scan 2 returns chunks (not just 1) |
* Propagate failure in realloc if malloc returns 0 |
* Add stuff to allow compilation on non-ANSI compilers |
from kpv@research.att.com |
V2.5 Sat Aug 7 07:41:59 1993 Doug Lea (dl at g.oswego.edu) |
* removed potential for odd address access in prev_chunk |
* removed dependency on getpagesize.h |
* misc cosmetics and a bit more internal documentation |
* anticosmetics: mangled names in macros to evade debugger strangeness |
* tested on sparc, hp-700, dec-mips, rs6000 |
with gcc & native cc (hp, dec only) allowing |
Detlefs & Zorn comparison study (in SIGPLAN Notices.) |
Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu) |
* Based loosely on libg++-1.2X malloc. (It retains some of the overall |
structure of old version, but most details differ.) |
*/ |
/** @} |
*/ |
/branches/arm/uspace/lib/libc/Makefile.toolchain |
---|
26,27 → 26,16 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
CFLAGS = -I$(LIBC_PREFIX)/include -O3 -imacros $(LIBC_PREFIX)/../../../config.h \ |
-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \ |
-finput-charset=UTF-8 -fno-builtin -Wall -Wextra -Wno-unused-parameter \ |
-Wmissing-prototypes -Werror-implicit-function-declaration -nostdlib \ |
-nostdinc -pipe -g -D__$(ENDIANESS)__ |
DEFS = -DARCH=$(ARCH) |
CFLAGS = -fno-builtin -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -O3 -nostdlib -nostdinc -I$(LIBC_PREFIX)/include |
LFLAGS = -M -N $(SOFTINT_PREFIX)/libsoftint.a |
AFLAGS = |
#-Werror |
## Cross-toolchain prefix |
# |
ifndef CROSS_PREFIX |
CROSS_PREFIX = /usr/local |
endif |
## Setup platform configuration |
# |
-include $(LIBC_PREFIX)/../../../Makefile.config |
-include $(LIBC_PREFIX)/../../../config.defs |
-include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc |
include $(LIBC_PREFIX)/arch/$(ARCH)/Makefile.inc |
## Simple detection of the host system |
# |
70,7 → 59,6 |
AR = $(BINUTILS_PREFIX)ar |
OBJCOPY = $(BINUTILS_PREFIX)objcopy |
OBJDUMP = $(BINUTILS_PREFIX)objdump |
DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
endif |
ifeq ($(COMPILER),icc_native) |
80,7 → 68,6 |
AR = ar |
OBJCOPY = objcopy |
OBJDUMP = objdump |
DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
endif |
ifeq ($(COMPILER),gcc_cross) |
90,5 → 77,5 |
AR = $(TOOLCHAIN_DIR)/$(TARGET)-ar |
OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy |
OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump |
DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
endif |
/branches/arm/uspace/lib/libfs/libfs.c |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2009 Jakub Jermar |
* Copyright (c) 2008 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
36,6 → 36,7 |
#include "libfs.h" |
#include "../../srv/vfs/vfs.h" |
#include "../../srv/rd/rd.h" |
#include <errno.h> |
#include <async.h> |
#include <ipc/ipc.h> |
42,8 → 43,6 |
#include <as.h> |
#include <assert.h> |
#include <dirent.h> |
#include <mem.h> |
#include <sys/stat.h> |
/** Register file system server. |
* |
70,7 → 69,7 |
* out-of-order, when it knows that the operation succeeded or failed. |
*/ |
ipc_call_t answer; |
aid_t req = async_send_0(vfs_phone, VFS_IN_REGISTER, &answer); |
aid_t req = async_send_0(vfs_phone, VFS_REGISTER, &answer); |
/* |
* Send our VFS info structure to VFS. |
105,7 → 104,7 |
} |
/* |
* Pick up the answer for the request to the VFS_IN_REQUEST call. |
* Pick up the answer for the request to the VFS_REQUEST call. |
*/ |
async_wait_for(req, NULL); |
reg->fs_handle = (int) IPC_GET_ARG1(answer); |
124,106 → 123,23 |
return IPC_GET_RETVAL(answer); |
} |
void fs_node_initialize(fs_node_t *fn) |
{ |
memset(fn, 0, sizeof(fs_node_t)); |
} |
void libfs_mount(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid, |
ipc_call_t *request) |
{ |
dev_handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*request); |
fs_handle_t mr_fs_handle = (fs_handle_t) IPC_GET_ARG3(*request); |
dev_handle_t mr_dev_handle = (dev_handle_t) IPC_GET_ARG4(*request); |
int res; |
ipcarg_t rc; |
ipc_call_t call; |
ipc_callid_t callid; |
/* accept the phone */ |
callid = async_get_call(&call); |
int mountee_phone = (int)IPC_GET_ARG1(call); |
if ((IPC_GET_METHOD(call) != IPC_M_CONNECTION_CLONE) || |
mountee_phone < 0) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
ipc_answer_0(callid, EOK); /* acknowledge the mountee_phone */ |
res = ipc_data_write_receive(&callid, NULL); |
if (!res) { |
ipc_hangup(mountee_phone); |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
fs_node_t *fn = ops->node_get(mp_dev_handle, mp_fs_index); |
if (!fn) { |
ipc_hangup(mountee_phone); |
ipc_answer_0(callid, ENOENT); |
ipc_answer_0(rid, ENOENT); |
return; |
} |
if (fn->mp_data.mp_active) { |
ipc_hangup(mountee_phone); |
ops->node_put(fn); |
ipc_answer_0(callid, EBUSY); |
ipc_answer_0(rid, EBUSY); |
return; |
} |
rc = async_req_0_0(mountee_phone, IPC_M_CONNECT_ME); |
if (rc != 0) { |
ipc_hangup(mountee_phone); |
ops->node_put(fn); |
ipc_answer_0(callid, rc); |
ipc_answer_0(rid, rc); |
return; |
} |
ipc_call_t answer; |
aid_t msg = async_send_1(mountee_phone, VFS_OUT_MOUNTED, mr_dev_handle, |
&answer); |
ipc_forward_fast(callid, mountee_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME); |
async_wait_for(msg, &rc); |
if (rc == EOK) { |
fn->mp_data.mp_active = true; |
fn->mp_data.fs_handle = mr_fs_handle; |
fn->mp_data.dev_handle = mr_dev_handle; |
fn->mp_data.phone = mountee_phone; |
} |
/* |
* Do not release the FS node so that it stays in memory. |
*/ |
ipc_answer_3(rid, rc, IPC_GET_ARG1(answer), IPC_GET_ARG2(answer), |
IPC_GET_ARG3(answer)); |
} |
/** Lookup VFS triplet by name in the file system name space. |
* |
* The path passed in the PLB must be in the canonical file system path format |
* as returned by the canonify() function. |
* |
* @param ops libfs operations structure with function pointers to |
* file system implementation |
* @param fs_handle File system handle of the file system where to perform |
* the lookup. |
* @param rid Request ID of the VFS_OUT_LOOKUP request. |
* @param request VFS_OUT_LOOKUP request data itself. |
* |
* @param ops libfs operations structure with function pointers to |
* file system implementation |
* @param fs_handle File system handle of the file system where to perform |
* the lookup. |
* @param rid Request ID of the VFS_LOOKUP request. |
* @param request VFS_LOOKUP request data itself. |
*/ |
void libfs_lookup(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid, |
ipc_call_t *request) |
{ |
unsigned first = IPC_GET_ARG1(*request); |
unsigned next = IPC_GET_ARG1(*request); |
unsigned last = IPC_GET_ARG2(*request); |
unsigned next = first; |
dev_handle_t dev_handle = IPC_GET_ARG3(*request); |
int lflag = IPC_GET_ARG4(*request); |
fs_index_t index = IPC_GET_ARG5(*request); /* when L_LINK specified */ |
233,18 → 149,10 |
if (last < next) |
last += PLB_SIZE; |
fs_node_t *par = NULL; |
fs_node_t *cur = ops->root_get(dev_handle); |
fs_node_t *tmp = NULL; |
void *par = NULL; |
void *cur = ops->root_get(dev_handle); |
void *tmp = NULL; |
if (cur->mp_data.mp_active) { |
ipc_forward_slow(rid, cur->mp_data.phone, VFS_OUT_LOOKUP, |
next, last, cur->mp_data.dev_handle, lflag, index, |
IPC_FF_ROUTE_FROM_ME); |
ops->node_put(cur); |
return; |
} |
if (ops->plb_get_char(next) == '/') |
next++; /* eat slash */ |
267,21 → 175,6 |
/* match the component */ |
tmp = ops->match(cur, component); |
if (tmp && tmp->mp_data.mp_active) { |
if (next > last) |
next = last = first; |
else |
next--; |
ipc_forward_slow(rid, tmp->mp_data.phone, |
VFS_OUT_LOOKUP, next, last, tmp->mp_data.dev_handle, |
lflag, index, IPC_FF_ROUTE_FROM_ME); |
ops->node_put(cur); |
ops->node_put(tmp); |
if (par) |
ops->node_put(par); |
return; |
} |
/* handle miss: match amongst siblings */ |
if (!tmp) { |
297,33 → 190,36 |
ipc_answer_0(rid, ENOTDIR); |
goto out; |
} |
fs_node_t *fn; |
void *nodep; |
if (lflag & L_CREATE) |
fn = ops->create(dev_handle, lflag); |
nodep = ops->create(lflag); |
else |
fn = ops->node_get(dev_handle, |
nodep = ops->node_get(dev_handle, |
index); |
if (fn) { |
int rc; |
rc = ops->link(cur, fn, component); |
if (rc != EOK) { |
if (nodep) { |
if (!ops->link(cur, nodep, component)) { |
if (lflag & L_CREATE) { |
(void)ops->destroy(fn); |
(void)ops->destroy( |
nodep); |
} |
ipc_answer_0(rid, rc); |
ipc_answer_0(rid, ENOSPC); |
} else { |
ipc_answer_5(rid, EOK, |
fs_handle, dev_handle, |
ops->index_get(fn), |
ops->size_get(fn), |
ops->lnkcnt_get(fn)); |
ops->node_put(fn); |
ops->index_get(nodep), |
ops->size_get(nodep), |
ops->lnkcnt_get(nodep)); |
ops->node_put(nodep); |
} |
} else { |
ipc_answer_0(rid, ENOSPC); |
} |
goto out; |
} else if (lflag & L_PARENT) { |
/* return parent */ |
ipc_answer_5(rid, EOK, fs_handle, dev_handle, |
ops->index_get(cur), ops->size_get(cur), |
ops->lnkcnt_get(cur)); |
} |
ipc_answer_0(rid, ENOENT); |
goto out; |
365,26 → 261,23 |
assert(len); |
component[len] = '\0'; |
fs_node_t *fn; |
void *nodep; |
if (lflag & L_CREATE) |
fn = ops->create(dev_handle, lflag); |
nodep = ops->create(lflag); |
else |
fn = ops->node_get(dev_handle, index); |
if (fn) { |
int rc; |
rc = ops->link(cur, fn, component); |
if (rc != EOK) { |
nodep = ops->node_get(dev_handle, index); |
if (nodep) { |
if (!ops->link(cur, nodep, component)) { |
if (lflag & L_CREATE) |
(void)ops->destroy(fn); |
ipc_answer_0(rid, rc); |
(void)ops->destroy(nodep); |
ipc_answer_0(rid, ENOSPC); |
} else { |
ipc_answer_5(rid, EOK, |
fs_handle, dev_handle, |
ops->index_get(fn), |
ops->size_get(fn), |
ops->lnkcnt_get(fn)); |
ops->node_put(fn); |
ops->index_get(nodep), |
ops->size_get(nodep), |
ops->lnkcnt_get(nodep)); |
ops->node_put(nodep); |
} |
} else { |
ipc_answer_0(rid, ENOSPC); |
396,9 → 289,18 |
} |
/* handle hit */ |
if (lflag & L_PARENT) { |
ops->node_put(cur); |
cur = par; |
par = NULL; |
if (!cur) { |
ipc_answer_0(rid, ENOENT); |
goto out; |
} |
} |
if (lflag & L_UNLINK) { |
unsigned old_lnkcnt = ops->lnkcnt_get(cur); |
int res = ops->unlink(par, cur, component); |
int res = ops->unlink(par, cur); |
ipc_answer_5(rid, (ipcarg_t)res, fs_handle, dev_handle, |
ops->index_get(cur), ops->size_get(cur), old_lnkcnt); |
goto out; |
429,61 → 331,61 |
ops->node_put(tmp); |
} |
void libfs_stat(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid, |
ipc_call_t *request) |
{ |
dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request); |
fs_node_t *fn = ops->node_get(dev_handle, index); |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_read_receive(&callid, &size) || |
size != sizeof(struct stat)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
struct stat stat; |
memset(&stat, 0, sizeof(struct stat)); |
stat.fs_handle = fs_handle; |
stat.dev_handle = dev_handle; |
stat.index = index; |
stat.lnkcnt = ops->lnkcnt_get(fn); |
stat.is_file = ops->is_file(fn); |
stat.size = ops->size_get(fn); |
ipc_data_read_finalize(callid, &stat, sizeof(struct stat)); |
ipc_answer_0(rid, EOK); |
} |
/** Open VFS triplet. |
/** Read data from a block device. |
* |
* @param ops libfs operations structure with function pointers to |
* file system implementation |
* @param rid Request ID of the VFS_OUT_OPEN_NODE request. |
* @param request VFS_OUT_OPEN_NODE request data itself. |
* @param phone Phone to be used to communicate with the device. |
* @param buffer Communication buffer shared with the device. |
* @param bufpos Pointer to the first unread valid offset within the |
* communication buffer. |
* @param buflen Pointer to the number of unread bytes that are ready in |
* the communication buffer. |
* @param pos Device position to be read. |
* @param dst Destination buffer. |
* @param size Size of the destination buffer. |
* @param block_size Block size to be used for the transfer. |
* |
* @return True on success, false on failure. |
*/ |
void libfs_open_node(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid, |
ipc_call_t *request) |
bool libfs_blockread(int phone, void *buffer, off_t *bufpos, size_t *buflen, |
off_t *pos, void *dst, size_t size, size_t block_size) |
{ |
dev_handle_t dev_handle = IPC_GET_ARG1(*request); |
fs_index_t index = IPC_GET_ARG2(*request); |
off_t offset = 0; |
size_t left = size; |
fs_node_t *node = ops->node_get(dev_handle, index); |
if (node == NULL) { |
ipc_answer_0(rid, ENOENT); |
return; |
while (left > 0) { |
size_t rd; |
if (*bufpos + left < *buflen) |
rd = left; |
else |
rd = *buflen - *bufpos; |
if (rd > 0) { |
/* |
* Copy the contents of the communication buffer to the |
* destination buffer. |
*/ |
memcpy(dst + offset, buffer + *bufpos, rd); |
offset += rd; |
*bufpos += rd; |
*pos += rd; |
left -= rd; |
} |
if (*bufpos == *buflen) { |
/* Refill the communication buffer with a new block. */ |
ipcarg_t retval; |
int rc = async_req_2_1(phone, RD_READ_BLOCK, |
*pos / block_size, block_size, &retval); |
if ((rc != EOK) || (retval != EOK)) |
return false; |
*bufpos = 0; |
*buflen = block_size; |
} |
} |
ipc_answer_5(rid, EOK, fs_handle, dev_handle, index, |
ops->size_get(node), ops->lnkcnt_get(node)); |
ops->node_put(node); |
return true; |
} |
/** @} |
/branches/arm/uspace/lib/libfs/libfs.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2009 Jakub Jermar |
* Copyright (c) 2007 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
26,69 → 26,54 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libfs |
/** @addtogroup libfs |
* @{ |
*/ |
*/ |
/** |
* @file |
*/ |
#ifndef LIBFS_LIBFS_H_ |
#define LIBFS_LIBFS_H_ |
#define LIBFS_LIBFS_H_ |
#include <ipc/vfs.h> |
#include "../../srv/vfs/vfs.h" |
#include <stdint.h> |
#include <ipc/ipc.h> |
#include <async.h> |
#include <devmap.h> |
typedef struct { |
bool mp_active; |
int phone; |
fs_handle_t fs_handle; |
dev_handle_t dev_handle; |
} mp_data_t; |
typedef struct { |
mp_data_t mp_data; /**< Mount point info. */ |
void *data; /**< Data of the file system implementation. */ |
} fs_node_t; |
typedef struct { |
fs_node_t * (* match)(fs_node_t *, const char *); |
fs_node_t * (* node_get)(dev_handle_t, fs_index_t); |
void (* node_put)(fs_node_t *); |
fs_node_t * (* create)(dev_handle_t, int); |
int (* destroy)(fs_node_t *); |
int (* link)(fs_node_t *, fs_node_t *, const char *); |
int (* unlink)(fs_node_t *, fs_node_t *, const char *); |
fs_index_t (* index_get)(fs_node_t *); |
size_t (* size_get)(fs_node_t *); |
unsigned (* lnkcnt_get)(fs_node_t *); |
bool (* has_children)(fs_node_t *); |
fs_node_t *(* root_get)(dev_handle_t); |
char (* plb_get_char)(unsigned pos); |
bool (* is_directory)(fs_node_t *); |
bool (* is_file)(fs_node_t *); |
void * (* match)(void *, const char *); |
void * (* node_get)(dev_handle_t, fs_index_t); |
void (* node_put)(void *); |
void * (* create)(int); |
int (* destroy)(void *); |
bool (* link)(void *, void *, const char *); |
int (* unlink)(void *, void *); |
fs_index_t (* index_get)(void *); |
size_t (* size_get)(void *); |
unsigned (* lnkcnt_get)(void *); |
bool (* has_children)(void *); |
void *(* root_get)(dev_handle_t); |
char (* plb_get_char)(unsigned pos); |
bool (* is_directory)(void *); |
bool (* is_file)(void *); |
} libfs_ops_t; |
typedef struct { |
int fs_handle; /**< File system handle. */ |
ipcarg_t vfs_phonehash; /**< Initial VFS phonehash. */ |
uint8_t *plb_ro; /**< Read-only PLB view. */ |
int fs_handle; /**< File system handle. */ |
ipcarg_t vfs_phonehash; /**< Initial VFS phonehash. */ |
uint8_t *plb_ro; /**< Read-only PLB view. */ |
} fs_reg_t; |
extern int fs_register(int, fs_reg_t *, vfs_info_t *, async_client_conn_t); |
extern void fs_node_initialize(fs_node_t *); |
extern void libfs_mount(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *); |
extern void libfs_lookup(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *); |
extern void libfs_stat(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *); |
extern void libfs_open_node(libfs_ops_t *, fs_handle_t, ipc_callid_t, |
ipc_call_t *); |
extern bool libfs_blockread(int, void *, off_t *, size_t *, off_t *, void *, |
size_t, size_t); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/libfs/Makefile |
---|
31,7 → 31,6 |
# |
LIBC_PREFIX = ../libc |
## Setup toolchain |
# |
58,7 → 57,7 |
find . -name '*.o' -follow -exec rm \{\} \; |
depend: |
-makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null |
libfs.a: depend $(OBJECTS) |
$(AR) rc libfs.a $(OBJECTS) |
/branches/arm/uspace/lib/softfloat/include/sftypes.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup softfloat |
/** @addtogroup softfloat |
* @{ |
*/ |
/** @file |
41,40 → 41,40 |
typedef union { |
float f; |
uint32_t binary; |
struct { |
#if defined(__BE__) |
uint32_t sign : 1; |
uint32_t exp : 8; |
uint32_t fraction : 23; |
#elif defined(__LE__) |
uint32_t fraction : 23; |
uint32_t exp : 8; |
uint32_t sign : 1; |
#else |
#error Unknown endianess |
struct { |
#if defined(ARCH_IS_BIG_ENDIAN) |
uint32_t sign:1; |
uint32_t exp:8; |
uint32_t fraction:23; |
#elif defined(ARCH_IS_LITTLE_ENDIAN) |
uint32_t fraction:23; |
uint32_t exp:8; |
uint32_t sign:1; |
#else |
#error "Unknown endians." |
#endif |
} parts __attribute__ ((packed)); |
} float32; |
} float32; |
typedef union { |
double d; |
uint64_t binary; |
struct { |
#if defined(__BE__) |
uint64_t sign : 1; |
uint64_t exp : 11; |
uint64_t fraction : 52; |
#elif defined(__LE__) |
uint64_t fraction : 52; |
uint64_t exp : 11; |
uint64_t sign : 1; |
#else |
#error Unknown endianess |
struct { |
#if defined(ARCH_IS_BIG_ENDIAN) |
uint64_t sign:1; |
uint64_t exp:11; |
uint64_t fraction:52; |
#elif defined(ARCH_IS_LITTLE_ENDIAN) |
uint64_t fraction:52; |
uint64_t exp:11; |
uint64_t sign:1; |
#else |
#error "Unknown endians." |
#endif |
} parts __attribute__ ((packed)); |
} float64; |
} parts __attribute__ ((packed)); |
} float64; |
#define FLOAT32_MAX 0x7f800000 |
#define FLOAT32_MIN 0xff800000 |
109,5 → 109,7 |
#endif |
/** @} |
/** @} |
*/ |
/branches/arm/uspace/lib/softfloat/arch/ppc64/include/functions.h |
---|
0,0 → 1,76 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup softfloatppc64 ppc64 |
* @ingroup sfl |
* @brief softfloat architecture dependent definitions |
* @{ |
*/ |
/** @file |
*/ |
#ifndef __SOFTFLOAT_FUNCTIONS_H__ |
#define __SOFTFLOAT_FUNCTIONS_H__ |
#define float32_to_int(X) float32_to_int32(X); |
#define float32_to_long(X) float32_to_int64(X); |
#define float32_to_longlong(X) float32_to_int64(X); |
#define float64_to_int(X) float64_to_int32(X); |
#define float64_to_long(X) float64_to_int64(X); |
#define float64_to_longlong(X) float64_to_int64(X); |
#define float32_to_uint(X) float32_to_uint32(X); |
#define float32_to_ulong(X) float32_to_uint64(X); |
#define float32_to_ulonglong(X) float32_to_uint64(X); |
#define float64_to_uint(X) float64_to_uint32(X); |
#define float64_to_ulong(X) float64_to_uint64(X); |
#define float64_to_ulonglong(X) float64_to_uint64(X); |
#define int_to_float32(X) int32_to_float32(X); |
#define long_to_float32(X) int64_to_float32(X); |
#define longlong_to_float32(X) int64_to_float32(X); |
#define int_to_float64(X) int32_to_float64(X); |
#define long_to_float64(X) int64_to_float64(X); |
#define longlong_to_float64(X) int64_to_float64(X); |
#define uint_to_float32(X) uint32_to_float32(X); |
#define ulong_to_float32(X) uint64_to_float32(X); |
#define ulonglong_to_float32(X) uint64_to_float32(X); |
#define uint_to_float64(X) uint32_to_float64(X); |
#define ulong_to_float64(X) uint64_to_float64(X); |
#define ulonglong_to_float64(X) uint64_to_float64(X); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/lib/softfloat/Makefile |
---|
30,26 → 30,25 |
# |
LIBC_PREFIX = ../libc |
## Setup toolchain |
# |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -Iinclude -Iarch/$(UARCH)/include/ |
CFLAGS +=-Iinclude -Iarch/$(ARCH)/include/ |
## Sources |
# |
GENERIC_SOURCES = \ |
generic/add.c \ |
generic/common.c \ |
generic/comparison.c \ |
generic/conversion.c \ |
generic/div.c \ |
generic/mul.c \ |
generic/other.c \ |
generic/softfloat.c \ |
GENERIC_SOURCES = \ |
generic/add.c \ |
generic/common.c \ |
generic/comparison.c \ |
generic/conversion.c \ |
generic/div.c \ |
generic/mul.c \ |
generic/other.c \ |
generic/softfloat.c \ |
generic/sub.c |
ARCH_SOURCES = |
67,7 → 66,7 |
find generic/ -name '*.o' -follow -exec rm \{\} \; |
depend: |
-makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
libsoftfloat.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
$(AR) rc libsoftfloat.a $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
/branches/arm/uspace/lib/softint/Makefile |
---|
30,7 → 30,6 |
# |
LIBC_PREFIX = ../libc |
## Setup toolchain |
# |
59,7 → 58,7 |
find generic/ -name '*.o' -follow -exec rm \{\} \; |
depend: |
-makedepend -f - -- $(DEPEMD_DEFS) $(CFLAGS) -- $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(CFLAGS) -f - $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
libsoftint.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
$(AR) rc libsoftint.a $(ARCH_OBJECTS) $(GENERIC_OBJECTS) |
/branches/arm/uspace/srv/bd/file_bd/file_bd.c |
---|
File deleted |
/branches/arm/uspace/srv/bd/file_bd/Makefile |
---|
File deleted |
/branches/arm/uspace/srv/bd/rd/rd.c |
---|
File deleted |
/branches/arm/uspace/srv/bd/rd/Makefile |
---|
File deleted |
/branches/arm/uspace/srv/bd/gxe_bd/gxe_bd.c |
---|
File deleted |
/branches/arm/uspace/srv/bd/gxe_bd/Makefile |
---|
File deleted |
/branches/arm/uspace/srv/bd/ata_bd/Makefile |
---|
File deleted |
/branches/arm/uspace/srv/bd/ata_bd/ata_bd.h |
---|
File deleted |
/branches/arm/uspace/srv/bd/ata_bd/ata_bd.c |
---|
File deleted |
/branches/arm/uspace/srv/cir/fhc/Makefile |
---|
File deleted |
/branches/arm/uspace/srv/cir/fhc/fhc.c |
---|
File deleted |
/branches/arm/uspace/srv/cir/obio/Makefile |
---|
File deleted |
/branches/arm/uspace/srv/cir/obio/obio.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/uspace/srv/cir/obio |
---|
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/uspace/srv/loader/main.c |
---|
27,12 → 27,12 |
*/ |
/** @addtogroup loader |
* @brief Loads and runs programs from VFS. |
* @brief Loads and runs programs from VFS. |
* @{ |
*/ |
*/ |
/** |
* @file |
* @brief Loads and runs programs from VFS. |
* @brief Loads and runs programs from VFS. |
* |
* The program loader is a special init binary. Its image is used |
* to create a new task upon a @c task_spawn syscall. The syscall |
50,20 → 50,20 |
#include <fcntl.h> |
#include <sys/types.h> |
#include <ipc/ipc.h> |
#include <ipc/services.h> |
#include <ipc/loader.h> |
#include <ipc/ns.h> |
#include <macros.h> |
#include <loader/pcb.h> |
#include <errno.h> |
#include <async.h> |
#include <string.h> |
#include <as.h> |
#include <elf.h> |
#include <elf_load.h> |
#define DPRINTF(...) |
/** |
* Bias used for loading the dynamic linker. This will be soon replaced |
* by automatic placement. |
*/ |
#define RTLD_BIAS 0x80000 |
/** Pathname of the file that will be loaded */ |
static char *pathname = NULL; |
78,38 → 78,28 |
/** Buffer holding all arguments */ |
static char *arg_buf = NULL; |
/** Number of preset files */ |
static int filc = 0; |
/** Preset files vector */ |
static fdi_node_t **filv = NULL; |
/** Buffer holding all preset files */ |
static fdi_node_t *fil_buf = NULL; |
static elf_info_t prog_info; |
static elf_info_t interp_info; |
static bool is_dyn_linked; |
/** Used to limit number of connections to one. */ |
static bool connected; |
static void ldr_get_taskid(ipc_callid_t rid, ipc_call_t *request) |
static void loader_get_taskid(ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_callid_t callid; |
task_id_t task_id; |
size_t len; |
task_id = task_get_id(); |
if (!ipc_data_read_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
if (len > sizeof(task_id)) |
len = sizeof(task_id); |
if (len > sizeof(task_id)) len = sizeof(task_id); |
ipc_data_read_finalize(callid, &task_id, len); |
ipc_answer_0(rid, EOK); |
} |
120,18 → 110,18 |
* @param rid |
* @param request |
*/ |
static void ldr_set_pathname(ipc_callid_t rid, ipc_call_t *request) |
static void loader_set_pathname(ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_callid_t callid; |
size_t len; |
char *name_buf; |
if (!ipc_data_write_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
name_buf = malloc(len + 1); |
if (!name_buf) { |
ipc_answer_0(callid, ENOMEM); |
138,15 → 128,15 |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
ipc_data_write_finalize(callid, name_buf, len); |
ipc_answer_0(rid, EOK); |
if (pathname != NULL) { |
free(pathname); |
pathname = NULL; |
} |
name_buf[len] = '\0'; |
pathname = name_buf; |
} |
156,56 → 146,58 |
* @param rid |
* @param request |
*/ |
static void ldr_set_args(ipc_callid_t rid, ipc_call_t *request) |
static void loader_set_args(ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_callid_t callid; |
size_t buf_size, arg_size; |
size_t buf_len, arg_len; |
char *p; |
int n; |
if (!ipc_data_write_receive(&callid, &buf_size)) { |
if (!ipc_data_write_receive(&callid, &buf_len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
if (arg_buf != NULL) { |
free(arg_buf); |
arg_buf = NULL; |
} |
if (argv != NULL) { |
free(argv); |
argv = NULL; |
} |
arg_buf = malloc(buf_size + 1); |
arg_buf = malloc(buf_len + 1); |
if (!arg_buf) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
ipc_data_write_finalize(callid, arg_buf, buf_size); |
arg_buf[buf_size] = '\0'; |
ipc_data_write_finalize(callid, arg_buf, buf_len); |
ipc_answer_0(rid, EOK); |
arg_buf[buf_len] = '\0'; |
/* |
* Count number of arguments |
*/ |
p = arg_buf; |
n = 0; |
while (p < arg_buf + buf_size) { |
arg_size = str_size(p); |
p = p + arg_size + 1; |
while (p < arg_buf + buf_len) { |
arg_len = strlen(p); |
p = p + arg_len + 1; |
++n; |
} |
/* Allocate argv */ |
argv = malloc((n + 1) * sizeof(char *)); |
if (argv == NULL) { |
free(arg_buf); |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
215,84 → 207,18 |
*/ |
p = arg_buf; |
n = 0; |
while (p < arg_buf + buf_size) { |
while (p < arg_buf + buf_len) { |
argv[n] = p; |
arg_size = str_size(p); |
p = p + arg_size + 1; |
arg_len = strlen(p); |
p = p + arg_len + 1; |
++n; |
} |
argc = n; |
argv[n] = NULL; |
ipc_answer_0(rid, EOK); |
} |
/** Receive a call setting preset files of the program to execute. |
* |
* @param rid |
* @param request |
*/ |
static void ldr_set_files(ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_callid_t callid; |
size_t buf_size; |
if (!ipc_data_write_receive(&callid, &buf_size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
if ((buf_size % sizeof(fdi_node_t)) != 0) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
if (fil_buf != NULL) { |
free(fil_buf); |
fil_buf = NULL; |
} |
if (filv != NULL) { |
free(filv); |
filv = NULL; |
} |
fil_buf = malloc(buf_size); |
if (!fil_buf) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
ipc_data_write_finalize(callid, fil_buf, buf_size); |
int count = buf_size / sizeof(fdi_node_t); |
/* Allocate filvv */ |
filv = malloc((count + 1) * sizeof(fdi_node_t *)); |
if (filv == NULL) { |
free(fil_buf); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
/* |
* Fill filv with argument pointers |
*/ |
int i; |
for (i = 0; i < count; i++) |
filv[i] = &fil_buf[i]; |
filc = count; |
filv[count] = NULL; |
ipc_answer_0(rid, EOK); |
} |
/** Load the previously selected program. |
* |
* @param rid |
299,43 → 225,51 |
* @param request |
* @return 0 on success, !0 on error. |
*/ |
static int ldr_load(ipc_callid_t rid, ipc_call_t *request) |
static int loader_load(ipc_callid_t rid, ipc_call_t *request) |
{ |
int rc; |
// printf("Load program '%s'\n", pathname); |
rc = elf_load_file(pathname, 0, &prog_info); |
if (rc != EE_OK) { |
DPRINTF("Failed to load executable '%s'.\n", pathname); |
if (rc < 0) { |
printf("failed to load program\n"); |
ipc_answer_0(rid, EINVAL); |
return 1; |
} |
// printf("Create PCB\n"); |
elf_create_pcb(&prog_info, &pcb); |
pcb.argc = argc; |
pcb.argv = argv; |
pcb.filc = filc; |
pcb.filv = filv; |
if (prog_info.interp == NULL) { |
/* Statically linked program */ |
// printf("Run statically linked program\n"); |
// printf("entry point: 0x%llx\n", prog_info.entry); |
is_dyn_linked = false; |
ipc_answer_0(rid, EOK); |
return 0; |
} |
rc = elf_load_file(prog_info.interp, 0, &interp_info); |
if (rc != EE_OK) { |
DPRINTF("Failed to load interpreter '%s.'\n", |
prog_info.interp); |
printf("Load dynamic linker '%s'\n", prog_info.interp); |
rc = elf_load_file("/rtld.so", RTLD_BIAS, &interp_info); |
if (rc < 0) { |
printf("failed to load dynamic linker\n"); |
ipc_answer_0(rid, EINVAL); |
return 1; |
} |
/* |
* Provide dynamic linker with some useful data |
*/ |
pcb.rtld_dynamic = interp_info.dynamic; |
pcb.rtld_bias = RTLD_BIAS; |
is_dyn_linked = true; |
ipc_answer_0(rid, EOK); |
return 0; |
} |
346,28 → 280,24 |
* @param request |
* @return 0 on success, !0 on error. |
*/ |
static void ldr_run(ipc_callid_t rid, ipc_call_t *request) |
static void loader_run(ipc_callid_t rid, ipc_call_t *request) |
{ |
const char *cp; |
/* Set the task name. */ |
cp = str_rchr(pathname, '/'); |
cp = (cp == NULL) ? pathname : (cp + 1); |
task_set_name(cp); |
if (is_dyn_linked == true) { |
/* Dynamically linked program */ |
DPRINTF("Run ELF interpreter.\n"); |
DPRINTF("Entry point: 0x%lx\n", interp_info.entry); |
printf("run dynamic linker\n"); |
printf("entry point: 0x%llx\n", interp_info.entry); |
close_console(); |
ipc_answer_0(rid, EOK); |
elf_run(&interp_info, &pcb); |
} else { |
/* Statically linked program */ |
close_console(); |
ipc_answer_0(rid, EOK); |
elf_run(&prog_info, &pcb); |
} |
} |
/* Not reached */ |
} |
376,50 → 306,33 |
* Receive and carry out commands (of which the last one should be |
* to execute the loaded program). |
*/ |
static void ldr_connection(ipc_callid_t iid, ipc_call_t *icall) |
static void loader_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
ipc_callid_t callid; |
ipc_call_t call; |
int retval; |
/* Already have a connection? */ |
if (connected) { |
ipc_answer_0(iid, ELIMIT); |
return; |
} |
connected = true; |
/* Accept the connection */ |
ipc_answer_0(iid, EOK); |
/* Ignore parameters, the connection is already open */ |
(void) iid; |
(void) icall; |
(void)iid; (void)icall; |
while (1) { |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
exit(0); |
case LOADER_GET_TASKID: |
ldr_get_taskid(callid, &call); |
loader_get_taskid(callid, &call); |
continue; |
case LOADER_SET_PATHNAME: |
ldr_set_pathname(callid, &call); |
loader_set_pathname(callid, &call); |
continue; |
case LOADER_SET_ARGS: |
ldr_set_args(callid, &call); |
loader_set_args(callid, &call); |
continue; |
case LOADER_SET_FILES: |
ldr_set_files(callid, &call); |
continue; |
case LOADER_LOAD: |
ldr_load(callid, &call); |
loader_load(callid, &call); |
continue; |
case LOADER_RUN: |
ldr_run(callid, &call); |
loader_run(callid, &call); |
/* Not reached */ |
default: |
retval = ENOENT; |
427,7 → 340,7 |
} |
if ((callid & IPC_CALLID_NOTIFICATION) == 0 && |
IPC_GET_METHOD(call) != IPC_M_PHONE_HUNGUP) { |
DPRINTF("Responding EINVAL to method %d.\n", |
printf("responding EINVAL to method %d\n", |
IPC_GET_METHOD(call)); |
ipc_answer_0(callid, EINVAL); |
} |
438,28 → 351,31 |
*/ |
int main(int argc, char *argv[]) |
{ |
ipcarg_t phonead; |
task_id_t id; |
int rc; |
ipc_callid_t callid; |
ipc_call_t call; |
ipcarg_t phone_hash; |
connected = false; |
/* The first call only communicates the incoming phone hash */ |
callid = ipc_wait_for_call(&call); |
/* Introduce this task to the NS (give it our task ID). */ |
id = task_get_id(); |
rc = async_req_2_0(PHONE_NS, NS_ID_INTRO, LOWER32(id), UPPER32(id)); |
if (rc != EOK) |
return -1; |
if (IPC_GET_METHOD(call) != LOADER_HELLO) { |
if (IPC_GET_METHOD(call) != IPC_M_PHONE_HUNGUP) |
ipc_answer_0(callid, EINVAL); |
return 1; |
} |
/* Set a handler of incomming connections. */ |
async_set_client_connection(ldr_connection); |
/* Register at naming service. */ |
if (ipc_connect_to_me(PHONE_NS, SERVICE_LOAD, 0, 0, &phonead) != 0) |
return -2; |
ipc_answer_0(callid, EOK); |
phone_hash = call.in_phone_hash; |
/* |
* Up until now async must not be used as it couldn't |
* handle incoming requests. (Which means e.g. printf() |
* cannot be used) |
*/ |
async_new_connection(phone_hash, 0, NULL, loader_connection); |
async_manager(); |
/* Never reached */ |
/* not reached */ |
return 0; |
} |
/branches/arm/uspace/srv/loader/elf_load.c |
---|
57,8 → 57,6 |
#include "elf_load.h" |
#include "arch.h" |
#define DPRINTF(...) |
static char *error_codes[] = { |
"no error", |
"invalid image", |
74,7 → 72,7 |
static int load_segment(elf_ld_t *elf, elf_segment_header_t *entry); |
/** Read until the buffer is read in its entirety. */ |
static int my_read(int fd, void *buf, size_t len) |
static int my_read(int fd, char *buf, size_t len) |
{ |
int cnt = 0; |
do { |
108,9 → 106,11 |
int fd; |
int rc; |
// printf("open and read '%s'...\n", file_name); |
fd = open(file_name, O_RDONLY); |
if (fd < 0) { |
DPRINTF("failed opening file\n"); |
printf("failed opening file\n"); |
return -1; |
} |
171,18 → 171,19 |
rc = my_read(elf->fd, header, sizeof(elf_header_t)); |
if (rc < 0) { |
DPRINTF("Read error.\n"); |
printf("read error\n"); |
return EE_INVALID; |
} |
elf->header = header; |
// printf("ELF-load:"); |
/* Identify ELF */ |
if (header->e_ident[EI_MAG0] != ELFMAG0 || |
header->e_ident[EI_MAG1] != ELFMAG1 || |
header->e_ident[EI_MAG2] != ELFMAG2 || |
header->e_ident[EI_MAG3] != ELFMAG3) { |
DPRINTF("Invalid header.\n"); |
printf("invalid header\n"); |
return EE_INVALID; |
} |
192,18 → 193,18 |
header->e_ident[EI_VERSION] != EV_CURRENT || |
header->e_version != EV_CURRENT || |
header->e_ident[EI_CLASS] != ELF_CLASS) { |
DPRINTF("Incompatible data/version/class.\n"); |
printf("incompatible data/version/class\n"); |
return EE_INCOMPATIBLE; |
} |
if (header->e_phentsize != sizeof(elf_segment_header_t)) { |
DPRINTF("e_phentsize:%d != %d\n", header->e_phentsize, |
printf("e_phentsize:%d != %d\n", header->e_phentsize, |
sizeof(elf_segment_header_t)); |
return EE_INCOMPATIBLE; |
} |
if (header->e_shentsize != sizeof(elf_section_header_t)) { |
DPRINTF("e_shentsize:%d != %d\n", header->e_shentsize, |
printf("e_shentsize:%d != %d\n", header->e_shentsize, |
sizeof(elf_section_header_t)); |
return EE_INCOMPATIBLE; |
} |
210,19 → 211,23 |
/* Check if the object type is supported. */ |
if (header->e_type != ET_EXEC && header->e_type != ET_DYN) { |
DPRINTF("Object type %d is not supported\n", header->e_type); |
printf("Object type %d is not supported\n", header->e_type); |
return EE_UNSUPPORTED; |
} |
/* Shared objects can be loaded with a bias */ |
// printf("Object type: %d\n", header->e_type); |
if (header->e_type == ET_DYN) |
elf->bias = so_bias; |
else |
elf->bias = 0; |
// printf("Bias set to 0x%x\n", elf->bias); |
elf->info->interp = NULL; |
elf->info->dynamic = NULL; |
// printf("parse segments\n"); |
/* Walk through all segment headers and process them. */ |
for (i = 0; i < header->e_phnum; i++) { |
elf_segment_header_t segment_hdr; |
234,7 → 239,7 |
rc = my_read(elf->fd, &segment_hdr, |
sizeof(elf_segment_header_t)); |
if (rc < 0) { |
DPRINTF("Read error.\n"); |
printf("read error\n"); |
return EE_INVALID; |
} |
243,7 → 248,7 |
return rc; |
} |
DPRINTF("Parse sections.\n"); |
// printf("parse sections\n"); |
/* Inspect all section headers and proccess them. */ |
for (i = 0; i < header->e_shnum; i++) { |
256,7 → 261,7 |
rc = my_read(elf->fd, §ion_hdr, |
sizeof(elf_section_header_t)); |
if (rc < 0) { |
DPRINTF("Read error.\n"); |
printf("read error\n"); |
return EE_INVALID; |
} |
268,7 → 273,7 |
elf->info->entry = |
(entry_point_t)((uint8_t *)header->e_entry + elf->bias); |
DPRINTF("Done.\n"); |
// printf("done\n"); |
return EE_OK; |
} |
311,7 → 316,7 |
case PT_LOPROC: |
case PT_HIPROC: |
default: |
DPRINTF("Segment p_type %d unknown.\n", entry->p_type); |
printf("segment p_type %d unknown\n", entry->p_type); |
return EE_UNSUPPORTED; |
break; |
} |
331,26 → 336,21 |
int flags = 0; |
uintptr_t bias; |
uintptr_t base; |
void *seg_ptr; |
uintptr_t seg_addr; |
size_t mem_sz; |
int rc; |
// printf("load segment at addr 0x%x, size 0x%x\n", entry->p_vaddr, |
// entry->p_memsz); |
bias = elf->bias; |
seg_addr = entry->p_vaddr + bias; |
seg_ptr = (void *) seg_addr; |
DPRINTF("Load segment at addr 0x%x, size 0x%x\n", seg_addr, |
entry->p_memsz); |
if (entry->p_align > 1) { |
if ((entry->p_offset % entry->p_align) != |
(seg_addr % entry->p_align)) { |
DPRINTF("Align check 1 failed offset%%align=%d, " |
(entry->p_vaddr % entry->p_align)) { |
printf("align check 1 failed offset%%align=%d, " |
"vaddr%%align=%d\n", |
entry->p_offset % entry->p_align, |
seg_addr % entry->p_align |
entry->p_vaddr % entry->p_align |
); |
return EE_INVALID; |
} |
369,8 → 369,8 |
base = ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE); |
mem_sz = entry->p_memsz + (entry->p_vaddr - base); |
DPRINTF("Map to seg_addr=0x%x-0x%x.\n", seg_addr, |
entry->p_vaddr + bias + ALIGN_UP(entry->p_memsz, PAGE_SIZE)); |
// printf("map to p_vaddr=0x%x-0x%x...\n", entry->p_vaddr + bias, |
// entry->p_vaddr + bias + ALIGN_UP(entry->p_memsz, PAGE_SIZE)); |
/* |
* For the course of loading, the area needs to be readable |
379,16 → 379,17 |
a = as_area_create((uint8_t *)base + bias, mem_sz, |
AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); |
if (a == (void *)(-1)) { |
DPRINTF("Memory mapping failed.\n"); |
printf("memory mapping failed\n"); |
return EE_MEMORY; |
} |
DPRINTF("as_area_create(0x%lx, 0x%x, %d) -> 0x%lx\n", |
base + bias, mem_sz, flags, (uintptr_t)a); |
// printf("as_area_create(0x%lx, 0x%x, %d) -> 0x%lx\n", |
// entry->p_vaddr+bias, entry->p_memsz, flags, (uintptr_t)a); |
/* |
* Load segment data |
*/ |
// printf("seek to %d\n", entry->p_offset); |
rc = lseek(elf->fd, entry->p_offset, SEEK_SET); |
if (rc < 0) { |
printf("seek error\n"); |
395,25 → 396,28 |
return EE_INVALID; |
} |
// printf("read 0x%x bytes to address 0x%x\n", entry->p_filesz, entry->p_vaddr+bias); |
/* rc = read(fd, (void *)(entry->p_vaddr + bias), entry->p_filesz); |
if (rc < 0) { printf("read error\n"); return EE_INVALID; }*/ |
/* Long reads are not possible yet. Load segment piecewise. */ |
/* Long reads are not possible yet. Load segment picewise */ |
unsigned left, now; |
uint8_t *dp; |
left = entry->p_filesz; |
dp = seg_ptr; |
dp = (uint8_t *)(entry->p_vaddr + bias); |
while (left > 0) { |
now = 16384; |
if (now > left) now = left; |
// printf("read %d...", now); |
rc = my_read(elf->fd, dp, now); |
// printf("->%d\n", rc); |
if (rc < 0) { |
DPRINTF("Read error.\n"); |
printf("read error\n"); |
return EE_INVALID; |
} |
421,15 → 425,16 |
dp += now; |
} |
rc = as_area_change_flags(seg_ptr, flags); |
// printf("set area flags to %d\n", flags); |
rc = as_area_change_flags((uint8_t *)entry->p_vaddr + bias, flags); |
if (rc != 0) { |
DPRINTF("Failed to set memory area flags.\n"); |
printf("failed to set memory area flags\n"); |
return EE_MEMORY; |
} |
if (flags & AS_AREA_EXEC) { |
/* Enforce SMC coherence for the segment */ |
if (smc_coherence(seg_ptr, entry->p_filesz)) |
if (smc_coherence(entry->p_vaddr + bias, entry->p_filesz)) |
return EE_MEMORY; |
} |
460,7 → 465,7 |
/* Record pointer to dynamic section into info structure */ |
elf->info->dynamic = |
(void *)((uint8_t *)entry->sh_addr + elf->bias); |
DPRINTF("Dynamic section found at 0x%x.\n", |
printf("dynamic section found at 0x%x\n", |
(uintptr_t)elf->info->dynamic); |
break; |
default: |
/branches/arm/uspace/srv/loader/Makefile |
---|
27,19 → 27,30 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
include ../../../version |
include ../../Makefile.config |
## Setup toolchain |
# |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
include arch/$(UARCH)/Makefile.inc |
include arch/$(ARCH)/Makefile.inc |
CFLAGS += -Iinclude |
LIBS = $(LIBC_PREFIX)/libc.a $(SOFTINT_PREFIX)/libsoftint.a |
DEFS += -DRELEASE=\"$(RELEASE)\" |
ifdef REVISION |
DEFS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
DEFS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
## Sources |
# |
59,18 → 70,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm arch/$(UARCH)/_link.ld Makefile.depend |
-rm -f $(OUTPUT) $(OBJECTS) $(OUTPUT).map $(OUTPUT).disasm arch/$(ARCH)/_link.ld Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) arch/$(UARCH)/_link.ld |
$(LD) -T arch/$(UARCH)/_link.ld $(LFLAGS) $(OBJECTS) $(LIBS) -o $@ -Map $(OUTPUT).map |
$(OUTPUT): $(OBJECTS) $(LIBS) arch/$(ARCH)/_link.ld |
$(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(OBJECTS) $(LIBS) -o $@ -Map $(OUTPUT).map |
disasm: |
$(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
arch/$(UARCH)/_link.ld: arch/$(UARCH)/_link.ld.in |
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
$(CC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@ |
%.o: %.S |
/branches/arm/uspace/srv/loader/arch/mips32eb |
---|
File deleted |
\ No newline at end of file |
Property changes: |
Deleted: svn:special |
-* |
\ No newline at end of property |
/branches/arm/uspace/srv/loader/arch/sparc64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/arm/uspace/srv/loader/arch/sparc64/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__64_BITS__ |
ARCH_SOURCES := arch/$(UARCH)/sparc64.s |
ARCH_SOURCES := arch/$(ARCH)/sparc64.s |
/branches/arm/uspace/srv/loader/arch/ia64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
12,10 → 12,15 |
*(.interp); |
} :interp |
/* On Itanium code sections must be aligned to 16 bytes. */ |
. = ALIGN(0x800000000 + SIZEOF_HEADERS, 16); |
. = 0x00084000 + SIZEOF_HEADERS; |
.init : { |
LONG(0); |
LONG(0); |
LONG(0); |
LONG(0); |
LONG(0); |
LONG(0); |
*(.init); |
} : text |
.text : { |
/branches/arm/uspace/srv/loader/arch/ia64/Makefile.inc |
---|
27,5 → 27,5 |
# |
CFLAGS += -D__64_BITS__ |
ARCH_SOURCES := arch/$(UARCH)/ia64.s |
ARCH_SOURCES := arch/$(ARCH)/ia64.s |
AFLAGS += -xexplicit |
/branches/arm/uspace/srv/loader/arch/arm32/_link.ld.in |
---|
1,8 → 1,8 |
/* |
/* |
* The only difference from _link.ld.in for regular statically-linked apps |
* is the base address. |
*/ |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/arm/uspace/srv/loader/arch/arm32/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__32_BITS__ |
ARCH_SOURCES := arch/$(UARCH)/arm32.s |
ARCH_SOURCES := arch/$(ARCH)/arm32.s |
/branches/arm/uspace/srv/loader/arch/ppc32/_link.ld.in |
---|
1,8 → 1,8 |
/* |
/* |
* The only difference from _link.ld.in for regular statically-linked apps |
* is the base address. |
*/ |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/arm/uspace/srv/loader/arch/ppc32/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__32_BITS__ |
ARCH_SOURCES := arch/$(UARCH)/ppc32.s |
ARCH_SOURCES := arch/$(ARCH)/ppc32.s |
/branches/arm/uspace/srv/loader/arch/ppc32/ppc32.s |
---|
36,5 → 36,5 |
# Jump to a program entry point |
program_run: |
mtctr %r3 |
mr %r6, %r4 # Pass pcb to the entry point in %r6 |
mr %r3, %r4 # Pass pcb to the entry point in %r3 |
bctr |
/branches/arm/uspace/srv/loader/arch/amd64/_link.ld.in |
---|
1,4 → 1,4 |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/arm/uspace/srv/loader/arch/amd64/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__64_BITS__ |
ARCH_SOURCES := arch/$(UARCH)/amd64.s |
ARCH_SOURCES := arch/$(ARCH)/amd64.s |
/branches/arm/uspace/srv/loader/arch/mips32/_link.ld.in |
---|
1,8 → 1,8 |
/* |
/* |
* The only difference from _link.ld.in for regular statically-linked apps |
* is the base address. |
*/ |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/arm/uspace/srv/loader/arch/mips32/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__32_BITS__ |
ARCH_SOURCES := arch/$(UARCH)/mips32.s |
ARCH_SOURCES := arch/$(ARCH)/mips32.s |
/branches/arm/uspace/srv/loader/arch/ia32/_link.ld.in |
---|
1,8 → 1,8 |
/* |
/* |
* The difference from _link.ld.in for regular statically-linked apps |
* is the base address and the special interp section. |
*/ |
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o) |
STARTUP(LIBC_PREFIX/arch/ARCH/src/entry.o) |
ENTRY(__entry) |
PHDRS { |
/branches/arm/uspace/srv/loader/arch/ia32/ia32.s |
---|
46,4 → 46,4 |
# Save a tiny bit of stack space |
pop %ebp |
jmp *%eax |
jmp %eax |
/branches/arm/uspace/srv/loader/arch/ia32/Makefile.inc |
---|
27,4 → 27,4 |
# |
CFLAGS += -D__32_BITS__ |
ARCH_SOURCES := arch/$(UARCH)/ia32.s |
ARCH_SOURCES := arch/$(ARCH)/ia32.s |
/branches/arm/uspace/srv/fs/devfs/devfs.c |
---|
File deleted |
/branches/arm/uspace/srv/fs/devfs/devfs_ops.c |
---|
File deleted |
/branches/arm/uspace/srv/fs/devfs/devfs.h |
---|
File deleted |
/branches/arm/uspace/srv/fs/devfs/Makefile |
---|
File deleted |
/branches/arm/uspace/srv/fs/devfs/devfs_ops.h |
---|
File deleted |
/branches/arm/uspace/srv/fs/tmpfs/tmpfs_ops.c |
---|
47,7 → 47,7 |
#include <stdio.h> |
#include <assert.h> |
#include <sys/types.h> |
#include <adt/hash_table.h> |
#include <libadt/hash_table.h> |
#include <as.h> |
#include <libfs.h> |
54,50 → 54,53 |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
#define max(a, b) ((a) > (b) ? (a) : (b)) |
#define NODES_BUCKETS 256 |
#define DENTRIES_BUCKETS 256 |
/** All root nodes have index 0. */ |
#define TMPFS_SOME_ROOT 0 |
/** Global counter for assigning node indices. Shared by all instances. */ |
fs_index_t tmpfs_next_index = 1; |
#define NAMES_BUCKETS 4 |
/* |
* For now, we don't distinguish between different dev_handles/instances. All |
* requests resolve to the only instance, rooted in the following variable. |
*/ |
static tmpfs_dentry_t *root; |
/* |
* Implementation of the libfs interface. |
*/ |
/* Forward declarations of static functions. */ |
static fs_node_t *tmpfs_match(fs_node_t *, const char *); |
static fs_node_t *tmpfs_node_get(dev_handle_t, fs_index_t); |
static void tmpfs_node_put(fs_node_t *); |
static fs_node_t *tmpfs_create_node(dev_handle_t, int); |
static int tmpfs_link_node(fs_node_t *, fs_node_t *, const char *); |
static int tmpfs_unlink_node(fs_node_t *, fs_node_t *, const char *); |
static int tmpfs_destroy_node(fs_node_t *); |
static void *tmpfs_match(void *, const char *); |
static void *tmpfs_node_get(dev_handle_t, fs_index_t); |
static void tmpfs_node_put(void *); |
static void *tmpfs_create_node(int); |
static bool tmpfs_link_node(void *, void *, const char *); |
static int tmpfs_unlink_node(void *, void *); |
static int tmpfs_destroy_node(void *); |
/* Implementation of helper functions. */ |
static fs_index_t tmpfs_index_get(fs_node_t *fn) |
static fs_index_t tmpfs_index_get(void *nodep) |
{ |
return TMPFS_NODE(fn)->index; |
return ((tmpfs_dentry_t *) nodep)->index; |
} |
static size_t tmpfs_size_get(fs_node_t *fn) |
static size_t tmpfs_size_get(void *nodep) |
{ |
return TMPFS_NODE(fn)->size; |
return ((tmpfs_dentry_t *) nodep)->size; |
} |
static unsigned tmpfs_lnkcnt_get(fs_node_t *fn) |
static unsigned tmpfs_lnkcnt_get(void *nodep) |
{ |
return TMPFS_NODE(fn)->lnkcnt; |
return ((tmpfs_dentry_t *) nodep)->lnkcnt; |
} |
static bool tmpfs_has_children(fs_node_t *fn) |
static bool tmpfs_has_children(void *nodep) |
{ |
return !list_empty(&TMPFS_NODE(fn)->cs_head); |
return ((tmpfs_dentry_t *) nodep)->child != NULL; |
} |
static fs_node_t *tmpfs_root_get(dev_handle_t dev_handle) |
static void *tmpfs_root_get(dev_handle_t dev_handle) |
{ |
return tmpfs_node_get(dev_handle, TMPFS_SOME_ROOT); |
return root; |
} |
static char tmpfs_plb_get_char(unsigned pos) |
105,14 → 108,14 |
return tmpfs_reg.plb_ro[pos % PLB_SIZE]; |
} |
static bool tmpfs_is_directory(fs_node_t *fn) |
static bool tmpfs_is_directory(void *nodep) |
{ |
return TMPFS_NODE(fn)->type == TMPFS_DIRECTORY; |
return ((tmpfs_dentry_t *) nodep)->type == TMPFS_DIRECTORY; |
} |
static bool tmpfs_is_file(fs_node_t *fn) |
static bool tmpfs_is_file(void *nodep) |
{ |
return TMPFS_NODE(fn)->type == TMPFS_FILE; |
return ((tmpfs_dentry_t *) nodep)->type == TMPFS_FILE; |
} |
/** libfs operations */ |
134,231 → 137,259 |
.is_file = tmpfs_is_file |
}; |
/** Hash table of all TMPFS nodes. */ |
hash_table_t nodes; |
/** Hash table of all directory entries. */ |
hash_table_t dentries; |
#define NODES_KEY_INDEX 0 |
#define NODES_KEY_DEV 1 |
/* Implementation of hash table interface for the dentries hash table. */ |
static hash_index_t dentries_hash(unsigned long *key) |
{ |
return *key % DENTRIES_BUCKETS; |
} |
/* Implementation of hash table interface for the nodes hash table. */ |
static hash_index_t nodes_hash(unsigned long key[]) |
static int dentries_compare(unsigned long *key, hash_count_t keys, |
link_t *item) |
{ |
return key[NODES_KEY_INDEX] % NODES_BUCKETS; |
tmpfs_dentry_t *dentry = hash_table_get_instance(item, tmpfs_dentry_t, |
dh_link); |
return dentry->index == *key; |
} |
static int nodes_compare(unsigned long key[], hash_count_t keys, link_t *item) |
static void dentries_remove_callback(link_t *item) |
{ |
tmpfs_node_t *nodep = hash_table_get_instance(item, tmpfs_node_t, |
nh_link); |
return (nodep->index == key[NODES_KEY_INDEX] && |
nodep->dev_handle == key[NODES_KEY_DEV]); |
} |
static void nodes_remove_callback(link_t *item) |
/** TMPFS dentries hash table operations. */ |
hash_table_operations_t dentries_ops = { |
.hash = dentries_hash, |
.compare = dentries_compare, |
.remove_callback = dentries_remove_callback |
}; |
fs_index_t tmpfs_next_index = 1; |
typedef struct { |
char *name; |
tmpfs_dentry_t *parent; |
link_t link; |
} tmpfs_name_t; |
/* Implementation of hash table interface for the names hash table. */ |
static hash_index_t names_hash(unsigned long *key) |
{ |
tmpfs_dentry_t *dentry = (tmpfs_dentry_t *) *key; |
return dentry->index % NAMES_BUCKETS; |
} |
/** TMPFS nodes hash table operations. */ |
hash_table_operations_t nodes_ops = { |
.hash = nodes_hash, |
.compare = nodes_compare, |
.remove_callback = nodes_remove_callback |
static int names_compare(unsigned long *key, hash_count_t keys, link_t *item) |
{ |
tmpfs_dentry_t *dentry = (tmpfs_dentry_t *) *key; |
tmpfs_name_t *namep = hash_table_get_instance(item, tmpfs_name_t, |
link); |
return dentry == namep->parent; |
} |
static void names_remove_callback(link_t *item) |
{ |
tmpfs_name_t *namep = hash_table_get_instance(item, tmpfs_name_t, |
link); |
free(namep->name); |
free(namep); |
} |
/** TMPFS node names hash table operations. */ |
static hash_table_operations_t names_ops = { |
.hash = names_hash, |
.compare = names_compare, |
.remove_callback = names_remove_callback |
}; |
static void tmpfs_node_initialize(tmpfs_node_t *nodep) |
static void tmpfs_name_initialize(tmpfs_name_t *namep) |
{ |
nodep->bp = NULL; |
nodep->index = 0; |
nodep->dev_handle = 0; |
nodep->type = TMPFS_NONE; |
nodep->lnkcnt = 0; |
nodep->size = 0; |
nodep->data = NULL; |
link_initialize(&nodep->nh_link); |
list_initialize(&nodep->cs_head); |
namep->name = NULL; |
namep->parent = NULL; |
link_initialize(&namep->link); |
} |
static void tmpfs_dentry_initialize(tmpfs_dentry_t *dentryp) |
static bool tmpfs_dentry_initialize(tmpfs_dentry_t *dentry) |
{ |
link_initialize(&dentryp->link); |
dentryp->name = NULL; |
dentryp->node = NULL; |
dentry->index = 0; |
dentry->sibling = NULL; |
dentry->child = NULL; |
dentry->type = TMPFS_NONE; |
dentry->lnkcnt = 0; |
dentry->size = 0; |
dentry->data = NULL; |
link_initialize(&dentry->dh_link); |
return (bool)hash_table_create(&dentry->names, NAMES_BUCKETS, 1, |
&names_ops); |
} |
bool tmpfs_init(void) |
static bool tmpfs_init(void) |
{ |
if (!hash_table_create(&nodes, NODES_BUCKETS, 2, &nodes_ops)) |
if (!hash_table_create(&dentries, DENTRIES_BUCKETS, 1, &dentries_ops)) |
return false; |
root = (tmpfs_dentry_t *) tmpfs_create_node(L_DIRECTORY); |
if (!root) { |
hash_table_destroy(&dentries); |
return false; |
} |
root->lnkcnt = 0; /* FS root is not linked */ |
return true; |
} |
static bool tmpfs_instance_init(dev_handle_t dev_handle) |
/** Compare one component of path to a directory entry. |
* |
* @param parentp Pointer to node from which we descended. |
* @param childp Pointer to node to compare the path component with. |
* @param component Array of characters holding component name. |
* |
* @return True on match, false otherwise. |
*/ |
static bool |
tmpfs_match_one(tmpfs_dentry_t *parentp, tmpfs_dentry_t *childp, |
const char *component) |
{ |
fs_node_t *rfn; |
rfn = tmpfs_create_node(dev_handle, L_DIRECTORY); |
if (!rfn) |
return false; |
TMPFS_NODE(rfn)->lnkcnt = 0; /* FS root is not linked */ |
return true; |
unsigned long key = (unsigned long) parentp; |
link_t *hlp = hash_table_find(&childp->names, &key); |
assert(hlp); |
tmpfs_name_t *namep = hash_table_get_instance(hlp, tmpfs_name_t, link); |
return !strcmp(namep->name, component); |
} |
fs_node_t *tmpfs_match(fs_node_t *pfn, const char *component) |
void *tmpfs_match(void *prnt, const char *component) |
{ |
tmpfs_node_t *parentp = TMPFS_NODE(pfn); |
link_t *lnk; |
tmpfs_dentry_t *parentp = (tmpfs_dentry_t *) prnt; |
tmpfs_dentry_t *childp = parentp->child; |
for (lnk = parentp->cs_head.next; lnk != &parentp->cs_head; |
lnk = lnk->next) { |
tmpfs_dentry_t *dentryp = list_get_instance(lnk, tmpfs_dentry_t, |
link); |
if (!str_cmp(dentryp->name, component)) |
return FS_NODE(dentryp->node); |
} |
while (childp && !tmpfs_match_one(parentp, childp, component)) |
childp = childp->sibling; |
return NULL; |
return (void *) childp; |
} |
fs_node_t *tmpfs_node_get(dev_handle_t dev_handle, fs_index_t index) |
void * |
tmpfs_node_get(dev_handle_t dev_handle, fs_index_t index) |
{ |
unsigned long key[] = { |
[NODES_KEY_INDEX] = index, |
[NODES_KEY_DEV] = dev_handle |
}; |
link_t *lnk = hash_table_find(&nodes, key); |
unsigned long key = index; |
link_t *lnk = hash_table_find(&dentries, &key); |
if (!lnk) |
return NULL; |
return FS_NODE(hash_table_get_instance(lnk, tmpfs_node_t, nh_link)); |
return hash_table_get_instance(lnk, tmpfs_dentry_t, dh_link); |
} |
void tmpfs_node_put(fs_node_t *fn) |
void tmpfs_node_put(void *node) |
{ |
/* nothing to do */ |
} |
fs_node_t *tmpfs_create_node(dev_handle_t dev_handle, int lflag) |
void *tmpfs_create_node(int lflag) |
{ |
assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY)); |
tmpfs_node_t *nodep = malloc(sizeof(tmpfs_node_t)); |
if (!nodep) |
tmpfs_dentry_t *node = malloc(sizeof(tmpfs_dentry_t)); |
if (!node) |
return NULL; |
tmpfs_node_initialize(nodep); |
nodep->bp = malloc(sizeof(fs_node_t)); |
if (!nodep->bp) { |
free(nodep); |
if (!tmpfs_dentry_initialize(node)) { |
free(node); |
return NULL; |
} |
fs_node_initialize(nodep->bp); |
nodep->bp->data = nodep; /* link the FS and TMPFS nodes */ |
if (!tmpfs_root_get(dev_handle)) |
nodep->index = TMPFS_SOME_ROOT; |
else |
nodep->index = tmpfs_next_index++; |
nodep->dev_handle = dev_handle; |
node->index = tmpfs_next_index++; |
if (lflag & L_DIRECTORY) |
nodep->type = TMPFS_DIRECTORY; |
node->type = TMPFS_DIRECTORY; |
else |
nodep->type = TMPFS_FILE; |
node->type = TMPFS_FILE; |
/* Insert the new node into the nodes hash table. */ |
unsigned long key[] = { |
[NODES_KEY_INDEX] = nodep->index, |
[NODES_KEY_DEV] = nodep->dev_handle |
}; |
hash_table_insert(&nodes, key, &nodep->nh_link); |
return FS_NODE(nodep); |
/* Insert the new node into the dentry hash table. */ |
unsigned long key = node->index; |
hash_table_insert(&dentries, &key, &node->dh_link); |
return (void *) node; |
} |
int tmpfs_link_node(fs_node_t *pfn, fs_node_t *cfn, const char *nm) |
bool tmpfs_link_node(void *prnt, void *chld, const char *nm) |
{ |
tmpfs_node_t *parentp = TMPFS_NODE(pfn); |
tmpfs_node_t *childp = TMPFS_NODE(cfn); |
tmpfs_dentry_t *dentryp; |
link_t *lnk; |
tmpfs_dentry_t *parentp = (tmpfs_dentry_t *) prnt; |
tmpfs_dentry_t *childp = (tmpfs_dentry_t *) chld; |
assert(parentp->type == TMPFS_DIRECTORY); |
/* Check for duplicit entries. */ |
for (lnk = parentp->cs_head.next; lnk != &parentp->cs_head; |
lnk = lnk->next) { |
dentryp = list_get_instance(lnk, tmpfs_dentry_t, link); |
if (!str_cmp(dentryp->name, nm)) |
return EEXIST; |
tmpfs_name_t *namep = malloc(sizeof(tmpfs_name_t)); |
if (!namep) |
return false; |
tmpfs_name_initialize(namep); |
size_t len = strlen(nm); |
namep->name = malloc(len + 1); |
if (!namep->name) { |
free(namep); |
return false; |
} |
strcpy(namep->name, nm); |
namep->parent = parentp; |
childp->lnkcnt++; |
/* Allocate and initialize the dentry. */ |
dentryp = malloc(sizeof(tmpfs_dentry_t)); |
if (!dentryp) |
return ENOMEM; |
tmpfs_dentry_initialize(dentryp); |
unsigned long key = (unsigned long) parentp; |
hash_table_insert(&childp->names, &key, &namep->link); |
/* Populate and link the new dentry. */ |
size_t size = str_size(nm); |
dentryp->name = malloc(size + 1); |
if (!dentryp->name) { |
free(dentryp); |
return ENOMEM; |
/* Insert the new node into the namespace. */ |
if (parentp->child) { |
tmpfs_dentry_t *tmp = parentp->child; |
while (tmp->sibling) |
tmp = tmp->sibling; |
tmp->sibling = childp; |
} else { |
parentp->child = childp; |
} |
str_cpy(dentryp->name, size + 1, nm); |
dentryp->node = childp; |
childp->lnkcnt++; |
list_append(&dentryp->link, &parentp->cs_head); |
return EOK; |
return true; |
} |
int tmpfs_unlink_node(fs_node_t *pfn, fs_node_t *cfn, const char *nm) |
int tmpfs_unlink_node(void *prnt, void *chld) |
{ |
tmpfs_node_t *parentp = TMPFS_NODE(pfn); |
tmpfs_node_t *childp = NULL; |
tmpfs_dentry_t *dentryp; |
link_t *lnk; |
tmpfs_dentry_t *parentp = (tmpfs_dentry_t *)prnt; |
tmpfs_dentry_t *childp = (tmpfs_dentry_t *)chld; |
if (!parentp) |
return EBUSY; |
for (lnk = parentp->cs_head.next; lnk != &parentp->cs_head; |
lnk = lnk->next) { |
dentryp = list_get_instance(lnk, tmpfs_dentry_t, link); |
if (!str_cmp(dentryp->name, nm)) { |
childp = dentryp->node; |
assert(FS_NODE(childp) == cfn); |
break; |
} |
} |
if (!childp) |
return ENOENT; |
if ((childp->lnkcnt == 1) && !list_empty(&childp->cs_head)) |
if (childp->child) |
return ENOTEMPTY; |
list_remove(&dentryp->link); |
free(dentryp); |
if (parentp->child == childp) { |
parentp->child = childp->sibling; |
} else { |
/* TODO: consider doubly linked list for organizing siblings. */ |
tmpfs_dentry_t *tmp = parentp->child; |
while (tmp->sibling != childp) |
tmp = tmp->sibling; |
tmp->sibling = childp->sibling; |
} |
childp->sibling = NULL; |
unsigned long key = (unsigned long) parentp; |
hash_table_remove(&childp->names, &key, 1); |
childp->lnkcnt--; |
return EOK; |
} |
int tmpfs_destroy_node(fs_node_t *fn) |
int tmpfs_destroy_node(void *nodep) |
{ |
tmpfs_node_t *nodep = TMPFS_NODE(fn); |
tmpfs_dentry_t *dentry = (tmpfs_dentry_t *) nodep; |
assert(!nodep->lnkcnt); |
assert(list_empty(&nodep->cs_head)); |
assert(!dentry->lnkcnt); |
assert(!dentry->child); |
assert(!dentry->sibling); |
unsigned long key[] = { |
[NODES_KEY_INDEX] = nodep->index, |
[NODES_KEY_DEV] = nodep->dev_handle |
}; |
hash_table_remove(&nodes, key, 2); |
unsigned long key = dentry->index; |
hash_table_remove(&dentries, &key, 1); |
if (nodep->type == TMPFS_FILE) |
free(nodep->data); |
free(nodep->bp); |
free(nodep); |
hash_table_destroy(&dentry->names); |
if (dentry->type == TMPFS_FILE) |
free(dentry->data); |
free(dentry); |
return EOK; |
} |
366,50 → 397,31 |
{ |
dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
/* accept the mount options */ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_write_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
char *opts = malloc(size + 1); |
if (!opts) { |
ipc_answer_0(callid, ENOMEM); |
/* Initialize TMPFS. */ |
if (!root && !tmpfs_init()) { |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
ipcarg_t retval = ipc_data_write_finalize(callid, opts, size); |
if (retval != EOK) { |
ipc_answer_0(rid, retval); |
free(opts); |
return; |
} |
opts[size] = '\0'; |
/* Initialize TMPFS instance. */ |
if (!tmpfs_instance_init(dev_handle)) { |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
tmpfs_node_t *rootp = TMPFS_NODE(tmpfs_root_get(dev_handle)); |
if (str_cmp(opts, "restore") == 0) { |
if (dev_handle >= 0) { |
if (tmpfs_restore(dev_handle)) |
ipc_answer_3(rid, EOK, rootp->index, rootp->size, |
rootp->lnkcnt); |
ipc_answer_3(rid, EOK, root->index, root->size, |
root->lnkcnt); |
else |
ipc_answer_0(rid, ELIMIT); |
} else { |
ipc_answer_3(rid, EOK, rootp->index, rootp->size, |
rootp->lnkcnt); |
ipc_answer_3(rid, EOK, root->index, root->size, root->lnkcnt); |
} |
} |
void tmpfs_mount(ipc_callid_t rid, ipc_call_t *request) |
{ |
libfs_mount(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request); |
dev_handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
fs_index_t mp_index = (fs_index_t) IPC_GET_ARG2(*request); |
fs_handle_t mr_fs_handle = (fs_handle_t) IPC_GET_ARG3(*request); |
dev_handle_t mr_dev_handle = (dev_handle_t) IPC_GET_ARG4(*request); |
ipc_answer_0(rid, ENOTSUP); |
} |
void tmpfs_lookup(ipc_callid_t rid, ipc_call_t *request) |
424,27 → 436,24 |
off_t pos = (off_t)IPC_GET_ARG3(*request); |
/* |
* Lookup the respective TMPFS node. |
* Lookup the respective dentry. |
*/ |
link_t *hlp; |
unsigned long key[] = { |
[NODES_KEY_INDEX] = index, |
[NODES_KEY_DEV] = dev_handle, |
}; |
hlp = hash_table_find(&nodes, key); |
unsigned long key = index; |
hlp = hash_table_find(&dentries, &key); |
if (!hlp) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
tmpfs_node_t *nodep = hash_table_get_instance(hlp, tmpfs_node_t, |
nh_link); |
tmpfs_dentry_t *dentry = hash_table_get_instance(hlp, tmpfs_dentry_t, |
dh_link); |
/* |
* Receive the read request. |
*/ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_read_receive(&callid, &size)) { |
size_t len; |
if (!ipc_data_read_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
451,16 → 460,15 |
} |
size_t bytes; |
if (nodep->type == TMPFS_FILE) { |
bytes = max(0, min(nodep->size - pos, size)); |
(void) ipc_data_read_finalize(callid, nodep->data + pos, |
if (dentry->type == TMPFS_FILE) { |
bytes = max(0, min(dentry->size - pos, len)); |
(void) ipc_data_read_finalize(callid, dentry->data + pos, |
bytes); |
} else { |
tmpfs_dentry_t *dentryp; |
link_t *lnk; |
int i; |
tmpfs_dentry_t *cur; |
assert(nodep->type == TMPFS_DIRECTORY); |
assert(dentry->type == TMPFS_DIRECTORY); |
/* |
* Yes, we really use O(n) algorithm here. |
467,21 → 475,24 |
* If it bothers someone, it could be fixed by introducing a |
* hash table. |
*/ |
for (i = 0, lnk = nodep->cs_head.next; |
i < pos && lnk != &nodep->cs_head; |
i++, lnk = lnk->next) |
for (i = 0, cur = dentry->child; i < pos && cur; i++, |
cur = cur->sibling) |
; |
if (lnk == &nodep->cs_head) { |
if (!cur) { |
ipc_answer_0(callid, ENOENT); |
ipc_answer_1(rid, ENOENT, 0); |
return; |
} |
dentryp = list_get_instance(lnk, tmpfs_dentry_t, link); |
unsigned long key = (unsigned long) dentry; |
link_t *hlp = hash_table_find(&cur->names, &key); |
assert(hlp); |
tmpfs_name_t *namep = hash_table_get_instance(hlp, tmpfs_name_t, |
link); |
(void) ipc_data_read_finalize(callid, dentryp->name, |
str_size(dentryp->name) + 1); |
(void) ipc_data_read_finalize(callid, namep->name, |
strlen(namep->name) + 1); |
bytes = 1; |
} |
498,27 → 509,24 |
off_t pos = (off_t)IPC_GET_ARG3(*request); |
/* |
* Lookup the respective TMPFS node. |
* Lookup the respective dentry. |
*/ |
link_t *hlp; |
unsigned long key[] = { |
[NODES_KEY_INDEX] = index, |
[NODES_KEY_DEV] = dev_handle |
}; |
hlp = hash_table_find(&nodes, key); |
unsigned long key = index; |
hlp = hash_table_find(&dentries, &key); |
if (!hlp) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
tmpfs_node_t *nodep = hash_table_get_instance(hlp, tmpfs_node_t, |
nh_link); |
tmpfs_dentry_t *dentry = hash_table_get_instance(hlp, tmpfs_dentry_t, |
dh_link); |
/* |
* Receive the write request. |
*/ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_write_receive(&callid, &size)) { |
size_t len; |
if (!ipc_data_write_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
527,13 → 535,13 |
/* |
* Check whether the file needs to grow. |
*/ |
if (pos + size <= nodep->size) { |
if (pos + len <= dentry->size) { |
/* The file size is not changing. */ |
(void) ipc_data_write_finalize(callid, nodep->data + pos, size); |
ipc_answer_2(rid, EOK, size, nodep->size); |
(void) ipc_data_write_finalize(callid, dentry->data + pos, len); |
ipc_answer_2(rid, EOK, len, dentry->size); |
return; |
} |
size_t delta = (pos + size) - nodep->size; |
size_t delta = (pos + len) - dentry->size; |
/* |
* At this point, we are deliberately extremely straightforward and |
* simply realloc the contents of the file on every write that grows the |
541,18 → 549,18 |
* our heap allocator can save us and just grow the block whenever |
* possible. |
*/ |
void *newdata = realloc(nodep->data, nodep->size + delta); |
void *newdata = realloc(dentry->data, dentry->size + delta); |
if (!newdata) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_2(rid, EOK, 0, nodep->size); |
ipc_answer_2(rid, EOK, 0, dentry->size); |
return; |
} |
/* Clear any newly allocated memory in order to emulate gaps. */ |
memset(newdata + nodep->size, 0, delta); |
nodep->size += delta; |
nodep->data = newdata; |
(void) ipc_data_write_finalize(callid, nodep->data + pos, size); |
ipc_answer_2(rid, EOK, size, nodep->size); |
memset(newdata + dentry->size, 0, delta); |
dentry->size += delta; |
dentry->data = newdata; |
(void) ipc_data_write_finalize(callid, dentry->data + pos, len); |
ipc_answer_2(rid, EOK, len, dentry->size); |
} |
void tmpfs_truncate(ipc_callid_t rid, ipc_call_t *request) |
562,45 → 570,37 |
size_t size = (off_t)IPC_GET_ARG3(*request); |
/* |
* Lookup the respective TMPFS node. |
* Lookup the respective dentry. |
*/ |
link_t *hlp; |
unsigned long key[] = { |
[NODES_KEY_INDEX] = index, |
[NODES_KEY_DEV] = dev_handle |
}; |
hlp = hash_table_find(&nodes, key); |
unsigned long key = index; |
hlp = hash_table_find(&dentries, &key); |
if (!hlp) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
tmpfs_node_t *nodep = hash_table_get_instance(hlp, tmpfs_node_t, |
nh_link); |
tmpfs_dentry_t *dentry = hash_table_get_instance(hlp, tmpfs_dentry_t, |
dh_link); |
if (size == nodep->size) { |
if (size == dentry->size) { |
ipc_answer_0(rid, EOK); |
return; |
} |
void *newdata = realloc(nodep->data, size); |
void *newdata = realloc(dentry->data, size); |
if (!newdata) { |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
if (size > nodep->size) { |
size_t delta = size - nodep->size; |
memset(newdata + nodep->size, 0, delta); |
if (size > dentry->size) { |
size_t delta = size - dentry->size; |
memset(newdata + dentry->size, 0, delta); |
} |
nodep->size = size; |
nodep->data = newdata; |
dentry->size = size; |
dentry->data = newdata; |
ipc_answer_0(rid, EOK); |
} |
void tmpfs_close(ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_answer_0(rid, EOK); |
} |
void tmpfs_destroy(ipc_callid_t rid, ipc_call_t *request) |
{ |
dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request); |
608,37 → 608,18 |
int rc; |
link_t *hlp; |
unsigned long key[] = { |
[NODES_KEY_INDEX] = index, |
[NODES_KEY_DEV] = dev_handle |
}; |
hlp = hash_table_find(&nodes, key); |
unsigned long key = index; |
hlp = hash_table_find(&dentries, &key); |
if (!hlp) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
tmpfs_node_t *nodep = hash_table_get_instance(hlp, tmpfs_node_t, |
nh_link); |
rc = tmpfs_destroy_node(FS_NODE(nodep)); |
tmpfs_dentry_t *dentry = hash_table_get_instance(hlp, tmpfs_dentry_t, |
dh_link); |
rc = tmpfs_destroy_node(dentry); |
ipc_answer_0(rid, rc); |
} |
void tmpfs_open_node(ipc_callid_t rid, ipc_call_t *request) |
{ |
libfs_open_node(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request); |
} |
void tmpfs_stat(ipc_callid_t rid, ipc_call_t *request) |
{ |
libfs_stat(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request); |
} |
void tmpfs_sync(ipc_callid_t rid, ipc_call_t *request) |
{ |
/* Dummy implementation */ |
ipc_answer_0(rid, EOK); |
} |
/** |
* @} |
*/ |
*/ |
/branches/arm/uspace/srv/fs/tmpfs/tmpfs_dump.c |
---|
38,12 → 38,17 |
#include "tmpfs.h" |
#include "../../vfs/vfs.h" |
#include <ipc/ipc.h> |
#include <async.h> |
#include <errno.h> |
#include <stdlib.h> |
#include <string.h> |
#include <sys/types.h> |
#include <as.h> |
#include <libblock.h> |
#include <libfs.h> |
#include <ipc/services.h> |
#include <ipc/devmap.h> |
#include <sys/mman.h> |
#include <byteorder.h> |
#define TMPFS_BLOCK_SIZE 1024 |
54,21 → 59,19 |
} __attribute__((packed)); |
static bool |
tmpfs_restore_recursion(dev_handle_t dev, off_t *bufpos, size_t *buflen, |
off_t *pos, fs_node_t *pfn) |
tmpfs_restore_recursion(int phone, void *block, off_t *bufpos, size_t *buflen, |
off_t *pos, tmpfs_dentry_t *parent) |
{ |
struct rdentry entry; |
libfs_ops_t *ops = &tmpfs_libfs_ops; |
int rc; |
do { |
char *fname; |
fs_node_t *fn; |
tmpfs_node_t *nodep; |
tmpfs_dentry_t *node; |
uint32_t size; |
if (block_seqread(dev, bufpos, buflen, pos, &entry, |
sizeof(entry), TMPFS_BLOCK_SIZE) != EOK) |
if (!libfs_blockread(phone, block, bufpos, buflen, pos, &entry, |
sizeof(entry), TMPFS_BLOCK_SIZE)) |
return false; |
entry.len = uint32_t_le2host(entry.len); |
81,42 → 84,40 |
if (fname == NULL) |
return false; |
fn = ops->create(dev, L_FILE); |
if (fn == NULL) { |
node = (tmpfs_dentry_t *) ops->create(L_FILE); |
if (node == NULL) { |
free(fname); |
return false; |
} |
if (block_seqread(dev, bufpos, buflen, pos, fname, |
entry.len, TMPFS_BLOCK_SIZE) != EOK) { |
ops->destroy(fn); |
if (!libfs_blockread(phone, block, bufpos, buflen, pos, |
fname, entry.len, TMPFS_BLOCK_SIZE)) { |
ops->destroy((void *) node); |
free(fname); |
return false; |
} |
fname[entry.len] = 0; |
rc = ops->link(pfn, fn, fname); |
if (rc != EOK) { |
ops->destroy(fn); |
if (!ops->link((void *) parent, (void *) node, fname)) { |
ops->destroy((void *) node); |
free(fname); |
return false; |
} |
free(fname); |
if (block_seqread(dev, bufpos, buflen, pos, &size, |
sizeof(size), TMPFS_BLOCK_SIZE) != EOK) |
if (!libfs_blockread(phone, block, bufpos, buflen, pos, |
&size, sizeof(size), TMPFS_BLOCK_SIZE)) |
return false; |
size = uint32_t_le2host(size); |
nodep = TMPFS_NODE(fn); |
nodep->data = malloc(size); |
if (nodep->data == NULL) |
node->data = malloc(size); |
if (node->data == NULL) |
return false; |
nodep->size = size; |
if (block_seqread(dev, bufpos, buflen, pos, nodep->data, |
size, TMPFS_BLOCK_SIZE) != EOK) |
node->size = size; |
if (!libfs_blockread(phone, block, bufpos, buflen, pos, |
node->data, size, TMPFS_BLOCK_SIZE)) |
return false; |
break; |
125,30 → 126,29 |
if (fname == NULL) |
return false; |
fn = ops->create(dev, L_DIRECTORY); |
if (fn == NULL) { |
node = (tmpfs_dentry_t *) ops->create(L_DIRECTORY); |
if (node == NULL) { |
free(fname); |
return false; |
} |
if (block_seqread(dev, bufpos, buflen, pos, fname, |
entry.len, TMPFS_BLOCK_SIZE) != EOK) { |
ops->destroy(fn); |
if (!libfs_blockread(phone, block, bufpos, buflen, pos, |
fname, entry.len, TMPFS_BLOCK_SIZE)) { |
ops->destroy((void *) node); |
free(fname); |
return false; |
} |
fname[entry.len] = 0; |
rc = ops->link(pfn, fn, fname); |
if (rc != EOK) { |
ops->destroy(fn); |
if (!ops->link((void *) parent, (void *) node, fname)) { |
ops->destroy((void *) node); |
free(fname); |
return false; |
} |
free(fname); |
if (!tmpfs_restore_recursion(dev, bufpos, buflen, pos, |
fn)) |
if (!tmpfs_restore_recursion(phone, block, bufpos, |
buflen, pos, node)) |
return false; |
break; |
163,34 → 163,49 |
bool tmpfs_restore(dev_handle_t dev) |
{ |
libfs_ops_t *ops = &tmpfs_libfs_ops; |
int rc; |
rc = block_init(dev, TMPFS_BLOCK_SIZE); |
if (rc != EOK) |
return false; |
void *block = mmap(NULL, TMPFS_BLOCK_SIZE, |
PROTO_READ | PROTO_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); |
if (block == NULL) |
return false; |
int phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
DEVMAP_CONNECT_TO_DEVICE, dev); |
if (phone < 0) { |
munmap(block, TMPFS_BLOCK_SIZE); |
return false; |
} |
if (ipc_share_out_start(phone, block, AS_AREA_READ | AS_AREA_WRITE) != |
EOK) |
goto error; |
off_t bufpos = 0; |
size_t buflen = 0; |
off_t pos = 0; |
char tag[6]; |
if (block_seqread(dev, &bufpos, &buflen, &pos, tag, 5, |
TMPFS_BLOCK_SIZE) != EOK) |
if (!libfs_blockread(phone, block, &bufpos, &buflen, &pos, tag, 5, |
TMPFS_BLOCK_SIZE)) |
goto error; |
tag[5] = 0; |
if (str_cmp(tag, "TMPFS") != 0) |
if (strcmp(tag, "TMPFS") != 0) |
goto error; |
if (!tmpfs_restore_recursion(dev, &bufpos, &buflen, &pos, |
if (!tmpfs_restore_recursion(phone, block, &bufpos, &buflen, &pos, |
ops->root_get(dev))) |
goto error; |
block_fini(dev); |
ipc_hangup(phone); |
munmap(block, TMPFS_BLOCK_SIZE); |
return true; |
error: |
block_fini(dev); |
ipc_hangup(phone); |
munmap(block, TMPFS_BLOCK_SIZE); |
return false; |
} |
/branches/arm/uspace/srv/fs/tmpfs/tmpfs.h |
---|
38,15 → 38,12 |
#include <atomic.h> |
#include <sys/types.h> |
#include <bool.h> |
#include <adt/hash_table.h> |
#include <libadt/hash_table.h> |
#ifndef dprintf |
#define dprintf(...) printf(__VA_ARGS__) |
#endif |
#define TMPFS_NODE(node) ((node) ? (tmpfs_node_t *)(node)->data : NULL) |
#define FS_NODE(node) ((node) ? (node)->bp : NULL) |
typedef enum { |
TMPFS_NONE, |
TMPFS_FILE, |
53,33 → 50,22 |
TMPFS_DIRECTORY |
} tmpfs_dentry_type_t; |
/* forward declaration */ |
struct tmpfs_node; |
typedef struct tmpfs_dentry { |
link_t link; /**< Linkage for the list of siblings. */ |
struct tmpfs_node *node;/**< Back pointer to TMPFS node. */ |
char *name; /**< Name of dentry. */ |
} tmpfs_dentry_t; |
typedef struct tmpfs_node { |
fs_node_t *bp; /**< Back pointer to the FS node. */ |
fs_index_t index; /**< TMPFS node index. */ |
dev_handle_t dev_handle;/**< Device handle. */ |
link_t nh_link; /**< Nodes hash table link. */ |
link_t dh_link; /**< Dentries hash table link. */ |
struct tmpfs_dentry *sibling; |
struct tmpfs_dentry *child; |
hash_table_t names; /**< All names linking to this TMPFS node. */ |
tmpfs_dentry_type_t type; |
unsigned lnkcnt; /**< Link count. */ |
size_t size; /**< File size if type is TMPFS_FILE. */ |
void *data; /**< File content's if type is TMPFS_FILE. */ |
link_t cs_head; /**< Head of child's siblings list. */ |
} tmpfs_node_t; |
} tmpfs_dentry_t; |
extern fs_reg_t tmpfs_reg; |
extern libfs_ops_t tmpfs_libfs_ops; |
extern bool tmpfs_init(void); |
extern void tmpfs_mounted(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_mount(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_lookup(ipc_callid_t, ipc_call_t *); |
86,11 → 72,7 |
extern void tmpfs_read(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_write(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_truncate(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_stat(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_close(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_destroy(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_open_node(ipc_callid_t, ipc_call_t *); |
extern void tmpfs_sync(ipc_callid_t, ipc_call_t *); |
extern bool tmpfs_restore(dev_handle_t); |
/branches/arm/uspace/srv/fs/tmpfs/Makefile |
---|
31,17 → 31,12 |
LIBC_PREFIX = ../../../lib/libc |
LIBFS_PREFIX = ../../../lib/libfs |
LIBBLOCK_PREFIX = ../../../lib/libblock |
SOFTINT_PREFIX = ../../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -I $(LIBFS_PREFIX) -I $(LIBBLOCK_PREFIX) |
CFLAGS += -I $(LIBFS_PREFIX) |
LIBS = \ |
$(LIBFS_PREFIX)/libfs.a \ |
$(LIBBLOCK_PREFIX)/libblock.a \ |
$(LIBC_PREFIX)/libc.a |
LIBS = $(LIBC_PREFIX)/libc.a $(LIBFS_PREFIX)/libfs.a |
## Sources |
# |
61,18 → 56,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/srv/fs/tmpfs/tmpfs.c |
---|
55,6 → 55,16 |
vfs_info_t tmpfs_vfs_info = { |
.name = "tmpfs", |
.ops = { |
[IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_READ)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_WRITE)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_TRUNCATE)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_MOUNTED)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_NULL, |
[IPC_METHOD_TO_VFS_OP(VFS_DESTROY)] = VFS_OP_DEFINED, |
} |
}; |
fs_reg_t tmpfs_reg; |
96,41 → 106,27 |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
return; |
case VFS_OUT_MOUNTED: |
case VFS_MOUNTED: |
tmpfs_mounted(callid, &call); |
break; |
case VFS_OUT_MOUNT: |
case VFS_MOUNT: |
tmpfs_mount(callid, &call); |
break; |
case VFS_OUT_LOOKUP: |
case VFS_LOOKUP: |
tmpfs_lookup(callid, &call); |
break; |
case VFS_OUT_READ: |
case VFS_READ: |
tmpfs_read(callid, &call); |
break; |
case VFS_OUT_WRITE: |
case VFS_WRITE: |
tmpfs_write(callid, &call); |
break; |
case VFS_OUT_TRUNCATE: |
case VFS_TRUNCATE: |
tmpfs_truncate(callid, &call); |
break; |
case VFS_OUT_CLOSE: |
tmpfs_close(callid, &call); |
break; |
case VFS_OUT_DESTROY: |
case VFS_DESTROY: |
tmpfs_destroy(callid, &call); |
break; |
case VFS_OUT_OPEN_NODE: |
tmpfs_open_node(callid, &call); |
break; |
case VFS_OUT_STAT: |
tmpfs_stat(callid, &call); |
break; |
case VFS_OUT_SYNC: |
tmpfs_sync(callid, &call); |
break; |
default: |
ipc_answer_0(callid, ENOTSUP); |
break; |
140,26 → 136,24 |
int main(int argc, char **argv) |
{ |
int vfs_phone; |
printf(NAME ": HelenOS TMPFS file system server\n"); |
if (!tmpfs_init()) { |
printf(NAME ": failed to initialize TMPFS\n"); |
return -1; |
vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0); |
while (vfs_phone < EOK) { |
usleep(10000); |
vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0); |
} |
int vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0); |
if (vfs_phone < EOK) { |
printf(NAME ": Unable to connect to VFS\n"); |
return -1; |
} |
int rc = fs_register(vfs_phone, &tmpfs_reg, &tmpfs_vfs_info, |
int rc; |
rc = fs_register(vfs_phone, &tmpfs_reg, &tmpfs_vfs_info, |
tmpfs_connection); |
if (rc != EOK) { |
printf(NAME ": Failed to register file system (%d)\n", rc); |
return rc; |
} |
printf(NAME ": Accepting connections\n"); |
async_manager(); |
/* not reached */ |
/branches/arm/uspace/srv/fs/fat/fat_fat.c |
---|
File deleted |
/branches/arm/uspace/srv/fs/fat/fat_dentry.c |
---|
File deleted |
/branches/arm/uspace/srv/fs/fat/fat_dentry.h |
---|
File deleted |
/branches/arm/uspace/srv/fs/fat/fat_fat.h |
---|
File deleted |
/branches/arm/uspace/srv/fs/fat/fat_ops.c |
---|
36,11 → 36,8 |
*/ |
#include "fat.h" |
#include "fat_dentry.h" |
#include "fat_fat.h" |
#include "../../vfs/vfs.h" |
#include <libfs.h> |
#include <libblock.h> |
#include <ipc/ipc.h> |
#include <ipc/services.h> |
#include <ipc/devmap.h> |
48,26 → 45,234 |
#include <errno.h> |
#include <string.h> |
#include <byteorder.h> |
#include <adt/hash_table.h> |
#include <adt/list.h> |
#include <libadt/hash_table.h> |
#include <libadt/list.h> |
#include <assert.h> |
#include <fibril_sync.h> |
#include <futex.h> |
#include <sys/mman.h> |
#include <align.h> |
#define FAT_NODE(node) ((node) ? (fat_node_t *) (node)->data : NULL) |
#define FS_NODE(node) ((node) ? (node)->bp : NULL) |
#define BS_BLOCK 0 |
#define BS_SIZE 512 |
/** Mutex protecting the list of cached free FAT nodes. */ |
static FIBRIL_MUTEX_INITIALIZE(ffn_mutex); |
/** Futex protecting the list of cached free FAT nodes. */ |
static futex_t ffn_futex = FUTEX_INITIALIZER; |
/** List of cached free FAT nodes. */ |
static LIST_INITIALIZE(ffn_head); |
#define FAT_NAME_LEN 8 |
#define FAT_EXT_LEN 3 |
#define FAT_PAD ' ' |
#define FAT_DENTRY_UNUSED 0x00 |
#define FAT_DENTRY_E5_ESC 0x05 |
#define FAT_DENTRY_DOT 0x2e |
#define FAT_DENTRY_ERASED 0xe5 |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
static void dentry_name_canonify(fat_dentry_t *d, char *buf) |
{ |
int i; |
for (i = 0; i < FAT_NAME_LEN; i++) { |
if (d->name[i] == FAT_PAD) |
break; |
if (d->name[i] == FAT_DENTRY_E5_ESC) |
*buf++ = 0xe5; |
else |
*buf++ = d->name[i]; |
} |
if (d->ext[0] != FAT_PAD) |
*buf++ = '.'; |
for (i = 0; i < FAT_EXT_LEN; i++) { |
if (d->ext[i] == FAT_PAD) { |
*buf = '\0'; |
return; |
} |
if (d->ext[i] == FAT_DENTRY_E5_ESC) |
*buf++ = 0xe5; |
else |
*buf++ = d->ext[i]; |
} |
*buf = '\0'; |
} |
static int dev_phone = -1; /* FIXME */ |
static void *dev_buffer = NULL; /* FIXME */ |
/* TODO move somewhere else */ |
typedef struct { |
void *data; |
size_t size; |
} block_t; |
static block_t *block_get(dev_handle_t dev_handle, off_t offset, size_t bs) |
{ |
/* FIXME */ |
block_t *b; |
off_t bufpos = 0; |
size_t buflen = 0; |
off_t pos = offset * bs; |
assert(dev_phone != -1); |
assert(dev_buffer); |
b = malloc(sizeof(block_t)); |
if (!b) |
return NULL; |
b->data = malloc(bs); |
if (!b->data) { |
free(b); |
return NULL; |
} |
b->size = bs; |
if (!libfs_blockread(dev_phone, dev_buffer, &bufpos, &buflen, &pos, |
b->data, bs, bs)) { |
free(b->data); |
free(b); |
return NULL; |
} |
return b; |
} |
static void block_put(block_t *block) |
{ |
/* FIXME */ |
free(block->data); |
free(block); |
} |
#define FAT_BS(b) ((fat_bs_t *)((b)->data)) |
#define FAT_CLST_RES0 0x0000 |
#define FAT_CLST_RES1 0x0001 |
#define FAT_CLST_FIRST 0x0002 |
#define FAT_CLST_BAD 0xfff7 |
#define FAT_CLST_LAST1 0xfff8 |
#define FAT_CLST_LAST8 0xffff |
/* internally used to mark root directory's parent */ |
#define FAT_CLST_ROOTPAR FAT_CLST_RES0 |
/* internally used to mark root directory */ |
#define FAT_CLST_ROOT FAT_CLST_RES1 |
#define fat_block_get(np, off) \ |
_fat_block_get((np)->idx->dev_handle, (np)->firstc, (off)) |
static block_t * |
_fat_block_get(dev_handle_t dev_handle, fat_cluster_t firstc, off_t offset) |
{ |
block_t *bb; |
block_t *b; |
unsigned bps; |
unsigned spc; |
unsigned rscnt; /* block address of the first FAT */ |
unsigned fatcnt; |
unsigned rde; |
unsigned rds; /* root directory size */ |
unsigned sf; |
unsigned ssa; /* size of the system area */ |
unsigned clusters; |
fat_cluster_t clst = firstc; |
unsigned i; |
bb = block_get(dev_handle, BS_BLOCK, BS_SIZE); |
bps = uint16_t_le2host(FAT_BS(bb)->bps); |
spc = FAT_BS(bb)->spc; |
rscnt = uint16_t_le2host(FAT_BS(bb)->rscnt); |
fatcnt = FAT_BS(bb)->fatcnt; |
rde = uint16_t_le2host(FAT_BS(bb)->root_ent_max); |
sf = uint16_t_le2host(FAT_BS(bb)->sec_per_fat); |
block_put(bb); |
rds = (sizeof(fat_dentry_t) * rde) / bps; |
rds += ((sizeof(fat_dentry_t) * rde) % bps != 0); |
ssa = rscnt + fatcnt * sf + rds; |
if (firstc == FAT_CLST_ROOT) { |
/* root directory special case */ |
assert(offset < rds); |
b = block_get(dev_handle, rscnt + fatcnt * sf + offset, bps); |
return b; |
} |
clusters = offset / spc; |
for (i = 0; i < clusters; i++) { |
unsigned fsec; /* sector offset relative to FAT1 */ |
unsigned fidx; /* FAT1 entry index */ |
assert(clst >= FAT_CLST_FIRST && clst < FAT_CLST_BAD); |
fsec = (clst * sizeof(fat_cluster_t)) / bps; |
fidx = clst % (bps / sizeof(fat_cluster_t)); |
/* read FAT1 */ |
b = block_get(dev_handle, rscnt + fsec, bps); |
clst = uint16_t_le2host(((fat_cluster_t *)b->data)[fidx]); |
assert(clst != FAT_CLST_BAD); |
assert(clst < FAT_CLST_LAST1); |
block_put(b); |
} |
b = block_get(dev_handle, ssa + (clst - FAT_CLST_FIRST) * spc + |
offset % spc, bps); |
return b; |
} |
/** Return number of blocks allocated to a file. |
* |
* @param dev_handle Device handle of the device with the file. |
* @param firstc First cluster of the file. |
* |
* @return Number of blocks allocated to the file. |
*/ |
static uint16_t |
_fat_blcks_get(dev_handle_t dev_handle, fat_cluster_t firstc) |
{ |
block_t *bb; |
block_t *b; |
unsigned bps; |
unsigned spc; |
unsigned rscnt; /* block address of the first FAT */ |
unsigned clusters = 0; |
fat_cluster_t clst = firstc; |
bb = block_get(dev_handle, BS_BLOCK, BS_SIZE); |
bps = uint16_t_le2host(FAT_BS(bb)->bps); |
spc = FAT_BS(bb)->spc; |
rscnt = uint16_t_le2host(FAT_BS(bb)->rscnt); |
block_put(bb); |
if (firstc == FAT_CLST_RES0) { |
/* No space allocated to the file. */ |
return 0; |
} |
while (clst < FAT_CLST_LAST1) { |
unsigned fsec; /* sector offset relative to FAT1 */ |
unsigned fidx; /* FAT1 entry index */ |
assert(clst >= FAT_CLST_FIRST); |
fsec = (clst * sizeof(fat_cluster_t)) / bps; |
fidx = clst % (bps / sizeof(fat_cluster_t)); |
/* read FAT1 */ |
b = block_get(dev_handle, rscnt + fsec, bps); |
clst = uint16_t_le2host(((fat_cluster_t *)b->data)[fidx]); |
assert(clst != FAT_CLST_BAD); |
block_put(b); |
clusters++; |
} |
return clusters * spc; |
} |
static void fat_node_initialize(fat_node_t *node) |
{ |
fibril_mutex_initialize(&node->lock); |
node->bp = NULL; |
futex_initialize(&node->lock, 1); |
node->idx = NULL; |
node->type = 0; |
link_initialize(&node->ffn_link); |
77,83 → 282,52 |
node->dirty = false; |
} |
static void fat_node_sync(fat_node_t *node) |
static uint16_t fat_bps_get(dev_handle_t dev_handle) |
{ |
block_t *b; |
fat_bs_t *bs; |
fat_dentry_t *d; |
block_t *bb; |
uint16_t bps; |
unsigned dps; |
assert(node->dirty); |
bb = block_get(dev_handle, BS_BLOCK, BS_SIZE); |
assert(bb != NULL); |
bps = uint16_t_le2host(FAT_BS(bb)->bps); |
block_put(bb); |
bs = block_bb_get(node->idx->dev_handle); |
bps = uint16_t_le2host(bs->bps); |
dps = bps / sizeof(fat_dentry_t); |
/* Read the block that contains the dentry of interest. */ |
b = _fat_block_get(bs, node->idx->dev_handle, node->idx->pfc, |
(node->idx->pdi * sizeof(fat_dentry_t)) / bps, BLOCK_FLAGS_NONE); |
return bps; |
} |
d = ((fat_dentry_t *)b->data) + (node->idx->pdi % dps); |
typedef enum { |
FAT_DENTRY_SKIP, |
FAT_DENTRY_LAST, |
FAT_DENTRY_VALID |
} fat_dentry_clsf_t; |
d->firstc = host2uint16_t_le(node->firstc); |
if (node->type == FAT_FILE) { |
d->size = host2uint32_t_le(node->size); |
} else if (node->type == FAT_DIRECTORY) { |
d->attr = FAT_ATTR_SUBDIR; |
static fat_dentry_clsf_t fat_classify_dentry(fat_dentry_t *d) |
{ |
if (d->attr & FAT_ATTR_VOLLABEL) { |
/* volume label entry */ |
return FAT_DENTRY_SKIP; |
} |
/* TODO: update other fields? (e.g time fields) */ |
b->dirty = true; /* need to sync block */ |
block_put(b); |
if (d->name[0] == FAT_DENTRY_ERASED) { |
/* not-currently-used entry */ |
return FAT_DENTRY_SKIP; |
} |
if (d->name[0] == FAT_DENTRY_UNUSED) { |
/* never used entry */ |
return FAT_DENTRY_LAST; |
} |
if (d->name[0] == FAT_DENTRY_DOT) { |
/* |
* Most likely '.' or '..'. |
* It cannot occur in a regular file name. |
*/ |
return FAT_DENTRY_SKIP; |
} |
return FAT_DENTRY_VALID; |
} |
static fat_node_t *fat_node_get_new(void) |
static void fat_node_sync(fat_node_t *node) |
{ |
fs_node_t *fn; |
fat_node_t *nodep; |
fibril_mutex_lock(&ffn_mutex); |
if (!list_empty(&ffn_head)) { |
/* Try to use a cached free node structure. */ |
fat_idx_t *idxp_tmp; |
nodep = list_get_instance(ffn_head.next, fat_node_t, ffn_link); |
if (!fibril_mutex_trylock(&nodep->lock)) |
goto skip_cache; |
idxp_tmp = nodep->idx; |
if (!fibril_mutex_trylock(&idxp_tmp->lock)) { |
fibril_mutex_unlock(&nodep->lock); |
goto skip_cache; |
} |
list_remove(&nodep->ffn_link); |
fibril_mutex_unlock(&ffn_mutex); |
if (nodep->dirty) |
fat_node_sync(nodep); |
idxp_tmp->nodep = NULL; |
fibril_mutex_unlock(&nodep->lock); |
fibril_mutex_unlock(&idxp_tmp->lock); |
fn = FS_NODE(nodep); |
} else { |
skip_cache: |
/* Try to allocate a new node structure. */ |
fibril_mutex_unlock(&ffn_mutex); |
fn = (fs_node_t *)malloc(sizeof(fs_node_t)); |
if (!fn) |
return NULL; |
nodep = (fat_node_t *)malloc(sizeof(fat_node_t)); |
if (!nodep) { |
free(fn); |
return NULL; |
} |
} |
fat_node_initialize(nodep); |
fs_node_initialize(fn); |
fn->data = nodep; |
nodep->bp = fn; |
return nodep; |
/* TODO */ |
} |
/** Internal version of fat_node_get(). |
160,14 → 334,12 |
* |
* @param idxp Locked index structure. |
*/ |
static fat_node_t *fat_node_get_core(fat_idx_t *idxp) |
static void *fat_node_get_core(fat_idx_t *idxp) |
{ |
block_t *b; |
fat_bs_t *bs; |
fat_dentry_t *d; |
fat_node_t *nodep = NULL; |
unsigned bps; |
unsigned spc; |
unsigned dps; |
if (idxp->nodep) { |
175,10 → 347,10 |
* We are lucky. |
* The node is already instantiated in memory. |
*/ |
fibril_mutex_lock(&idxp->nodep->lock); |
futex_down(&idxp->nodep->lock); |
if (!idxp->nodep->refcnt++) |
list_remove(&idxp->nodep->ffn_link); |
fibril_mutex_unlock(&idxp->nodep->lock); |
futex_up(&idxp->nodep->lock); |
return idxp->nodep; |
} |
188,18 → 360,41 |
assert(idxp->pfc); |
nodep = fat_node_get_new(); |
if (!nodep) |
return NULL; |
futex_down(&ffn_futex); |
if (!list_empty(&ffn_head)) { |
/* Try to use a cached free node structure. */ |
fat_idx_t *idxp_tmp; |
nodep = list_get_instance(ffn_head.next, fat_node_t, ffn_link); |
if (futex_trydown(&nodep->lock) == ESYNCH_WOULD_BLOCK) |
goto skip_cache; |
idxp_tmp = nodep->idx; |
if (futex_trydown(&idxp_tmp->lock) == ESYNCH_WOULD_BLOCK) { |
futex_up(&nodep->lock); |
goto skip_cache; |
} |
list_remove(&nodep->ffn_link); |
futex_up(&ffn_futex); |
if (nodep->dirty) |
fat_node_sync(nodep); |
idxp_tmp->nodep = NULL; |
futex_up(&nodep->lock); |
futex_up(&idxp_tmp->lock); |
} else { |
skip_cache: |
/* Try to allocate a new node structure. */ |
futex_up(&ffn_futex); |
nodep = (fat_node_t *)malloc(sizeof(fat_node_t)); |
if (!nodep) |
return NULL; |
} |
fat_node_initialize(nodep); |
bs = block_bb_get(idxp->dev_handle); |
bps = uint16_t_le2host(bs->bps); |
spc = bs->spc; |
bps = fat_bps_get(idxp->dev_handle); |
dps = bps / sizeof(fat_dentry_t); |
/* Read the block that contains the dentry of interest. */ |
b = _fat_block_get(bs, idxp->dev_handle, idxp->pfc, |
(idxp->pdi * sizeof(fat_dentry_t)) / bps, BLOCK_FLAGS_NONE); |
b = _fat_block_get(idxp->dev_handle, idxp->pfc, |
(idxp->pdi * sizeof(fat_dentry_t)) / bps); |
assert(b); |
d = ((fat_dentry_t *)b->data) + (idxp->pdi % dps); |
215,7 → 410,7 |
* defined for the directory entry type. We must determine the |
* size of the directory by walking the FAT. |
*/ |
nodep->size = bps * spc * fat_clusters_get(bs, idxp->dev_handle, |
nodep->size = bps * _fat_blcks_get(idxp->dev_handle, |
uint16_t_le2host(d->firstc)); |
} else { |
nodep->type = FAT_FILE; |
234,33 → 429,10 |
return nodep; |
} |
/* |
* Forward declarations of FAT libfs operations. |
*/ |
static fs_node_t *fat_node_get(dev_handle_t, fs_index_t); |
static void fat_node_put(fs_node_t *); |
static fs_node_t *fat_create_node(dev_handle_t, int); |
static int fat_destroy_node(fs_node_t *); |
static int fat_link(fs_node_t *, fs_node_t *, const char *); |
static int fat_unlink(fs_node_t *, fs_node_t *, const char *); |
static fs_node_t *fat_match(fs_node_t *, const char *); |
static fs_index_t fat_index_get(fs_node_t *); |
static size_t fat_size_get(fs_node_t *); |
static unsigned fat_lnkcnt_get(fs_node_t *); |
static bool fat_has_children(fs_node_t *); |
static fs_node_t *fat_root_get(dev_handle_t); |
static char fat_plb_get_char(unsigned); |
static bool fat_is_directory(fs_node_t *); |
static bool fat_is_file(fs_node_t *node); |
/* |
* FAT libfs operations. |
*/ |
/** Instantiate a FAT in-core node. */ |
fs_node_t *fat_node_get(dev_handle_t dev_handle, fs_index_t index) |
static void *fat_node_get(dev_handle_t dev_handle, fs_index_t index) |
{ |
fat_node_t *nodep; |
void *node; |
fat_idx_t *idxp; |
idxp = fat_idx_get_by_index(dev_handle, index); |
267,333 → 439,47 |
if (!idxp) |
return NULL; |
/* idxp->lock held */ |
nodep = fat_node_get_core(idxp); |
fibril_mutex_unlock(&idxp->lock); |
return FS_NODE(nodep); |
node = fat_node_get_core(idxp); |
futex_up(&idxp->lock); |
return node; |
} |
void fat_node_put(fs_node_t *fn) |
static void fat_node_put(void *node) |
{ |
fat_node_t *nodep = FAT_NODE(fn); |
bool destroy = false; |
fat_node_t *nodep = (fat_node_t *)node; |
fibril_mutex_lock(&nodep->lock); |
futex_down(&nodep->lock); |
if (!--nodep->refcnt) { |
if (nodep->idx) { |
fibril_mutex_lock(&ffn_mutex); |
list_append(&nodep->ffn_link, &ffn_head); |
fibril_mutex_unlock(&ffn_mutex); |
} else { |
/* |
* The node does not have any index structure associated |
* with itself. This can only mean that we are releasing |
* the node after a failed attempt to allocate the index |
* structure for it. |
*/ |
destroy = true; |
} |
futex_down(&ffn_futex); |
list_append(&nodep->ffn_link, &ffn_head); |
futex_up(&ffn_futex); |
} |
fibril_mutex_unlock(&nodep->lock); |
if (destroy) { |
free(nodep->bp); |
free(nodep); |
} |
futex_up(&nodep->lock); |
} |
fs_node_t *fat_create_node(dev_handle_t dev_handle, int flags) |
static void *fat_create(int flags) |
{ |
fat_idx_t *idxp; |
fat_node_t *nodep; |
fat_bs_t *bs; |
fat_cluster_t mcl, lcl; |
uint16_t bps; |
int rc; |
bs = block_bb_get(dev_handle); |
bps = uint16_t_le2host(bs->bps); |
if (flags & L_DIRECTORY) { |
/* allocate a cluster */ |
rc = fat_alloc_clusters(bs, dev_handle, 1, &mcl, &lcl); |
if (rc != EOK) |
return NULL; |
} |
nodep = fat_node_get_new(); |
if (!nodep) { |
fat_free_clusters(bs, dev_handle, mcl); |
return NULL; |
} |
idxp = fat_idx_get_new(dev_handle); |
if (!idxp) { |
fat_free_clusters(bs, dev_handle, mcl); |
fat_node_put(FS_NODE(nodep)); |
return NULL; |
} |
/* idxp->lock held */ |
if (flags & L_DIRECTORY) { |
int i; |
block_t *b; |
/* |
* Populate the new cluster with unused dentries. |
*/ |
for (i = 0; i < bs->spc; i++) { |
b = _fat_block_get(bs, dev_handle, mcl, i, |
BLOCK_FLAGS_NOREAD); |
/* mark all dentries as never-used */ |
memset(b->data, 0, bps); |
b->dirty = false; |
block_put(b); |
} |
nodep->type = FAT_DIRECTORY; |
nodep->firstc = mcl; |
nodep->size = bps * bs->spc; |
} else { |
nodep->type = FAT_FILE; |
nodep->firstc = FAT_CLST_RES0; |
nodep->size = 0; |
} |
nodep->lnkcnt = 0; /* not linked anywhere */ |
nodep->refcnt = 1; |
nodep->dirty = true; |
nodep->idx = idxp; |
idxp->nodep = nodep; |
fibril_mutex_unlock(&idxp->lock); |
return FS_NODE(nodep); |
return NULL; /* not supported at the moment */ |
} |
int fat_destroy_node(fs_node_t *fn) |
static int fat_destroy(void *node) |
{ |
fat_node_t *nodep = FAT_NODE(fn); |
fat_bs_t *bs; |
/* |
* The node is not reachable from the file system. This means that the |
* link count should be zero and that the index structure cannot be |
* found in the position hash. Obviously, we don't need to lock the node |
* nor its index structure. |
*/ |
assert(nodep->lnkcnt == 0); |
/* |
* The node may not have any children. |
*/ |
assert(fat_has_children(fn) == false); |
bs = block_bb_get(nodep->idx->dev_handle); |
if (nodep->firstc != FAT_CLST_RES0) { |
assert(nodep->size); |
/* Free all clusters allocated to the node. */ |
fat_free_clusters(bs, nodep->idx->dev_handle, nodep->firstc); |
} |
fat_idx_destroy(nodep->idx); |
free(nodep->bp); |
free(nodep); |
return EOK; |
return ENOTSUP; /* not supported at the moment */ |
} |
int fat_link(fs_node_t *pfn, fs_node_t *cfn, const char *name) |
static bool fat_link(void *prnt, void *chld, const char *name) |
{ |
fat_node_t *parentp = FAT_NODE(pfn); |
fat_node_t *childp = FAT_NODE(cfn); |
fat_dentry_t *d; |
fat_bs_t *bs; |
block_t *b; |
int i, j; |
uint16_t bps; |
unsigned dps; |
unsigned blocks; |
fat_cluster_t mcl, lcl; |
int rc; |
fibril_mutex_lock(&childp->lock); |
if (childp->lnkcnt == 1) { |
/* |
* On FAT, we don't support multiple hard links. |
*/ |
fibril_mutex_unlock(&childp->lock); |
return EMLINK; |
} |
assert(childp->lnkcnt == 0); |
fibril_mutex_unlock(&childp->lock); |
if (!fat_dentry_name_verify(name)) { |
/* |
* Attempt to create unsupported name. |
*/ |
return ENOTSUP; |
} |
/* |
* Get us an unused parent node's dentry or grow the parent and allocate |
* a new one. |
*/ |
fibril_mutex_lock(&parentp->idx->lock); |
bs = block_bb_get(parentp->idx->dev_handle); |
bps = uint16_t_le2host(bs->bps); |
dps = bps / sizeof(fat_dentry_t); |
blocks = parentp->size / bps; |
for (i = 0; i < blocks; i++) { |
b = fat_block_get(bs, parentp, i, BLOCK_FLAGS_NONE); |
for (j = 0; j < dps; j++) { |
d = ((fat_dentry_t *)b->data) + j; |
switch (fat_classify_dentry(d)) { |
case FAT_DENTRY_SKIP: |
case FAT_DENTRY_VALID: |
/* skipping used and meta entries */ |
continue; |
case FAT_DENTRY_FREE: |
case FAT_DENTRY_LAST: |
/* found an empty slot */ |
goto hit; |
} |
} |
block_put(b); |
} |
j = 0; |
/* |
* We need to grow the parent in order to create a new unused dentry. |
*/ |
if (parentp->idx->pfc == FAT_CLST_ROOT) { |
/* Can't grow the root directory. */ |
fibril_mutex_unlock(&parentp->idx->lock); |
return ENOSPC; |
} |
rc = fat_alloc_clusters(bs, parentp->idx->dev_handle, 1, &mcl, &lcl); |
if (rc != EOK) { |
fibril_mutex_unlock(&parentp->idx->lock); |
return rc; |
} |
fat_append_clusters(bs, parentp, mcl); |
b = fat_block_get(bs, parentp, i, BLOCK_FLAGS_NOREAD); |
d = (fat_dentry_t *)b->data; |
/* |
* Clear all dentries in the block except for the first one (the first |
* dentry will be cleared in the next step). |
*/ |
memset(d + 1, 0, bps - sizeof(fat_dentry_t)); |
hit: |
/* |
* At this point we only establish the link between the parent and the |
* child. The dentry, except of the name and the extension, will remain |
* uninitialized until the corresponding node is synced. Thus the valid |
* dentry data is kept in the child node structure. |
*/ |
memset(d, 0, sizeof(fat_dentry_t)); |
fat_dentry_name_set(d, name); |
b->dirty = true; /* need to sync block */ |
block_put(b); |
fibril_mutex_unlock(&parentp->idx->lock); |
fibril_mutex_lock(&childp->idx->lock); |
/* |
* If possible, create the Sub-directory Identifier Entry and the |
* Sub-directory Parent Pointer Entry (i.e. "." and ".."). These entries |
* are not mandatory according to Standard ECMA-107 and HelenOS VFS does |
* not use them anyway, so this is rather a sign of our good will. |
*/ |
b = fat_block_get(bs, childp, 0, BLOCK_FLAGS_NONE); |
d = (fat_dentry_t *)b->data; |
if (fat_classify_dentry(d) == FAT_DENTRY_LAST || |
str_cmp(d->name, FAT_NAME_DOT) == 0) { |
memset(d, 0, sizeof(fat_dentry_t)); |
str_cpy(d->name, 8, FAT_NAME_DOT); |
str_cpy(d->ext, 3, FAT_EXT_PAD); |
d->attr = FAT_ATTR_SUBDIR; |
d->firstc = host2uint16_t_le(childp->firstc); |
/* TODO: initialize also the date/time members. */ |
} |
d++; |
if (fat_classify_dentry(d) == FAT_DENTRY_LAST || |
str_cmp(d->name, FAT_NAME_DOT_DOT) == 0) { |
memset(d, 0, sizeof(fat_dentry_t)); |
str_cpy(d->name, 8, FAT_NAME_DOT_DOT); |
str_cpy(d->ext, 3, FAT_EXT_PAD); |
d->attr = FAT_ATTR_SUBDIR; |
d->firstc = (parentp->firstc == FAT_CLST_ROOT) ? |
host2uint16_t_le(FAT_CLST_RES0) : |
host2uint16_t_le(parentp->firstc); |
/* TODO: initialize also the date/time members. */ |
} |
b->dirty = true; /* need to sync block */ |
block_put(b); |
childp->idx->pfc = parentp->firstc; |
childp->idx->pdi = i * dps + j; |
fibril_mutex_unlock(&childp->idx->lock); |
fibril_mutex_lock(&childp->lock); |
childp->lnkcnt = 1; |
childp->dirty = true; /* need to sync node */ |
fibril_mutex_unlock(&childp->lock); |
/* |
* Hash in the index structure into the position hash. |
*/ |
fat_idx_hashin(childp->idx); |
return EOK; |
return false; /* not supported at the moment */ |
} |
int fat_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm) |
static int fat_unlink(void *prnt, void *chld) |
{ |
fat_node_t *parentp = FAT_NODE(pfn); |
fat_node_t *childp = FAT_NODE(cfn); |
fat_bs_t *bs; |
fat_dentry_t *d; |
uint16_t bps; |
block_t *b; |
if (!parentp) |
return EBUSY; |
if (fat_has_children(cfn)) |
return ENOTEMPTY; |
fibril_mutex_lock(&parentp->lock); |
fibril_mutex_lock(&childp->lock); |
assert(childp->lnkcnt == 1); |
fibril_mutex_lock(&childp->idx->lock); |
bs = block_bb_get(childp->idx->dev_handle); |
bps = uint16_t_le2host(bs->bps); |
b = _fat_block_get(bs, childp->idx->dev_handle, childp->idx->pfc, |
(childp->idx->pdi * sizeof(fat_dentry_t)) / bps, |
BLOCK_FLAGS_NONE); |
d = (fat_dentry_t *)b->data + |
(childp->idx->pdi % (bps / sizeof(fat_dentry_t))); |
/* mark the dentry as not-currently-used */ |
d->name[0] = FAT_DENTRY_ERASED; |
b->dirty = true; /* need to sync block */ |
block_put(b); |
/* remove the index structure from the position hash */ |
fat_idx_hashout(childp->idx); |
/* clear position information */ |
childp->idx->pfc = FAT_CLST_RES0; |
childp->idx->pdi = 0; |
fibril_mutex_unlock(&childp->idx->lock); |
childp->lnkcnt = 0; |
childp->dirty = true; |
fibril_mutex_unlock(&childp->lock); |
fibril_mutex_unlock(&parentp->lock); |
return EOK; |
return ENOTSUP; /* not supported at the moment */ |
} |
fs_node_t *fat_match(fs_node_t *pfn, const char *component) |
static void *fat_match(void *prnt, const char *component) |
{ |
fat_bs_t *bs; |
fat_node_t *parentp = FAT_NODE(pfn); |
fat_node_t *parentp = (fat_node_t *)prnt; |
char name[FAT_NAME_LEN + 1 + FAT_EXT_LEN + 1]; |
unsigned i, j; |
unsigned bps; /* bytes per sector */ |
602,31 → 488,34 |
fat_dentry_t *d; |
block_t *b; |
fibril_mutex_lock(&parentp->idx->lock); |
bs = block_bb_get(parentp->idx->dev_handle); |
bps = uint16_t_le2host(bs->bps); |
futex_down(&parentp->idx->lock); |
bps = fat_bps_get(parentp->idx->dev_handle); |
dps = bps / sizeof(fat_dentry_t); |
blocks = parentp->size / bps; |
blocks = parentp->size / bps + (parentp->size % bps != 0); |
for (i = 0; i < blocks; i++) { |
b = fat_block_get(bs, parentp, i, BLOCK_FLAGS_NONE); |
for (j = 0; j < dps; j++) { |
unsigned dentries; |
b = fat_block_get(parentp, i); |
dentries = (i == blocks - 1) ? |
parentp->size % sizeof(fat_dentry_t) : |
dps; |
for (j = 0; j < dentries; j++) { |
d = ((fat_dentry_t *)b->data) + j; |
switch (fat_classify_dentry(d)) { |
case FAT_DENTRY_SKIP: |
case FAT_DENTRY_FREE: |
continue; |
case FAT_DENTRY_LAST: |
block_put(b); |
fibril_mutex_unlock(&parentp->idx->lock); |
futex_up(&parentp->idx->lock); |
return NULL; |
default: |
case FAT_DENTRY_VALID: |
fat_dentry_name_get(d, name); |
dentry_name_canonify(d, name); |
break; |
} |
if (fat_dentry_namecmp(name, component) == 0) { |
if (stricmp(name, component) == 0) { |
/* hit */ |
fat_node_t *nodep; |
void *node; |
/* |
* Assume tree hierarchy for locking. We |
* already have the parent and now we are going |
636,7 → 525,7 |
fat_idx_t *idx = fat_idx_get_by_pos( |
parentp->idx->dev_handle, parentp->firstc, |
i * dps + j); |
fibril_mutex_unlock(&parentp->idx->lock); |
futex_up(&parentp->idx->lock); |
if (!idx) { |
/* |
* Can happen if memory is low or if we |
645,38 → 534,39 |
block_put(b); |
return NULL; |
} |
nodep = fat_node_get_core(idx); |
fibril_mutex_unlock(&idx->lock); |
node = fat_node_get_core(idx); |
futex_up(&idx->lock); |
block_put(b); |
return FS_NODE(nodep); |
return node; |
} |
} |
block_put(b); |
} |
fibril_mutex_unlock(&parentp->idx->lock); |
futex_up(&parentp->idx->lock); |
return NULL; |
} |
fs_index_t fat_index_get(fs_node_t *fn) |
static fs_index_t fat_index_get(void *node) |
{ |
return FAT_NODE(fn)->idx->index; |
fat_node_t *fnodep = (fat_node_t *)node; |
if (!fnodep) |
return 0; |
return fnodep->idx->index; |
} |
size_t fat_size_get(fs_node_t *fn) |
static size_t fat_size_get(void *node) |
{ |
return FAT_NODE(fn)->size; |
return ((fat_node_t *)node)->size; |
} |
unsigned fat_lnkcnt_get(fs_node_t *fn) |
static unsigned fat_lnkcnt_get(void *node) |
{ |
return FAT_NODE(fn)->lnkcnt; |
return ((fat_node_t *)node)->lnkcnt; |
} |
bool fat_has_children(fs_node_t *fn) |
static bool fat_has_children(void *node) |
{ |
fat_bs_t *bs; |
fat_node_t *nodep = FAT_NODE(fn); |
fat_node_t *nodep = (fat_node_t *)node; |
unsigned bps; |
unsigned dps; |
unsigned blocks; |
685,63 → 575,65 |
if (nodep->type != FAT_DIRECTORY) |
return false; |
fibril_mutex_lock(&nodep->idx->lock); |
bs = block_bb_get(nodep->idx->dev_handle); |
bps = uint16_t_le2host(bs->bps); |
futex_down(&nodep->idx->lock); |
bps = fat_bps_get(nodep->idx->dev_handle); |
dps = bps / sizeof(fat_dentry_t); |
blocks = nodep->size / bps; |
blocks = nodep->size / bps + (nodep->size % bps != 0); |
for (i = 0; i < blocks; i++) { |
unsigned dentries; |
fat_dentry_t *d; |
b = fat_block_get(bs, nodep, i, BLOCK_FLAGS_NONE); |
for (j = 0; j < dps; j++) { |
b = fat_block_get(nodep, i); |
dentries = (i == blocks - 1) ? |
nodep->size % sizeof(fat_dentry_t) : |
dps; |
for (j = 0; j < dentries; j++) { |
d = ((fat_dentry_t *)b->data) + j; |
switch (fat_classify_dentry(d)) { |
case FAT_DENTRY_SKIP: |
case FAT_DENTRY_FREE: |
continue; |
case FAT_DENTRY_LAST: |
block_put(b); |
fibril_mutex_unlock(&nodep->idx->lock); |
futex_up(&nodep->idx->lock); |
return false; |
default: |
case FAT_DENTRY_VALID: |
block_put(b); |
fibril_mutex_unlock(&nodep->idx->lock); |
futex_up(&nodep->idx->lock); |
return true; |
} |
block_put(b); |
fibril_mutex_unlock(&nodep->idx->lock); |
futex_up(&nodep->idx->lock); |
return true; |
} |
block_put(b); |
} |
fibril_mutex_unlock(&nodep->idx->lock); |
futex_up(&nodep->idx->lock); |
return false; |
} |
fs_node_t *fat_root_get(dev_handle_t dev_handle) |
static void *fat_root_get(dev_handle_t dev_handle) |
{ |
return fat_node_get(dev_handle, 0); |
} |
char fat_plb_get_char(unsigned pos) |
static char fat_plb_get_char(unsigned pos) |
{ |
return fat_reg.plb_ro[pos % PLB_SIZE]; |
} |
bool fat_is_directory(fs_node_t *fn) |
static bool fat_is_directory(void *node) |
{ |
return FAT_NODE(fn)->type == FAT_DIRECTORY; |
return ((fat_node_t *)node)->type == FAT_DIRECTORY; |
} |
bool fat_is_file(fs_node_t *fn) |
static bool fat_is_file(void *node) |
{ |
return FAT_NODE(fn)->type == FAT_FILE; |
return ((fat_node_t *)node)->type == FAT_FILE; |
} |
/** libfs operations */ |
749,8 → 641,8 |
.match = fat_match, |
.node_get = fat_node_get, |
.node_put = fat_node_put, |
.create = fat_create_node, |
.destroy = fat_destroy_node, |
.create = fat_create, |
.destroy = fat_destroy, |
.link = fat_link, |
.unlink = fat_unlink, |
.index_get = fat_index_get, |
763,103 → 655,68 |
.is_file = fat_is_file |
}; |
/* |
* VFS operations. |
*/ |
void fat_mounted(ipc_callid_t rid, ipc_call_t *request) |
{ |
dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
enum cache_mode cmode; |
fat_bs_t *bs; |
block_t *bb; |
uint16_t bps; |
uint16_t rde; |
int rc; |
/* accept the mount options */ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_write_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
char *opts = malloc(size + 1); |
if (!opts) { |
ipc_answer_0(callid, ENOMEM); |
/* |
* For now, we don't bother to remember dev_handle, dev_phone or |
* dev_buffer in some data structure. We use global variables because we |
* know there will be at most one mount on this file system. |
* Of course, this is a huge TODO item. |
*/ |
dev_buffer = mmap(NULL, BS_SIZE, PROTO_READ | PROTO_WRITE, |
MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); |
if (!dev_buffer) { |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
ipcarg_t retval = ipc_data_write_finalize(callid, opts, size); |
if (retval != EOK) { |
ipc_answer_0(rid, retval); |
free(opts); |
return; |
} |
opts[size] = '\0'; |
/* Check for option enabling write through. */ |
if (str_cmp(opts, "wtcache") == 0) |
cmode = CACHE_MODE_WT; |
else |
cmode = CACHE_MODE_WB; |
dev_phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
DEVMAP_CONNECT_TO_DEVICE, dev_handle); |
/* initialize libblock */ |
rc = block_init(dev_handle, BS_SIZE); |
if (rc != EOK) { |
ipc_answer_0(rid, rc); |
if (dev_phone < 0) { |
munmap(dev_buffer, BS_SIZE); |
ipc_answer_0(rid, dev_phone); |
return; |
} |
/* prepare the boot block */ |
rc = block_bb_read(dev_handle, BS_BLOCK * BS_SIZE, BS_SIZE); |
rc = ipc_share_out_start(dev_phone, dev_buffer, |
AS_AREA_READ | AS_AREA_WRITE); |
if (rc != EOK) { |
block_fini(dev_handle); |
munmap(dev_buffer, BS_SIZE); |
ipc_answer_0(rid, rc); |
return; |
} |
/* get the buffer with the boot sector */ |
bs = block_bb_get(dev_handle); |
/* Read the number of root directory entries. */ |
bps = uint16_t_le2host(bs->bps); |
rde = uint16_t_le2host(bs->root_ent_max); |
bb = block_get(dev_handle, BS_BLOCK, BS_SIZE); |
bps = uint16_t_le2host(FAT_BS(bb)->bps); |
rde = uint16_t_le2host(FAT_BS(bb)->root_ent_max); |
block_put(bb); |
if (bps != BS_SIZE) { |
block_fini(dev_handle); |
munmap(dev_buffer, BS_SIZE); |
ipc_answer_0(rid, ENOTSUP); |
return; |
} |
/* Initialize the block cache */ |
rc = block_cache_init(dev_handle, bps, 0 /* XXX */, cmode); |
if (rc != EOK) { |
block_fini(dev_handle); |
ipc_answer_0(rid, rc); |
return; |
} |
rc = fat_idx_init_by_dev_handle(dev_handle); |
if (rc != EOK) { |
block_fini(dev_handle); |
munmap(dev_buffer, BS_SIZE); |
ipc_answer_0(rid, rc); |
return; |
} |
/* Initialize the root node. */ |
fs_node_t *rfn = (fs_node_t *)malloc(sizeof(fs_node_t)); |
if (!rfn) { |
block_fini(dev_handle); |
fat_idx_fini_by_dev_handle(dev_handle); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
fs_node_initialize(rfn); |
fat_node_t *rootp = (fat_node_t *)malloc(sizeof(fat_node_t)); |
if (!rootp) { |
free(rfn); |
block_fini(dev_handle); |
munmap(dev_buffer, BS_SIZE); |
fat_idx_fini_by_dev_handle(dev_handle); |
ipc_answer_0(rid, ENOMEM); |
return; |
868,9 → 725,8 |
fat_idx_t *ridxp = fat_idx_get_by_pos(dev_handle, FAT_CLST_ROOTPAR, 0); |
if (!ridxp) { |
free(rfn); |
munmap(dev_buffer, BS_SIZE); |
free(rootp); |
block_fini(dev_handle); |
fat_idx_fini_by_dev_handle(dev_handle); |
ipc_answer_0(rid, ENOMEM); |
return; |
885,10 → 741,8 |
rootp->size = rde * sizeof(fat_dentry_t); |
rootp->idx = ridxp; |
ridxp->nodep = rootp; |
rootp->bp = rfn; |
rfn->data = rootp; |
fibril_mutex_unlock(&ridxp->lock); |
futex_up(&ridxp->lock); |
ipc_answer_3(rid, EOK, ridxp->index, rootp->size, rootp->lnkcnt); |
} |
895,7 → 749,7 |
void fat_mount(ipc_callid_t rid, ipc_call_t *request) |
{ |
libfs_mount(&fat_libfs_ops, fat_reg.fs_handle, rid, request); |
ipc_answer_0(rid, ENOTSUP); |
} |
void fat_lookup(ipc_callid_t rid, ipc_call_t *request) |
908,31 → 762,25 |
dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request); |
fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request); |
off_t pos = (off_t)IPC_GET_ARG3(*request); |
fs_node_t *fn = fat_node_get(dev_handle, index); |
fat_node_t *nodep; |
fat_bs_t *bs; |
uint16_t bps; |
fat_node_t *nodep = (fat_node_t *)fat_node_get(dev_handle, index); |
uint16_t bps = fat_bps_get(dev_handle); |
size_t bytes; |
block_t *b; |
if (!fn) { |
if (!nodep) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
nodep = FAT_NODE(fn); |
ipc_callid_t callid; |
size_t len; |
if (!ipc_data_read_receive(&callid, &len)) { |
fat_node_put(fn); |
fat_node_put(nodep); |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
bs = block_bb_get(dev_handle); |
bps = uint16_t_le2host(bs->bps); |
if (nodep->type == FAT_FILE) { |
/* |
* Our strategy for regular file reads is to read one block at |
939,19 → 787,11 |
* most and make use of the possibility to return less data than |
* requested. This keeps the code very simple. |
*/ |
if (pos >= nodep->size) { |
/* reading beyond the EOF */ |
bytes = 0; |
(void) ipc_data_read_finalize(callid, NULL, 0); |
} else { |
bytes = min(len, bps - pos % bps); |
bytes = min(bytes, nodep->size - pos); |
b = fat_block_get(bs, nodep, pos / bps, |
BLOCK_FLAGS_NONE); |
(void) ipc_data_read_finalize(callid, b->data + pos % bps, |
bytes); |
block_put(b); |
} |
bytes = min(len, bps - pos % bps); |
b = fat_block_get(nodep, pos / bps); |
(void) ipc_data_read_finalize(callid, b->data + pos % bps, |
bytes); |
block_put(b); |
} else { |
unsigned bnum; |
off_t spos = pos; |
972,7 → 812,7 |
while (bnum < nodep->size / bps) { |
off_t o; |
b = fat_block_get(bs, nodep, bnum, BLOCK_FLAGS_NONE); |
b = fat_block_get(nodep, bnum); |
for (o = pos % (bps / sizeof(fat_dentry_t)); |
o < bps / sizeof(fat_dentry_t); |
o++, pos++) { |
979,7 → 819,6 |
d = ((fat_dentry_t *)b->data) + o; |
switch (fat_classify_dentry(d)) { |
case FAT_DENTRY_SKIP: |
case FAT_DENTRY_FREE: |
continue; |
case FAT_DENTRY_LAST: |
block_put(b); |
986,7 → 825,7 |
goto miss; |
default: |
case FAT_DENTRY_VALID: |
fat_dentry_name_get(d, name); |
dentry_name_canonify(d, name); |
block_put(b); |
goto hit; |
} |
995,224 → 834,19 |
bnum++; |
} |
miss: |
fat_node_put(fn); |
fat_node_put(nodep); |
ipc_answer_0(callid, ENOENT); |
ipc_answer_1(rid, ENOENT, 0); |
return; |
hit: |
(void) ipc_data_read_finalize(callid, name, str_size(name) + 1); |
(void) ipc_data_read_finalize(callid, name, strlen(name) + 1); |
bytes = (pos - spos) + 1; |
} |
fat_node_put(fn); |
fat_node_put(nodep); |
ipc_answer_1(rid, EOK, (ipcarg_t)bytes); |
} |
void fat_write(ipc_callid_t rid, ipc_call_t *request) |
{ |
dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request); |
fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request); |
off_t pos = (off_t)IPC_GET_ARG3(*request); |
fs_node_t *fn = fat_node_get(dev_handle, index); |
fat_node_t *nodep; |
fat_bs_t *bs; |
size_t bytes; |
block_t *b; |
uint16_t bps; |
unsigned spc; |
unsigned bpc; /* bytes per cluster */ |
off_t boundary; |
int flags = BLOCK_FLAGS_NONE; |
if (!fn) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
nodep = FAT_NODE(fn); |
ipc_callid_t callid; |
size_t len; |
if (!ipc_data_write_receive(&callid, &len)) { |
fat_node_put(fn); |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
bs = block_bb_get(dev_handle); |
bps = uint16_t_le2host(bs->bps); |
spc = bs->spc; |
bpc = bps * spc; |
/* |
* In all scenarios, we will attempt to write out only one block worth |
* of data at maximum. There might be some more efficient approaches, |
* but this one greatly simplifies fat_write(). Note that we can afford |
* to do this because the client must be ready to handle the return |
* value signalizing a smaller number of bytes written. |
*/ |
bytes = min(len, bps - pos % bps); |
if (bytes == bps) |
flags |= BLOCK_FLAGS_NOREAD; |
boundary = ROUND_UP(nodep->size, bpc); |
if (pos < boundary) { |
/* |
* This is the easier case - we are either overwriting already |
* existing contents or writing behind the EOF, but still within |
* the limits of the last cluster. The node size may grow to the |
* next block size boundary. |
*/ |
fat_fill_gap(bs, nodep, FAT_CLST_RES0, pos); |
b = fat_block_get(bs, nodep, pos / bps, flags); |
(void) ipc_data_write_finalize(callid, b->data + pos % bps, |
bytes); |
b->dirty = true; /* need to sync block */ |
block_put(b); |
if (pos + bytes > nodep->size) { |
nodep->size = pos + bytes; |
nodep->dirty = true; /* need to sync node */ |
} |
ipc_answer_2(rid, EOK, bytes, nodep->size); |
fat_node_put(fn); |
return; |
} else { |
/* |
* This is the more difficult case. We must allocate new |
* clusters for the node and zero them out. |
*/ |
int status; |
unsigned nclsts; |
fat_cluster_t mcl, lcl; |
nclsts = (ROUND_UP(pos + bytes, bpc) - boundary) / bpc; |
/* create an independent chain of nclsts clusters in all FATs */ |
status = fat_alloc_clusters(bs, dev_handle, nclsts, &mcl, &lcl); |
if (status != EOK) { |
/* could not allocate a chain of nclsts clusters */ |
fat_node_put(fn); |
ipc_answer_0(callid, status); |
ipc_answer_0(rid, status); |
return; |
} |
/* zero fill any gaps */ |
fat_fill_gap(bs, nodep, mcl, pos); |
b = _fat_block_get(bs, dev_handle, lcl, (pos / bps) % spc, |
flags); |
(void) ipc_data_write_finalize(callid, b->data + pos % bps, |
bytes); |
b->dirty = true; /* need to sync block */ |
block_put(b); |
/* |
* Append the cluster chain starting in mcl to the end of the |
* node's cluster chain. |
*/ |
fat_append_clusters(bs, nodep, mcl); |
nodep->size = pos + bytes; |
nodep->dirty = true; /* need to sync node */ |
ipc_answer_2(rid, EOK, bytes, nodep->size); |
fat_node_put(fn); |
return; |
} |
} |
void fat_truncate(ipc_callid_t rid, ipc_call_t *request) |
{ |
dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request); |
fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request); |
size_t size = (off_t)IPC_GET_ARG3(*request); |
fs_node_t *fn = fat_node_get(dev_handle, index); |
fat_node_t *nodep; |
fat_bs_t *bs; |
uint16_t bps; |
uint8_t spc; |
unsigned bpc; /* bytes per cluster */ |
int rc; |
if (!fn) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
nodep = FAT_NODE(fn); |
bs = block_bb_get(dev_handle); |
bps = uint16_t_le2host(bs->bps); |
spc = bs->spc; |
bpc = bps * spc; |
if (nodep->size == size) { |
rc = EOK; |
} else if (nodep->size < size) { |
/* |
* The standard says we have the freedom to grow the node. |
* For now, we simply return an error. |
*/ |
rc = EINVAL; |
} else if (ROUND_UP(nodep->size, bpc) == ROUND_UP(size, bpc)) { |
/* |
* The node will be shrunk, but no clusters will be deallocated. |
*/ |
nodep->size = size; |
nodep->dirty = true; /* need to sync node */ |
rc = EOK; |
} else { |
/* |
* The node will be shrunk, clusters will be deallocated. |
*/ |
if (size == 0) { |
fat_chop_clusters(bs, nodep, FAT_CLST_RES0); |
} else { |
fat_cluster_t lastc; |
(void) fat_cluster_walk(bs, dev_handle, nodep->firstc, |
&lastc, (size - 1) / bpc); |
fat_chop_clusters(bs, nodep, lastc); |
} |
nodep->size = size; |
nodep->dirty = true; /* need to sync node */ |
rc = EOK; |
} |
fat_node_put(fn); |
ipc_answer_0(rid, rc); |
return; |
} |
void fat_close(ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_answer_0(rid, EOK); |
} |
void fat_destroy(ipc_callid_t rid, ipc_call_t *request) |
{ |
dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request); |
fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request); |
int rc; |
fs_node_t *fn = fat_node_get(dev_handle, index); |
if (!fn) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
rc = fat_destroy_node(fn); |
ipc_answer_0(rid, rc); |
} |
void fat_open_node(ipc_callid_t rid, ipc_call_t *request) |
{ |
libfs_open_node(&fat_libfs_ops, fat_reg.fs_handle, rid, request); |
} |
void fat_stat(ipc_callid_t rid, ipc_call_t *request) |
{ |
libfs_stat(&fat_libfs_ops, fat_reg.fs_handle, rid, request); |
} |
void fat_sync(ipc_callid_t rid, ipc_call_t *request) |
{ |
/* Dummy implementation */ |
ipc_answer_0(rid, EOK); |
} |
/** |
* @} |
*/ |
*/ |
/branches/arm/uspace/srv/fs/fat/fat.h |
---|
33,9 → 33,7 |
#ifndef FAT_FAT_H_ |
#define FAT_FAT_H_ |
#include "fat_fat.h" |
#include <ipc/ipc.h> |
#include <fibril_sync.h> |
#include <libfs.h> |
#include <atomic.h> |
#include <sys/types.h> |
46,12 → 44,7 |
#define dprintf(...) printf(__VA_ARGS__) |
#endif |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
#define BS_BLOCK 0 |
#define BS_SIZE 512 |
typedef struct fat_bs { |
typedef struct { |
uint8_t ji[3]; /**< Jump instruction. */ |
uint8_t oem_name[8]; |
/* BIOS Parameter Block */ |
122,6 → 115,34 |
}; |
} __attribute__ ((packed)) fat_bs_t; |
#define FAT_ATTR_RDONLY (1 << 0) |
#define FAT_ATTR_VOLLABEL (1 << 3) |
#define FAT_ATTR_SUBDIR (1 << 4) |
typedef struct { |
uint8_t name[8]; |
uint8_t ext[3]; |
uint8_t attr; |
uint8_t reserved; |
uint8_t ctime_fine; |
uint16_t ctime; |
uint16_t cdate; |
uint16_t adate; |
union { |
uint16_t eaidx; /* FAT12/FAT16 */ |
uint16_t firstc_hi; /* FAT32 */ |
}; |
uint16_t mtime; |
uint16_t mdate; |
union { |
uint16_t firstc; /* FAT12/FAT16 */ |
uint16_t firstc_lo; /* FAT32 */ |
}; |
uint32_t size; |
} __attribute__ ((packed)) fat_dentry_t; |
typedef uint16_t fat_cluster_t; |
typedef enum { |
FAT_INVALID, |
FAT_DIRECTORY, |
161,7 → 182,7 |
/** Used indices (index) hash table link. */ |
link_t uih_link; |
fibril_mutex_t lock; |
futex_t lock; |
dev_handle_t dev_handle; |
fs_index_t index; |
/** |
179,10 → 200,7 |
/** FAT in-core node. */ |
typedef struct fat_node { |
/** Back pointer to the FS node. */ |
fs_node_t *bp; |
fibril_mutex_t lock; |
futex_t lock; |
fat_node_type_t type; |
fat_idx_t *idx; |
/** |
205,21 → 223,9 |
extern void fat_mount(ipc_callid_t, ipc_call_t *); |
extern void fat_lookup(ipc_callid_t, ipc_call_t *); |
extern void fat_read(ipc_callid_t, ipc_call_t *); |
extern void fat_write(ipc_callid_t, ipc_call_t *); |
extern void fat_truncate(ipc_callid_t, ipc_call_t *); |
extern void fat_stat(ipc_callid_t, ipc_call_t *); |
extern void fat_close(ipc_callid_t, ipc_call_t *); |
extern void fat_destroy(ipc_callid_t, ipc_call_t *); |
extern void fat_open_node(ipc_callid_t, ipc_call_t *); |
extern void fat_stat(ipc_callid_t, ipc_call_t *); |
extern void fat_sync(ipc_callid_t, ipc_call_t *); |
extern fat_idx_t *fat_idx_get_new(dev_handle_t); |
extern fat_idx_t *fat_idx_get_by_pos(dev_handle_t, fat_cluster_t, unsigned); |
extern fat_idx_t *fat_idx_get_by_index(dev_handle_t, fs_index_t); |
extern void fat_idx_destroy(fat_idx_t *); |
extern void fat_idx_hashin(fat_idx_t *); |
extern void fat_idx_hashout(fat_idx_t *); |
extern int fat_idx_init(void); |
extern void fat_idx_fini(void); |
/branches/arm/uspace/srv/fs/fat/fat.c |
---|
49,6 → 49,15 |
vfs_info_t fat_vfs_info = { |
.name = "fat", |
.ops = { |
[IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_READ)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_WRITE)] = VFS_OP_NULL, |
[IPC_METHOD_TO_VFS_OP(VFS_TRUNCATE)] = VFS_OP_NULL, |
[IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_NULL, |
[IPC_METHOD_TO_VFS_OP(VFS_MOUNTED)] = VFS_OP_DEFINED, |
[IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_NULL, |
} |
}; |
fs_reg_t fat_reg; |
89,41 → 98,18 |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
return; |
case VFS_OUT_MOUNTED: |
case VFS_MOUNTED: |
fat_mounted(callid, &call); |
break; |
case VFS_OUT_MOUNT: |
case VFS_MOUNT: |
fat_mount(callid, &call); |
break; |
case VFS_OUT_LOOKUP: |
case VFS_LOOKUP: |
fat_lookup(callid, &call); |
break; |
case VFS_OUT_READ: |
case VFS_READ: |
fat_read(callid, &call); |
break; |
case VFS_OUT_WRITE: |
fat_write(callid, &call); |
break; |
case VFS_OUT_TRUNCATE: |
fat_truncate(callid, &call); |
break; |
case VFS_OUT_STAT: |
fat_stat(callid, &call); |
break; |
case VFS_OUT_CLOSE: |
fat_close(callid, &call); |
break; |
case VFS_OUT_DESTROY: |
fat_destroy(callid, &call); |
break; |
case VFS_OUT_OPEN_NODE: |
fat_open_node(callid, &call); |
break; |
case VFS_OUT_SYNC: |
fat_sync(callid, &call); |
break; |
default: |
ipc_answer_0(callid, ENOTSUP); |
break; |
136,16 → 122,16 |
int vfs_phone; |
int rc; |
printf("fat: HelenOS FAT file system server.\n"); |
printf("FAT: HelenOS FAT file system server.\n"); |
rc = fat_idx_init(); |
if (rc != EOK) |
goto err; |
vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0); |
if (vfs_phone < EOK) { |
printf("fat: failed to connect to VFS\n"); |
return -1; |
vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0); |
while (vfs_phone < EOK) { |
usleep(10000); |
vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0); |
} |
rc = fs_register(vfs_phone, &fat_reg, &fat_vfs_info, fat_connection); |
/branches/arm/uspace/srv/fs/fat/Makefile |
---|
31,17 → 31,12 |
LIBC_PREFIX = ../../../lib/libc |
LIBFS_PREFIX = ../../../lib/libfs |
LIBBLOCK_PREFIX = ../../../lib/libblock |
SOFTINT_PREFIX = ../../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -I $(LIBFS_PREFIX) -I $(LIBBLOCK_PREFIX) |
CFLAGS += -I $(LIBFS_PREFIX) |
LIBS = \ |
$(LIBFS_PREFIX)/libfs.a \ |
$(LIBBLOCK_PREFIX)/libblock.a \ |
$(LIBC_PREFIX)/libc.a |
LIBS = $(LIBC_PREFIX)/libc.a $(LIBFS_PREFIX)/libfs.a |
## Sources |
# |
50,9 → 45,7 |
SOURCES = \ |
fat.c \ |
fat_ops.c \ |
fat_idx.c \ |
fat_dentry.c \ |
fat_fat.c |
fat_idx.c |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
63,18 → 56,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/srv/fs/fat/fat_idx.c |
---|
39,10 → 39,10 |
#include "../../vfs/vfs.h" |
#include <errno.h> |
#include <string.h> |
#include <adt/hash_table.h> |
#include <adt/list.h> |
#include <libadt/hash_table.h> |
#include <libadt/list.h> |
#include <assert.h> |
#include <fibril_sync.h> |
#include <futex.h> |
/** Each instance of this type describes one interval of freed VFS indices. */ |
typedef struct { |
68,8 → 68,8 |
link_t freed_head; |
} unused_t; |
/** Mutex protecting the list of unused structures. */ |
static FIBRIL_MUTEX_INITIALIZE(unused_lock); |
/** Futex protecting the list of unused structures. */ |
static futex_t unused_futex = FUTEX_INITIALIZER; |
/** List of unused structures. */ |
static LIST_INITIALIZE(unused_head); |
89,7 → 89,7 |
link_t *l; |
if (lock) |
fibril_mutex_lock(&unused_lock); |
futex_down(&unused_futex); |
for (l = unused_head.next; l != &unused_head; l = l->next) { |
u = list_get_instance(l, unused_t, link); |
if (u->dev_handle == dev_handle) |
96,12 → 96,12 |
return u; |
} |
if (lock) |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
return NULL; |
} |
/** Mutex protecting the up_hash and ui_hash. */ |
static FIBRIL_MUTEX_INITIALIZE(used_lock); |
/** Futex protecting the up_hash and ui_hash. */ |
static futex_t used_futex = FUTEX_INITIALIZER; |
/** |
* Global hash table of all used fat_idx_t structures. |
214,7 → 214,7 |
}; |
/** Allocate a VFS index which is not currently in use. */ |
static bool fat_index_alloc(dev_handle_t dev_handle, fs_index_t *index) |
static bool fat_idx_alloc(dev_handle_t dev_handle, fs_index_t *index) |
{ |
unused_t *u; |
231,7 → 231,7 |
*/ |
*index = u->next++; |
--u->remaining; |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
return true; |
} |
} else { |
244,7 → 244,7 |
list_remove(&f->link); |
free(f); |
} |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
return true; |
} |
/* |
252,7 → 252,7 |
* theoretically still possible (e.g. too many open unlinked nodes or |
* too many zero-sized nodes). |
*/ |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
return false; |
} |
276,7 → 276,7 |
} |
/** Free a VFS index, which is no longer in use. */ |
static void fat_index_free(dev_handle_t dev_handle, fs_index_t index) |
static void fat_idx_free(dev_handle_t dev_handle, fs_index_t index) |
{ |
unused_t *u; |
302,7 → 302,7 |
if (lnk->prev != &u->freed_head) |
try_coalesce_intervals(lnk->prev, lnk, |
lnk); |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
return; |
} |
if (f->last == index - 1) { |
310,7 → 310,7 |
if (lnk->next != &u->freed_head) |
try_coalesce_intervals(lnk, lnk->next, |
lnk); |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
return; |
} |
if (index > f->first) { |
321,7 → 321,7 |
n->first = index; |
n->last = index; |
list_insert_before(&n->link, lnk); |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
return; |
} |
335,55 → 335,9 |
n->last = index; |
list_append(&n->link, &u->freed_head); |
} |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
} |
static fat_idx_t *fat_idx_create(dev_handle_t dev_handle) |
{ |
fat_idx_t *fidx; |
fidx = (fat_idx_t *) malloc(sizeof(fat_idx_t)); |
if (!fidx) |
return NULL; |
if (!fat_index_alloc(dev_handle, &fidx->index)) { |
free(fidx); |
return NULL; |
} |
link_initialize(&fidx->uph_link); |
link_initialize(&fidx->uih_link); |
fibril_mutex_initialize(&fidx->lock); |
fidx->dev_handle = dev_handle; |
fidx->pfc = FAT_CLST_RES0; /* no parent yet */ |
fidx->pdi = 0; |
fidx->nodep = NULL; |
return fidx; |
} |
fat_idx_t *fat_idx_get_new(dev_handle_t dev_handle) |
{ |
fat_idx_t *fidx; |
fibril_mutex_lock(&used_lock); |
fidx = fat_idx_create(dev_handle); |
if (!fidx) { |
fibril_mutex_unlock(&used_lock); |
return NULL; |
} |
unsigned long ikey[] = { |
[UIH_DH_KEY] = dev_handle, |
[UIH_INDEX_KEY] = fidx->index, |
}; |
hash_table_insert(&ui_hash, ikey, &fidx->uih_link); |
fibril_mutex_lock(&fidx->lock); |
fibril_mutex_unlock(&used_lock); |
return fidx; |
} |
fat_idx_t * |
fat_idx_get_by_pos(dev_handle_t dev_handle, fat_cluster_t pfc, unsigned pdi) |
{ |
395,16 → 349,21 |
[UPH_PDI_KEY] = pdi, |
}; |
fibril_mutex_lock(&used_lock); |
futex_down(&used_futex); |
l = hash_table_find(&up_hash, pkey); |
if (l) { |
fidx = hash_table_get_instance(l, fat_idx_t, uph_link); |
} else { |
fidx = fat_idx_create(dev_handle); |
fidx = (fat_idx_t *) malloc(sizeof(fat_idx_t)); |
if (!fidx) { |
fibril_mutex_unlock(&used_lock); |
futex_up(&used_futex); |
return NULL; |
} |
if (!fat_idx_alloc(dev_handle, &fidx->index)) { |
free(fidx); |
futex_up(&used_futex); |
return NULL; |
} |
unsigned long ikey[] = { |
[UIH_DH_KEY] = dev_handle, |
411,44 → 370,23 |
[UIH_INDEX_KEY] = fidx->index, |
}; |
link_initialize(&fidx->uph_link); |
link_initialize(&fidx->uih_link); |
futex_initialize(&fidx->lock, 1); |
fidx->dev_handle = dev_handle; |
fidx->pfc = pfc; |
fidx->pdi = pdi; |
fidx->nodep = NULL; |
hash_table_insert(&up_hash, pkey, &fidx->uph_link); |
hash_table_insert(&ui_hash, ikey, &fidx->uih_link); |
} |
fibril_mutex_lock(&fidx->lock); |
fibril_mutex_unlock(&used_lock); |
futex_down(&fidx->lock); |
futex_up(&used_futex); |
return fidx; |
} |
void fat_idx_hashin(fat_idx_t *idx) |
{ |
unsigned long pkey[] = { |
[UPH_DH_KEY] = idx->dev_handle, |
[UPH_PFC_KEY] = idx->pfc, |
[UPH_PDI_KEY] = idx->pdi, |
}; |
fibril_mutex_lock(&used_lock); |
hash_table_insert(&up_hash, pkey, &idx->uph_link); |
fibril_mutex_unlock(&used_lock); |
} |
void fat_idx_hashout(fat_idx_t *idx) |
{ |
unsigned long pkey[] = { |
[UPH_DH_KEY] = idx->dev_handle, |
[UPH_PFC_KEY] = idx->pfc, |
[UPH_PDI_KEY] = idx->pdi, |
}; |
fibril_mutex_lock(&used_lock); |
hash_table_remove(&up_hash, pkey, 3); |
fibril_mutex_unlock(&used_lock); |
} |
fat_idx_t * |
fat_idx_get_by_index(dev_handle_t dev_handle, fs_index_t index) |
{ |
459,44 → 397,17 |
[UIH_INDEX_KEY] = index, |
}; |
fibril_mutex_lock(&used_lock); |
futex_down(&used_futex); |
l = hash_table_find(&ui_hash, ikey); |
if (l) { |
fidx = hash_table_get_instance(l, fat_idx_t, uih_link); |
fibril_mutex_lock(&fidx->lock); |
futex_down(&fidx->lock); |
} |
fibril_mutex_unlock(&used_lock); |
futex_up(&used_futex); |
return fidx; |
} |
/** Destroy the index structure. |
* |
* @param idx The index structure to be destroyed. |
*/ |
void fat_idx_destroy(fat_idx_t *idx) |
{ |
unsigned long ikey[] = { |
[UIH_DH_KEY] = idx->dev_handle, |
[UIH_INDEX_KEY] = idx->index, |
}; |
assert(idx->pfc == FAT_CLST_RES0); |
fibril_mutex_lock(&used_lock); |
/* |
* Since we can only free unlinked nodes, the index structure is not |
* present in the position hash (uph). We therefore hash it out from |
* the index hash only. |
*/ |
hash_table_remove(&ui_hash, ikey, 2); |
fibril_mutex_unlock(&used_lock); |
/* Release the VFS index. */ |
fat_index_free(idx->dev_handle, idx->index); |
/* Deallocate the structure. */ |
free(idx); |
} |
int fat_idx_init(void) |
{ |
if (!hash_table_create(&up_hash, UPH_BUCKETS, 3, &uph_ops)) |
524,12 → 435,12 |
if (!u) |
return ENOMEM; |
unused_initialize(u, dev_handle); |
fibril_mutex_lock(&unused_lock); |
futex_down(&unused_futex); |
if (!unused_find(dev_handle, false)) |
list_append(&u->link, &unused_head); |
else |
rc = EEXIST; |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
return rc; |
} |
540,7 → 451,7 |
u = unused_find(dev_handle, true); |
assert(u); |
list_remove(&u->link); |
fibril_mutex_unlock(&unused_lock); |
futex_up(&unused_futex); |
while (!list_empty(&u->freed_head)) { |
freed_t *f; |
/branches/arm/uspace/srv/vfs/vfs_ops.c |
---|
28,11 → 28,11 |
/** @addtogroup fs |
* @{ |
*/ |
*/ |
/** |
* @file vfs_ops.c |
* @brief Operations that VFS offers to its clients. |
* @file vfs_ops.c |
* @brief Operations that VFS offers to its clients. |
*/ |
#include "vfs.h" |
43,8 → 43,9 |
#include <stdlib.h> |
#include <string.h> |
#include <bool.h> |
#include <fibril_sync.h> |
#include <adt/list.h> |
#include <futex.h> |
#include <rwlock.h> |
#include <libadt/list.h> |
#include <unistd.h> |
#include <ctype.h> |
#include <fcntl.h> |
58,109 → 59,190 |
* This rwlock prevents the race between a triplet-to-VFS-node resolution and a |
* concurrent VFS operation which modifies the file system namespace. |
*/ |
FIBRIL_RWLOCK_INITIALIZE(namespace_rwlock); |
RWLOCK_INITIALIZE(namespace_rwlock); |
futex_t rootfs_futex = FUTEX_INITIALIZER; |
vfs_pair_t rootfs = { |
.fs_handle = 0, |
.dev_handle = 0 |
}; |
static void vfs_mount_internal(ipc_callid_t rid, dev_handle_t dev_handle, |
fs_handle_t fs_handle, char *mp, char *opts) |
void vfs_mount(ipc_callid_t rid, ipc_call_t *request) |
{ |
vfs_lookup_res_t mp_res; |
vfs_lookup_res_t mr_res; |
dev_handle_t dev_handle; |
vfs_node_t *mp_node = NULL; |
vfs_node_t *mr_node; |
fs_index_t rindex; |
size_t rsize; |
unsigned rlnkcnt; |
ipcarg_t rc; |
ipc_callid_t callid; |
ipc_call_t data; |
int rc; |
int phone; |
aid_t msg; |
ipc_call_t answer; |
size_t size; |
/* |
* We expect the library to do the device-name to device-handle |
* translation for us, thus the device handle will arrive as ARG1 |
* in the request. |
*/ |
dev_handle = (dev_handle_t)IPC_GET_ARG1(*request); |
/* |
* For now, don't make use of ARG2 and ARG3, but they can be used to |
* carry mount options in the future. |
*/ |
/* |
* Now, we expect the client to send us data with the name of the file |
* system. |
*/ |
if (!ipc_data_write_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
/* |
* Don't receive more than is necessary for storing a full file system |
* name. |
*/ |
if (size < 1 || size > FS_NAME_MAXLEN) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
/* Deliver the file system name. */ |
char fs_name[FS_NAME_MAXLEN + 1]; |
(void) ipc_data_write_finalize(callid, fs_name, size); |
fs_name[size] = '\0'; |
/* |
* Wait for IPC_M_PING so that we can return an error if we don't know |
* fs_name. |
*/ |
callid = async_get_call(&data); |
if (IPC_GET_METHOD(data) != IPC_M_PING) { |
ipc_answer_0(callid, ENOTSUP); |
ipc_answer_0(rid, ENOTSUP); |
return; |
} |
/* |
* Check if we know a file system with the same name as is in fs_name. |
* This will also give us its file system handle. |
*/ |
fs_handle_t fs_handle = fs_name_to_handle(fs_name, true); |
if (!fs_handle) { |
ipc_answer_0(callid, ENOENT); |
ipc_answer_0(rid, ENOENT); |
return; |
} |
/* Acknowledge that we know fs_name. */ |
ipc_answer_0(callid, EOK); |
/* Now, we want the client to send us the mount point. */ |
if (!ipc_data_write_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
/* Check whether size is reasonable wrt. the mount point. */ |
if (size < 1 || size > MAX_PATH_LEN) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
/* Allocate buffer for the mount point data being received. */ |
uint8_t *buf; |
buf = malloc(size + 1); |
if (!buf) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
/* Deliver the mount point. */ |
(void) ipc_data_write_finalize(callid, buf, size); |
buf[size] = '\0'; |
/* Resolve the path to the mountpoint. */ |
fibril_rwlock_write_lock(&namespace_rwlock); |
vfs_lookup_res_t mp_res; |
futex_down(&rootfs_futex); |
if (rootfs.fs_handle) { |
/* We already have the root FS. */ |
if (str_cmp(mp, "/") == 0) { |
rwlock_write_lock(&namespace_rwlock); |
if ((size == 1) && (buf[0] == '/')) { |
/* Trying to mount root FS over root FS */ |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
futex_up(&rootfs_futex); |
free(buf); |
ipc_answer_0(rid, EBUSY); |
return; |
} |
rc = vfs_lookup_internal(mp, L_DIRECTORY, &mp_res, NULL); |
rc = vfs_lookup_internal(buf, L_DIRECTORY, &mp_res, NULL); |
if (rc != EOK) { |
/* The lookup failed for some reason. */ |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
futex_up(&rootfs_futex); |
free(buf); |
ipc_answer_0(rid, rc); |
return; |
} |
mp_node = vfs_node_get(&mp_res); |
if (!mp_node) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
futex_up(&rootfs_futex); |
free(buf); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
/* |
* Now we hold a reference to mp_node. |
* It will be dropped upon the corresponding VFS_IN_UNMOUNT. |
* It will be dropped upon the corresponding VFS_UNMOUNT. |
* This prevents the mount point from being deleted. |
*/ |
rwlock_write_unlock(&namespace_rwlock); |
} else { |
/* We still don't have the root file system mounted. */ |
if (str_cmp(mp, "/") == 0) { |
if ((size == 1) && (buf[0] == '/')) { |
vfs_lookup_res_t mr_res; |
vfs_node_t *mr_node; |
ipcarg_t rindex; |
ipcarg_t rsize; |
ipcarg_t rlnkcnt; |
/* |
* For this simple, but important case, |
* we are almost done. |
*/ |
free(buf); |
/* Tell the mountee that it is being mounted. */ |
phone = vfs_grab_phone(fs_handle); |
msg = async_send_1(phone, VFS_OUT_MOUNTED, |
(ipcarg_t) dev_handle, &answer); |
/* send the mount options */ |
rc = ipc_data_write_start(phone, (void *)opts, |
str_size(opts)); |
if (rc != EOK) { |
async_wait_for(msg, NULL); |
vfs_release_phone(phone); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
return; |
} |
async_wait_for(msg, &rc); |
rc = async_req_1_3(phone, VFS_MOUNTED, |
(ipcarg_t) dev_handle, &rindex, &rsize, &rlnkcnt); |
vfs_release_phone(phone); |
if (rc != EOK) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
futex_up(&rootfs_futex); |
ipc_answer_0(rid, rc); |
return; |
} |
rindex = (fs_index_t) IPC_GET_ARG1(answer); |
rsize = (size_t) IPC_GET_ARG2(answer); |
rlnkcnt = (unsigned) IPC_GET_ARG3(answer); |
mr_res.triplet.fs_handle = fs_handle; |
mr_res.triplet.dev_handle = dev_handle; |
mr_res.triplet.index = rindex; |
mr_res.size = rsize; |
mr_res.lnkcnt = rlnkcnt; |
mr_res.type = VFS_NODE_DIRECTORY; |
mr_res.triplet.index = (fs_index_t) rindex; |
mr_res.size = (size_t) rsize; |
mr_res.lnkcnt = (unsigned) rlnkcnt; |
rootfs.fs_handle = fs_handle; |
rootfs.dev_handle = dev_handle; |
futex_up(&rootfs_futex); |
/* Add reference to the mounted root. */ |
mr_node = vfs_node_get(&mr_res); |
assert(mr_node); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
return; |
} else { |
168,266 → 250,38 |
* We can't resolve this without the root filesystem |
* being mounted first. |
*/ |
fibril_rwlock_write_unlock(&namespace_rwlock); |
futex_up(&rootfs_futex); |
free(buf); |
ipc_answer_0(rid, ENOENT); |
return; |
} |
} |
futex_up(&rootfs_futex); |
free(buf); /* The buffer is not needed anymore. */ |
/* |
* At this point, we have all necessary pieces: file system and device |
* handles, and we know the mount point VFS node. |
*/ |
int mountee_phone = vfs_grab_phone(fs_handle); |
assert(mountee_phone >= 0); |
phone = vfs_grab_phone(mp_res.triplet.fs_handle); |
msg = async_send_4(phone, VFS_OUT_MOUNT, |
rc = async_req_4_0(phone, VFS_MOUNT, |
(ipcarg_t) mp_res.triplet.dev_handle, |
(ipcarg_t) mp_res.triplet.index, |
(ipcarg_t) fs_handle, |
(ipcarg_t) dev_handle, &answer); |
/* send connection */ |
rc = async_req_1_0(phone, IPC_M_CONNECTION_CLONE, mountee_phone); |
if (rc != EOK) { |
async_wait_for(msg, NULL); |
vfs_release_phone(mountee_phone); |
vfs_release_phone(phone); |
/* Mount failed, drop reference to mp_node. */ |
if (mp_node) |
vfs_node_put(mp_node); |
ipc_answer_0(rid, rc); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
return; |
} |
(ipcarg_t) dev_handle); |
vfs_release_phone(phone); |
vfs_release_phone(mountee_phone); |
/* send the mount options */ |
rc = ipc_data_write_start(phone, (void *)opts, str_size(opts)); |
if (rc != EOK) { |
async_wait_for(msg, NULL); |
vfs_release_phone(phone); |
/* Mount failed, drop reference to mp_node. */ |
if (mp_node) |
vfs_node_put(mp_node); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
return; |
} |
async_wait_for(msg, &rc); |
vfs_release_phone(phone); |
if (rc == EOK) { |
rindex = (fs_index_t) IPC_GET_ARG1(answer); |
rsize = (size_t) IPC_GET_ARG2(answer); |
rlnkcnt = (unsigned) IPC_GET_ARG3(answer); |
mr_res.triplet.fs_handle = fs_handle; |
mr_res.triplet.dev_handle = dev_handle; |
mr_res.triplet.index = rindex; |
mr_res.size = rsize; |
mr_res.lnkcnt = rlnkcnt; |
mr_res.type = VFS_NODE_DIRECTORY; |
/* Add reference to the mounted root. */ |
mr_node = vfs_node_get(&mr_res); |
assert(mr_node); |
} else { |
/* Mount failed, drop reference to mp_node. */ |
if (mp_node) |
vfs_node_put(mp_node); |
} |
ipc_answer_0(rid, rc); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
} |
void vfs_mount(ipc_callid_t rid, ipc_call_t *request) |
{ |
/* |
* We expect the library to do the device-name to device-handle |
* translation for us, thus the device handle will arrive as ARG1 |
* in the request. |
*/ |
dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
/* |
* Mount flags are passed as ARG2. |
*/ |
unsigned int flags = (unsigned int) IPC_GET_ARG2(*request); |
/* |
* For now, don't make use of ARG3, but it can be used to |
* carry mount options in the future. |
*/ |
/* We want the client to send us the mount point. */ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_write_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
/* Check whether size is reasonable wrt. the mount point. */ |
if ((size < 1) || (size > MAX_PATH_LEN)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
/* Allocate buffer for the mount point data being received. */ |
char *mp = malloc(size + 1); |
if (!mp) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
/* Deliver the mount point. */ |
ipcarg_t retval = ipc_data_write_finalize(callid, mp, size); |
if (retval != EOK) { |
ipc_answer_0(rid, retval); |
free(mp); |
return; |
} |
mp[size] = '\0'; |
/* Now we expect to receive the mount options. */ |
if (!ipc_data_write_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
free(mp); |
return; |
} |
/* Check the offered options size. */ |
if (size < 0 || size > MAX_MNTOPTS_LEN) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
free(mp); |
return; |
} |
/* Allocate buffer for the mount options. */ |
char *opts = (char *) malloc(size + 1); |
if (!opts) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
free(mp); |
return; |
} |
/* Deliver the mount options. */ |
retval = ipc_data_write_finalize(callid, opts, size); |
if (retval != EOK) { |
ipc_answer_0(rid, retval); |
free(mp); |
free(opts); |
return; |
} |
opts[size] = '\0'; |
/* |
* Now, we expect the client to send us data with the name of the file |
* system. |
*/ |
if (!ipc_data_write_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
free(mp); |
free(opts); |
return; |
} |
/* |
* Don't receive more than is necessary for storing a full file system |
* name. |
*/ |
if ((size < 1) || (size > FS_NAME_MAXLEN)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
free(mp); |
free(opts); |
return; |
} |
/* |
* Allocate buffer for file system name. |
*/ |
char *fs_name = (char *) malloc(size + 1); |
if (fs_name == NULL) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
free(mp); |
free(opts); |
return; |
} |
/* Deliver the file system name. */ |
retval = ipc_data_write_finalize(callid, fs_name, size); |
if (retval != EOK) { |
ipc_answer_0(rid, retval); |
free(mp); |
free(opts); |
free(fs_name); |
return; |
} |
fs_name[size] = '\0'; |
/* |
* Wait for IPC_M_PING so that we can return an error if we don't know |
* fs_name. |
*/ |
ipc_call_t data; |
callid = async_get_call(&data); |
if (IPC_GET_METHOD(data) != IPC_M_PING) { |
ipc_answer_0(callid, ENOTSUP); |
ipc_answer_0(rid, ENOTSUP); |
free(mp); |
free(opts); |
free(fs_name); |
return; |
} |
/* |
* Check if we know a file system with the same name as is in fs_name. |
* This will also give us its file system handle. |
*/ |
fibril_mutex_lock(&fs_head_lock); |
fs_handle_t fs_handle; |
recheck: |
fs_handle = fs_name_to_handle(fs_name, false); |
if (!fs_handle) { |
if (flags & IPC_FLAG_BLOCKING) { |
fibril_condvar_wait(&fs_head_cv, &fs_head_lock); |
goto recheck; |
} |
fibril_mutex_unlock(&fs_head_lock); |
ipc_answer_0(callid, ENOENT); |
ipc_answer_0(rid, ENOENT); |
free(mp); |
free(fs_name); |
free(opts); |
return; |
} |
fibril_mutex_unlock(&fs_head_lock); |
/* Acknowledge that we know fs_name. */ |
ipc_answer_0(callid, EOK); |
/* Do the mount */ |
vfs_mount_internal(rid, dev_handle, fs_handle, mp, opts); |
free(mp); |
free(fs_name); |
free(opts); |
} |
void vfs_open(ipc_callid_t rid, ipc_call_t *request) |
{ |
if (!vfs_files_init()) { |
434,11 → 288,11 |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
/* |
* The POSIX interface is open(path, oflag, mode). |
* We can receive oflags and mode along with the VFS_IN_OPEN call; |
* the path will need to arrive in another call. |
* We can receive oflags and mode along with the VFS_OPEN call; the path |
* will need to arrive in another call. |
* |
* We also receive one private, non-POSIX set of flags called lflag |
* used to pass information to vfs_lookup_internal(). |
447,30 → 301,19 |
int oflag = IPC_GET_ARG2(*request); |
int mode = IPC_GET_ARG3(*request); |
size_t len; |
/* |
* Make sure that we are called with exactly one of L_FILE and |
* L_DIRECTORY. Make sure that the user does not pass L_OPEN. |
*/ |
if (((lflag & (L_FILE | L_DIRECTORY)) == 0) || |
((lflag & (L_FILE | L_DIRECTORY)) == (L_FILE | L_DIRECTORY)) || |
((lflag & L_OPEN) != 0)) { |
ipc_answer_0(rid, EINVAL); |
return; |
} |
if (oflag & O_CREAT) |
lflag |= L_CREATE; |
if (oflag & O_EXCL) |
lflag |= L_EXCLUSIVE; |
ipc_callid_t callid; |
if (!ipc_data_write_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
char *path = malloc(len + 1); |
if (!path) { |
ipc_answer_0(callid, ENOMEM); |
477,7 → 320,6 |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
int rc; |
if ((rc = ipc_data_write_finalize(callid, path, len))) { |
ipc_answer_0(rid, rc); |
492,40 → 334,40 |
* triplet. |
*/ |
if (lflag & L_CREATE) |
fibril_rwlock_write_lock(&namespace_rwlock); |
rwlock_write_lock(&namespace_rwlock); |
else |
fibril_rwlock_read_lock(&namespace_rwlock); |
rwlock_read_lock(&namespace_rwlock); |
/* The path is now populated and we can call vfs_lookup_internal(). */ |
vfs_lookup_res_t lr; |
rc = vfs_lookup_internal(path, lflag | L_OPEN, &lr, NULL); |
if (rc != EOK) { |
rc = vfs_lookup_internal(path, lflag, &lr, NULL); |
if (rc) { |
if (lflag & L_CREATE) |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
else |
fibril_rwlock_read_unlock(&namespace_rwlock); |
rwlock_read_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
free(path); |
return; |
} |
/* Path is no longer needed. */ |
free(path); |
vfs_node_t *node = vfs_node_get(&lr); |
if (lflag & L_CREATE) |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
else |
fibril_rwlock_read_unlock(&namespace_rwlock); |
rwlock_read_unlock(&namespace_rwlock); |
/* Truncate the file if requested and if necessary. */ |
if (oflag & O_TRUNC) { |
fibril_rwlock_write_lock(&node->contents_rwlock); |
rwlock_write_lock(&node->contents_rwlock); |
if (node->size) { |
rc = vfs_truncate_internal(node->fs_handle, |
node->dev_handle, node->index, 0); |
if (rc) { |
fibril_rwlock_write_unlock(&node->contents_rwlock); |
rwlock_write_unlock(&node->contents_rwlock); |
vfs_node_put(node); |
ipc_answer_0(rid, rc); |
return; |
532,9 → 374,9 |
} |
node->size = 0; |
} |
fibril_rwlock_write_unlock(&node->contents_rwlock); |
rwlock_write_unlock(&node->contents_rwlock); |
} |
/* |
* Get ourselves a file descriptor and the corresponding vfs_file_t |
* structure. |
547,173 → 389,30 |
} |
vfs_file_t *file = vfs_file_get(fd); |
file->node = node; |
if (oflag & O_APPEND) |
if (oflag & O_APPEND) |
file->append = true; |
/* |
* The following increase in reference count is for the fact that the |
* file is being opened and that a file structure is pointing to it. |
* It is necessary so that the file will not disappear when |
* vfs_node_put() is called. The reference will be dropped by the |
* respective VFS_IN_CLOSE. |
* respective VFS_CLOSE. |
*/ |
vfs_node_addref(node); |
vfs_node_put(node); |
/* Success! Return the new file descriptor to the client. */ |
ipc_answer_1(rid, EOK, fd); |
} |
void vfs_open_node(ipc_callid_t rid, ipc_call_t *request) |
{ |
// FIXME: check for sanity of the supplied fs, dev and index |
if (!vfs_files_init()) { |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
/* |
* The interface is open_node(fs, dev, index, oflag). |
*/ |
vfs_lookup_res_t lr; |
lr.triplet.fs_handle = IPC_GET_ARG1(*request); |
lr.triplet.dev_handle = IPC_GET_ARG2(*request); |
lr.triplet.index = IPC_GET_ARG3(*request); |
int oflag = IPC_GET_ARG4(*request); |
fibril_rwlock_read_lock(&namespace_rwlock); |
int rc = vfs_open_node_internal(&lr); |
if (rc != EOK) { |
fibril_rwlock_read_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
return; |
} |
vfs_node_t *node = vfs_node_get(&lr); |
fibril_rwlock_read_unlock(&namespace_rwlock); |
/* Truncate the file if requested and if necessary. */ |
if (oflag & O_TRUNC) { |
fibril_rwlock_write_lock(&node->contents_rwlock); |
if (node->size) { |
rc = vfs_truncate_internal(node->fs_handle, |
node->dev_handle, node->index, 0); |
if (rc) { |
fibril_rwlock_write_unlock(&node->contents_rwlock); |
vfs_node_put(node); |
ipc_answer_0(rid, rc); |
return; |
} |
node->size = 0; |
} |
fibril_rwlock_write_unlock(&node->contents_rwlock); |
} |
/* |
* Get ourselves a file descriptor and the corresponding vfs_file_t |
* structure. |
*/ |
int fd = vfs_fd_alloc(); |
if (fd < 0) { |
vfs_node_put(node); |
ipc_answer_0(rid, fd); |
return; |
} |
vfs_file_t *file = vfs_file_get(fd); |
file->node = node; |
if (oflag & O_APPEND) |
file->append = true; |
/* |
* The following increase in reference count is for the fact that the |
* file is being opened and that a file structure is pointing to it. |
* It is necessary so that the file will not disappear when |
* vfs_node_put() is called. The reference will be dropped by the |
* respective VFS_IN_CLOSE. |
*/ |
vfs_node_addref(node); |
vfs_node_put(node); |
/* Success! Return the new file descriptor to the client. */ |
ipc_answer_1(rid, EOK, fd); |
} |
void vfs_sync(ipc_callid_t rid, ipc_call_t *request) |
void vfs_close(ipc_callid_t rid, ipc_call_t *request) |
{ |
int fd = IPC_GET_ARG1(*request); |
/* Lookup the file structure corresponding to the file descriptor. */ |
vfs_file_t *file = vfs_file_get(fd); |
if (!file) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
/* |
* Lock the open file structure so that no other thread can manipulate |
* the same open file at a time. |
*/ |
fibril_mutex_lock(&file->lock); |
int fs_phone = vfs_grab_phone(file->node->fs_handle); |
/* Make a VFS_OUT_SYMC request at the destination FS server. */ |
aid_t msg; |
ipc_call_t answer; |
msg = async_send_2(fs_phone, VFS_OUT_SYNC, file->node->dev_handle, |
file->node->index, &answer); |
/* Wait for reply from the FS server. */ |
ipcarg_t rc; |
async_wait_for(msg, &rc); |
vfs_release_phone(fs_phone); |
fibril_mutex_unlock(&file->lock); |
int rc = vfs_fd_free(fd); |
ipc_answer_0(rid, rc); |
} |
void vfs_close(ipc_callid_t rid, ipc_call_t *request) |
{ |
int fd = IPC_GET_ARG1(*request); |
/* Lookup the file structure corresponding to the file descriptor. */ |
vfs_file_t *file = vfs_file_get(fd); |
if (!file) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
/* |
* Lock the open file structure so that no other thread can manipulate |
* the same open file at a time. |
*/ |
fibril_mutex_lock(&file->lock); |
int fs_phone = vfs_grab_phone(file->node->fs_handle); |
/* Make a VFS_OUT_CLOSE request at the destination FS server. */ |
aid_t msg; |
ipc_call_t answer; |
msg = async_send_2(fs_phone, VFS_OUT_CLOSE, file->node->dev_handle, |
file->node->index, &answer); |
/* Wait for reply from the FS server. */ |
ipcarg_t rc; |
async_wait_for(msg, &rc); |
vfs_release_phone(fs_phone); |
fibril_mutex_unlock(&file->lock); |
int retval = IPC_GET_ARG1(answer); |
if (retval != EOK) |
ipc_answer_0(rid, retval); |
retval = vfs_fd_free(fd); |
ipc_answer_0(rid, retval); |
} |
static void vfs_rdwr(ipc_callid_t rid, ipc_call_t *request, bool read) |
{ |
756,25 → 455,16 |
* Lock the open file structure so that no other thread can manipulate |
* the same open file at a time. |
*/ |
fibril_mutex_lock(&file->lock); |
futex_down(&file->lock); |
/* |
* Lock the file's node so that no other client can read/write to it at |
* the same time. |
*/ |
if (read) |
fibril_rwlock_read_lock(&file->node->contents_rwlock); |
rwlock_read_lock(&file->node->contents_rwlock); |
else |
fibril_rwlock_write_lock(&file->node->contents_rwlock); |
if (file->node->type == VFS_NODE_DIRECTORY) { |
/* |
* Make sure that no one is modifying the namespace |
* while we are in readdir(). |
*/ |
assert(read); |
fibril_rwlock_read_lock(&namespace_rwlock); |
} |
rwlock_write_lock(&file->node->contents_rwlock); |
int fs_phone = vfs_grab_phone(file->node->fs_handle); |
783,7 → 473,7 |
ipc_call_t answer; |
if (!read && file->append) |
file->pos = file->node->size; |
msg = async_send_3(fs_phone, read ? VFS_OUT_READ : VFS_OUT_WRITE, |
msg = async_send_3(fs_phone, IPC_GET_METHOD(*request), |
file->node->dev_handle, file->node->index, file->pos, &answer); |
/* |
793,32 → 483,28 |
* don't have to bother. |
*/ |
ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME); |
vfs_release_phone(fs_phone); |
/* Wait for reply from the FS server. */ |
ipcarg_t rc; |
async_wait_for(msg, &rc); |
vfs_release_phone(fs_phone); |
size_t bytes = IPC_GET_ARG1(answer); |
if (file->node->type == VFS_NODE_DIRECTORY) |
fibril_rwlock_read_unlock(&namespace_rwlock); |
/* Unlock the VFS node. */ |
if (read) |
fibril_rwlock_read_unlock(&file->node->contents_rwlock); |
rwlock_read_unlock(&file->node->contents_rwlock); |
else { |
/* Update the cached version of node's size. */ |
if (rc == EOK) |
file->node->size = IPC_GET_ARG2(answer); |
fibril_rwlock_write_unlock(&file->node->contents_rwlock); |
rwlock_write_unlock(&file->node->contents_rwlock); |
} |
/* Update the position pointer and unlock the open file. */ |
if (rc == EOK) |
file->pos += bytes; |
fibril_mutex_unlock(&file->lock); |
futex_up(&file->lock); |
/* |
* FS server's reply is the final result of the whole operation we |
852,40 → 538,40 |
} |
off_t newpos; |
fibril_mutex_lock(&file->lock); |
futex_down(&file->lock); |
if (whence == SEEK_SET) { |
file->pos = off; |
fibril_mutex_unlock(&file->lock); |
futex_up(&file->lock); |
ipc_answer_1(rid, EOK, off); |
return; |
} |
if (whence == SEEK_CUR) { |
if (file->pos + off < file->pos) { |
fibril_mutex_unlock(&file->lock); |
futex_up(&file->lock); |
ipc_answer_0(rid, EOVERFLOW); |
return; |
} |
file->pos += off; |
newpos = file->pos; |
fibril_mutex_unlock(&file->lock); |
futex_up(&file->lock); |
ipc_answer_1(rid, EOK, newpos); |
return; |
} |
if (whence == SEEK_END) { |
fibril_rwlock_read_lock(&file->node->contents_rwlock); |
rwlock_read_lock(&file->node->contents_rwlock); |
size_t size = file->node->size; |
fibril_rwlock_read_unlock(&file->node->contents_rwlock); |
rwlock_read_unlock(&file->node->contents_rwlock); |
if (size + off < size) { |
fibril_mutex_unlock(&file->lock); |
futex_up(&file->lock); |
ipc_answer_0(rid, EOVERFLOW); |
return; |
} |
newpos = size + off; |
fibril_mutex_unlock(&file->lock); |
futex_up(&file->lock); |
ipc_answer_1(rid, EOK, newpos); |
return; |
} |
fibril_mutex_unlock(&file->lock); |
futex_up(&file->lock); |
ipc_answer_0(rid, EINVAL); |
} |
897,7 → 583,7 |
int fs_phone; |
fs_phone = vfs_grab_phone(fs_handle); |
rc = async_req_3_0(fs_phone, VFS_OUT_TRUNCATE, (ipcarg_t)dev_handle, |
rc = async_req_3_0(fs_phone, VFS_TRUNCATE, (ipcarg_t)dev_handle, |
(ipcarg_t)index, (ipcarg_t)size); |
vfs_release_phone(fs_phone); |
return (int)rc; |
914,119 → 600,19 |
ipc_answer_0(rid, ENOENT); |
return; |
} |
fibril_mutex_lock(&file->lock); |
futex_down(&file->lock); |
fibril_rwlock_write_lock(&file->node->contents_rwlock); |
rwlock_write_lock(&file->node->contents_rwlock); |
rc = vfs_truncate_internal(file->node->fs_handle, |
file->node->dev_handle, file->node->index, size); |
if (rc == EOK) |
file->node->size = size; |
fibril_rwlock_write_unlock(&file->node->contents_rwlock); |
rwlock_write_unlock(&file->node->contents_rwlock); |
fibril_mutex_unlock(&file->lock); |
futex_up(&file->lock); |
ipc_answer_0(rid, (ipcarg_t)rc); |
} |
void vfs_fstat(ipc_callid_t rid, ipc_call_t *request) |
{ |
int fd = IPC_GET_ARG1(*request); |
size_t size = IPC_GET_ARG2(*request); |
ipcarg_t rc; |
vfs_file_t *file = vfs_file_get(fd); |
if (!file) { |
ipc_answer_0(rid, ENOENT); |
return; |
} |
ipc_callid_t callid; |
if (!ipc_data_read_receive(&callid, NULL)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
fibril_mutex_lock(&file->lock); |
int fs_phone = vfs_grab_phone(file->node->fs_handle); |
aid_t msg; |
msg = async_send_3(fs_phone, VFS_OUT_STAT, file->node->dev_handle, |
file->node->index, true, NULL); |
ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME); |
async_wait_for(msg, &rc); |
vfs_release_phone(fs_phone); |
fibril_mutex_unlock(&file->lock); |
ipc_answer_0(rid, rc); |
} |
void vfs_stat(ipc_callid_t rid, ipc_call_t *request) |
{ |
size_t len; |
ipc_callid_t callid; |
if (!ipc_data_write_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
char *path = malloc(len + 1); |
if (!path) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
int rc; |
if ((rc = ipc_data_write_finalize(callid, path, len))) { |
ipc_answer_0(rid, rc); |
free(path); |
return; |
} |
path[len] = '\0'; |
if (!ipc_data_read_receive(&callid, NULL)) { |
free(path); |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
vfs_lookup_res_t lr; |
fibril_rwlock_read_lock(&namespace_rwlock); |
rc = vfs_lookup_internal(path, L_NONE, &lr, NULL); |
free(path); |
if (rc != EOK) { |
fibril_rwlock_read_unlock(&namespace_rwlock); |
ipc_answer_0(callid, rc); |
ipc_answer_0(rid, rc); |
return; |
} |
vfs_node_t *node = vfs_node_get(&lr); |
if (!node) { |
fibril_rwlock_read_unlock(&namespace_rwlock); |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
fibril_rwlock_read_unlock(&namespace_rwlock); |
int fs_phone = vfs_grab_phone(node->fs_handle); |
aid_t msg; |
msg = async_send_3(fs_phone, VFS_OUT_STAT, node->dev_handle, |
node->index, false, NULL); |
ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME); |
ipcarg_t rv; |
async_wait_for(msg, &rv); |
vfs_release_phone(fs_phone); |
ipc_answer_0(rid, rv); |
vfs_node_put(node); |
} |
void vfs_mkdir(ipc_callid_t rid, ipc_call_t *request) |
{ |
int mode = IPC_GET_ARG1(*request); |
1053,10 → 639,10 |
} |
path[len] = '\0'; |
fibril_rwlock_write_lock(&namespace_rwlock); |
rwlock_write_lock(&namespace_rwlock); |
int lflag = L_DIRECTORY | L_CREATE | L_EXCLUSIVE; |
rc = vfs_lookup_internal(path, lflag, NULL, NULL); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
free(path); |
ipc_answer_0(rid, rc); |
} |
1087,13 → 673,13 |
} |
path[len] = '\0'; |
fibril_rwlock_write_lock(&namespace_rwlock); |
rwlock_write_lock(&namespace_rwlock); |
lflag &= L_DIRECTORY; /* sanitize lflag */ |
vfs_lookup_res_t lr; |
rc = vfs_lookup_internal(path, lflag | L_UNLINK, &lr, NULL); |
free(path); |
if (rc != EOK) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
return; |
} |
1101,13 → 687,13 |
/* |
* The name has already been unlinked by vfs_lookup_internal(). |
* We have to get and put the VFS node to ensure that it is |
* VFS_OUT_DESTROY'ed after the last reference to it is dropped. |
* VFS_DESTROY'ed after the last reference to it is dropped. |
*/ |
vfs_node_t *node = vfs_node_get(&lr); |
fibril_mutex_lock(&nodes_mutex); |
futex_down(&nodes_futex); |
node->lnkcnt--; |
fibril_mutex_unlock(&nodes_mutex); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
futex_up(&nodes_futex); |
rwlock_write_unlock(&namespace_rwlock); |
vfs_node_put(node); |
ipc_answer_0(rid, EOK); |
} |
1114,37 → 700,37 |
void vfs_rename(ipc_callid_t rid, ipc_call_t *request) |
{ |
size_t olen, nlen; |
size_t len; |
ipc_callid_t callid; |
int rc; |
/* Retrieve the old path. */ |
if (!ipc_data_write_receive(&callid, &olen)) { |
if (!ipc_data_write_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
char *old = malloc(olen + 1); |
char *old = malloc(len + 1); |
if (!old) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
if ((rc = ipc_data_write_finalize(callid, old, olen))) { |
if ((rc = ipc_data_write_finalize(callid, old, len))) { |
ipc_answer_0(rid, rc); |
free(old); |
return; |
} |
old[olen] = '\0'; |
old[len] = '\0'; |
/* Retrieve the new path. */ |
if (!ipc_data_write_receive(&callid, &nlen)) { |
if (!ipc_data_write_receive(&callid, &len)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
free(old); |
return; |
} |
char *new = malloc(nlen + 1); |
char *new = malloc(len + 1); |
if (!new) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
1151,16 → 737,16 |
free(old); |
return; |
} |
if ((rc = ipc_data_write_finalize(callid, new, nlen))) { |
if ((rc = ipc_data_write_finalize(callid, new, len))) { |
ipc_answer_0(rid, rc); |
free(old); |
free(new); |
return; |
} |
new[nlen] = '\0'; |
new[len] = '\0'; |
char *oldc = canonify(old, &olen); |
char *newc = canonify(new, &nlen); |
char *oldc = canonify(old, &len); |
char *newc = canonify(new, NULL); |
if (!oldc || !newc) { |
ipc_answer_0(rid, EINVAL); |
free(old); |
1167,18 → 753,8 |
free(new); |
return; |
} |
oldc[olen] = '\0'; |
newc[nlen] = '\0'; |
if ((!str_lcmp(newc, oldc, str_length(oldc))) && |
((newc[str_length(oldc)] == '/') || |
(str_length(oldc) == 1) || |
(str_length(oldc) == str_length(newc)))) { |
/* |
* oldc is a prefix of newc and either |
* - newc continues with a / where oldc ends, or |
* - oldc was / itself, or |
* - oldc and newc are equal. |
*/ |
if (!strncmp(newc, oldc, len)) { |
/* oldc is a prefix of newc */ |
ipc_answer_0(rid, EINVAL); |
free(old); |
free(new); |
1188,11 → 764,11 |
vfs_lookup_res_t old_lr; |
vfs_lookup_res_t new_lr; |
vfs_lookup_res_t new_par_lr; |
fibril_rwlock_write_lock(&namespace_rwlock); |
rwlock_write_lock(&namespace_rwlock); |
/* Lookup the node belonging to the old file name. */ |
rc = vfs_lookup_internal(oldc, L_NONE, &old_lr, NULL); |
if (rc != EOK) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
free(old); |
free(new); |
1200,31 → 776,16 |
} |
vfs_node_t *old_node = vfs_node_get(&old_lr); |
if (!old_node) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, ENOMEM); |
free(old); |
free(new); |
return; |
} |
/* Determine the path to the parent of the node with the new name. */ |
char *parentc = str_dup(newc); |
if (!parentc) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
free(old); |
free(new); |
return; |
} |
char *lastsl = str_rchr(parentc + 1, '/'); |
if (lastsl) |
*lastsl = '\0'; |
else |
parentc[1] = '\0'; |
/* Lookup parent of the new file name. */ |
rc = vfs_lookup_internal(parentc, L_NONE, &new_par_lr, NULL); |
free(parentc); /* not needed anymore */ |
rc = vfs_lookup_internal(newc, L_PARENT, &new_par_lr, NULL); |
if (rc != EOK) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
free(old); |
free(new); |
1233,7 → 794,7 |
/* Check whether linking to the same file system instance. */ |
if ((old_node->fs_handle != new_par_lr.triplet.fs_handle) || |
(old_node->dev_handle != new_par_lr.triplet.dev_handle)) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, EXDEV); /* different file systems */ |
free(old); |
free(new); |
1249,18 → 810,18 |
case EOK: |
new_node = vfs_node_get(&new_lr); |
if (!new_node) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, ENOMEM); |
free(old); |
free(new); |
return; |
} |
fibril_mutex_lock(&nodes_mutex); |
futex_down(&nodes_futex); |
new_node->lnkcnt--; |
fibril_mutex_unlock(&nodes_mutex); |
futex_up(&nodes_futex); |
break; |
default: |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, ENOTEMPTY); |
free(old); |
free(new); |
1269,7 → 830,7 |
/* Create the new link for the new name. */ |
rc = vfs_lookup_internal(newc, L_LINK, NULL, NULL, old_node->index); |
if (rc != EOK) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
if (new_node) |
vfs_node_put(new_node); |
ipc_answer_0(rid, rc); |
1277,13 → 838,13 |
free(new); |
return; |
} |
fibril_mutex_lock(&nodes_mutex); |
futex_down(&nodes_futex); |
old_node->lnkcnt++; |
fibril_mutex_unlock(&nodes_mutex); |
futex_up(&nodes_futex); |
/* Destroy the link for the old name. */ |
rc = vfs_lookup_internal(oldc, L_UNLINK, NULL, NULL); |
if (rc != EOK) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
rwlock_write_unlock(&namespace_rwlock); |
vfs_node_put(old_node); |
if (new_node) |
vfs_node_put(new_node); |
1292,10 → 853,10 |
free(new); |
return; |
} |
fibril_mutex_lock(&nodes_mutex); |
futex_down(&nodes_futex); |
old_node->lnkcnt--; |
fibril_mutex_unlock(&nodes_mutex); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
futex_up(&nodes_futex); |
rwlock_write_unlock(&namespace_rwlock); |
vfs_node_put(old_node); |
if (new_node) |
vfs_node_put(new_node); |
1306,4 → 867,4 |
/** |
* @} |
*/ |
*/ |
/branches/arm/uspace/srv/vfs/vfs.h |
---|
28,25 → 28,88 |
/** @addtogroup fs |
* @{ |
*/ |
*/ |
#ifndef VFS_VFS_H_ |
#define VFS_VFS_H_ |
#include <ipc/ipc.h> |
#include <adt/list.h> |
#include <fibril_sync.h> |
#include <libadt/list.h> |
#include <futex.h> |
#include <rwlock.h> |
#include <sys/types.h> |
#include <devmap.h> |
#include <bool.h> |
#include <ipc/vfs.h> |
// FIXME: according to CONFIG_DEBUG |
// #define dprintf(...) printf(__VA_ARGS__) |
// #define dprintf(...) printf(__VA_ARGS__) |
#define dprintf(...) |
#define VFS_FIRST IPC_FIRST_USER_METHOD |
#define IPC_METHOD_TO_VFS_OP(m) ((m) - VFS_FIRST) |
/* Basic types. */ |
typedef int16_t fs_handle_t; |
typedef int16_t dev_handle_t; |
typedef uint32_t fs_index_t; |
typedef enum { |
VFS_READ = VFS_FIRST, |
VFS_WRITE, |
VFS_TRUNCATE, |
VFS_MOUNT, |
VFS_UNMOUNT, |
VFS_LAST_CMN, /* keep this the last member of this enum */ |
} vfs_request_cmn_t; |
typedef enum { |
VFS_LOOKUP = VFS_LAST_CMN, |
VFS_MOUNTED, |
VFS_DESTROY, |
VFS_LAST_CLNT, /* keep this the last member of this enum */ |
} vfs_request_clnt_t; |
typedef enum { |
VFS_REGISTER = VFS_LAST_CMN, |
VFS_OPEN, |
VFS_CLOSE, |
VFS_SEEK, |
VFS_MKDIR, |
VFS_UNLINK, |
VFS_RENAME, |
VFS_LAST_SRV, /* keep this the last member of this enum */ |
} vfs_request_srv_t; |
/** |
* An instance of this structure is associated with a particular FS operation. |
* It tells VFS if the FS supports the operation or maybe if a default one |
* should be used. |
*/ |
typedef enum { |
VFS_OP_NULL = 0, |
VFS_OP_DEFAULT, |
VFS_OP_DEFINED |
} vfs_op_t; |
#define FS_NAME_MAXLEN 20 |
/** |
* A structure like this is passed to VFS by each individual FS upon its |
* registration. It assosiates a human-readable identifier with each |
* registered FS. More importantly, through this structure, the FS announces |
* what operations it supports. |
*/ |
typedef struct { |
/** Unique identifier of the fs. */ |
char name[FS_NAME_MAXLEN + 1]; |
/** Operations. */ |
vfs_op_t ops[VFS_LAST_CLNT - VFS_FIRST]; |
} vfs_info_t; |
/** |
* A structure like this will be allocated for each registered file system. |
*/ |
typedef struct { |
53,7 → 116,7 |
link_t fs_link; |
vfs_info_t vfs_info; |
fs_handle_t fs_handle; |
fibril_mutex_t phone_lock; |
futex_t phone_futex; /**< Phone serializing futex. */ |
ipcarg_t phone; |
} fs_info_t; |
60,8 → 123,8 |
/** |
* VFS_PAIR uniquely represents a file system instance. |
*/ |
#define VFS_PAIR \ |
fs_handle_t fs_handle; \ |
#define VFS_PAIR \ |
fs_handle_t fs_handle; \ |
dev_handle_t dev_handle; |
/** |
71,8 → 134,8 |
* @note fs_handle, dev_handle and index are meant to be returned in one |
* IPC reply. |
*/ |
#define VFS_TRIPLET \ |
VFS_PAIR; \ |
#define VFS_TRIPLET \ |
VFS_PAIR; \ |
fs_index_t index; |
typedef struct { |
83,15 → 146,52 |
VFS_TRIPLET; |
} vfs_triplet_t; |
typedef enum vfs_node_type { |
VFS_NODE_UNKNOWN, |
VFS_NODE_FILE, |
VFS_NODE_DIRECTORY, |
} vfs_node_type_t; |
/* |
* Lookup flags. |
*/ |
/** |
* No lookup flags used. |
*/ |
#define L_NONE 0 |
/** |
* Lookup will succeed only if the object is a regular file. If L_CREATE is |
* specified, an empty file will be created. This flag is mutually exclusive |
* with L_DIRECTORY. |
*/ |
#define L_FILE 1 |
/** |
* Lookup wil succeed only if the object is a directory. If L_CREATE is |
* specified, an empty directory will be created. This flag is mutually |
* exclusive with L_FILE. |
*/ |
#define L_DIRECTORY 2 |
/** |
* When used with L_CREATE, L_EXCLUSIVE will cause the lookup to fail if the |
* object already exists. L_EXCLUSIVE is implied when L_DIRECTORY is used. |
*/ |
#define L_EXCLUSIVE 4 |
/** |
* L_CREATE is used for creating both regular files and directories. |
*/ |
#define L_CREATE 8 |
/** |
* L_LINK is used for linking to an already existing nodes. |
*/ |
#define L_LINK 16 |
/** |
* L_UNLINK is used to remove leaves from the file system namespace. This flag |
* cannot be passed directly by the client, but will be set by VFS during |
* VFS_UNLINK. |
*/ |
#define L_UNLINK 32 |
/** |
* L_PARENT performs a lookup but returns the triplet of the parent node. |
* This flag may not be combined with any other lookup flag. |
*/ |
#define L_PARENT 64 |
typedef struct { |
vfs_triplet_t triplet; |
vfs_node_type_t type; |
size_t size; |
unsigned lnkcnt; |
} vfs_lookup_res_t; |
113,15 → 213,12 |
unsigned lnkcnt; |
link_t nh_link; /**< Node hash-table link. */ |
vfs_node_type_t type; /**< Partial info about the node type. */ |
size_t size; /**< Cached size if the node is a file. */ |
/** |
* Holding this rwlock prevents modifications of the node's contents. |
*/ |
fibril_rwlock_t contents_rwlock; |
rwlock_t contents_rwlock; |
} vfs_node_t; |
/** |
130,7 → 227,7 |
*/ |
typedef struct { |
/** Serializes access to this open file. */ |
fibril_mutex_t lock; |
futex_t lock; |
vfs_node_t *node; |
144,14 → 241,16 |
off_t pos; |
} vfs_file_t; |
extern fibril_mutex_t nodes_mutex; |
extern futex_t nodes_futex; |
extern fibril_condvar_t fs_head_cv; |
extern fibril_mutex_t fs_head_lock; |
extern link_t fs_head; /**< List of registered file systems. */ |
extern vfs_pair_t rootfs; /**< Root file system. */ |
#define MAX_PATH_LEN (64 * 1024) |
#define PLB_SIZE (2 * MAX_PATH_LEN) |
/** Each instance of this type describes one path lookup in progress. */ |
typedef struct { |
link_t plb_link; /**< Active PLB entries list link. */ |
159,14 → 258,12 |
size_t len; /**< Number of characters in this PLB entry. */ |
} plb_entry_t; |
extern fibril_mutex_t plb_mutex;/**< Mutex protecting plb and plb_head. */ |
extern futex_t plb_futex; /**< Futex protecting plb and plb_head. */ |
extern uint8_t *plb; /**< Path Lookup Buffer */ |
extern link_t plb_head; /**< List of active PLB entries. */ |
#define MAX_MNTOPTS_LEN 256 |
/** Holding this rwlock prevents changes in file system namespace. */ |
extern fibril_rwlock_t namespace_rwlock; |
extern rwlock_t namespace_rwlock; |
extern int vfs_grab_phone(fs_handle_t); |
extern void vfs_release_phone(int); |
173,9 → 270,8 |
extern fs_handle_t fs_name_to_handle(char *, bool); |
extern int vfs_lookup_internal(char *, int, vfs_lookup_res_t *, |
vfs_pair_t *, ...); |
extern int vfs_open_node_internal(vfs_lookup_res_t *); |
extern int vfs_lookup_internal(char *, int, vfs_lookup_res_t *, vfs_pair_t *, |
...); |
extern bool vfs_nodes_init(void); |
extern vfs_node_t *vfs_node_get(vfs_lookup_res_t *); |
197,16 → 293,11 |
extern void vfs_register(ipc_callid_t, ipc_call_t *); |
extern void vfs_mount(ipc_callid_t, ipc_call_t *); |
extern void vfs_open(ipc_callid_t, ipc_call_t *); |
extern void vfs_open_node(ipc_callid_t, ipc_call_t *); |
extern void vfs_sync(ipc_callid_t, ipc_call_t *); |
extern void vfs_close(ipc_callid_t, ipc_call_t *); |
extern void vfs_read(ipc_callid_t, ipc_call_t *); |
extern void vfs_write(ipc_callid_t, ipc_call_t *); |
extern void vfs_seek(ipc_callid_t, ipc_call_t *); |
extern void vfs_truncate(ipc_callid_t, ipc_call_t *); |
extern void vfs_fstat(ipc_callid_t, ipc_call_t *); |
extern void vfs_fstat(ipc_callid_t, ipc_call_t *); |
extern void vfs_stat(ipc_callid_t, ipc_call_t *); |
extern void vfs_mkdir(ipc_callid_t, ipc_call_t *); |
extern void vfs_unlink(ipc_callid_t, ipc_call_t *); |
extern void vfs_rename(ipc_callid_t, ipc_call_t *); |
/branches/arm/uspace/srv/vfs/vfs_file.c |
---|
40,8 → 40,6 |
#include <string.h> |
#include <assert.h> |
#include <bool.h> |
#include <fibril.h> |
#include <fibril_sync.h> |
#include "vfs.h" |
/** |
57,9 → 55,9 |
* first VFS_OPEN operation. |
* |
* This resource being per-connection and, in the first place, per-fibril, we |
* don't need to protect it by a mutex. |
* don't need to protect it by a futex. |
*/ |
fibril_local vfs_file_t **files = NULL; |
__thread vfs_file_t **files = NULL; |
/** Initialize the table of open files. */ |
bool vfs_files_init(void) |
80,23 → 78,19 |
*/ |
int vfs_fd_alloc(void) |
{ |
if (!vfs_files_init()) |
return ENOMEM; |
unsigned int i; |
int i; |
for (i = 0; i < MAX_OPEN_FILES; i++) { |
if (!files[i]) { |
files[i] = (vfs_file_t *) malloc(sizeof(vfs_file_t)); |
if (!files[i]) |
return ENOMEM; |
memset(files[i], 0, sizeof(vfs_file_t)); |
fibril_mutex_initialize(&files[i]->lock); |
futex_initialize(&files[i]->lock, 1); |
vfs_file_addref(files[i]); |
return (int) i; |
return i; |
} |
} |
return EMFILE; |
} |
109,15 → 103,10 |
*/ |
int vfs_fd_free(int fd) |
{ |
if (!vfs_files_init()) |
return ENOMEM; |
if ((fd < 0) || (fd >= MAX_OPEN_FILES) || (files[fd] == NULL)) |
if ((fd >= MAX_OPEN_FILES) || (files[fd] == NULL)) |
return EBADF; |
vfs_file_delref(files[fd]); |
files[fd] = NULL; |
return EOK; |
} |
161,15 → 150,11 |
*/ |
vfs_file_t *vfs_file_get(int fd) |
{ |
if (!vfs_files_init()) |
return NULL; |
if ((fd >= 0) && (fd < MAX_OPEN_FILES)) |
if (fd < MAX_OPEN_FILES) |
return files[fd]; |
return NULL; |
} |
/** |
* @} |
*/ |
*/ |
/branches/arm/uspace/srv/vfs/Makefile |
---|
32,7 → 32,6 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
LIBS = $(LIBC_PREFIX)/libc.a |
58,18 → 57,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/srv/vfs/vfs_lookup.c |
---|
28,10 → 28,10 |
/** @addtogroup fs |
* @{ |
*/ |
*/ |
/** |
* @file vfs_lookup.c |
* @file vfs_lookup.c |
* @brief |
*/ |
42,28 → 42,27 |
#include <string.h> |
#include <stdarg.h> |
#include <bool.h> |
#include <fibril_sync.h> |
#include <adt/list.h> |
#include <futex.h> |
#include <libadt/list.h> |
#include <vfs/canonify.h> |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
FIBRIL_MUTEX_INITIALIZE(plb_mutex); |
LIST_INITIALIZE(plb_head); /**< PLB entry ring buffer. */ |
futex_t plb_futex = FUTEX_INITIALIZER; |
link_t plb_head; /**< PLB entry ring buffer. */ |
uint8_t *plb = NULL; |
/** Perform a path lookup. |
* |
* @param path Path to be resolved; it must be a NULL-terminated |
* string. |
* @param lflag Flags to be used during lookup. |
* @param result Empty structure where the lookup result will be stored. |
* Can be NULL. |
* @param altroot If non-empty, will be used instead of rootfs as the root |
* of the whole VFS tree. |
* @param path Path to be resolved; it must be a NULL-terminated |
* string. |
* @param lflag Flags to be used during lookup. |
* @param result Empty structure where the lookup result will be stored. |
* Can be NULL. |
* @param altroot If non-empty, will be used instead of rootfs as the root |
* of the whole VFS tree. |
* |
* @return EOK on success or an error code from errno.h. |
* |
* @return EOK on success or an error code from errno.h. |
*/ |
int vfs_lookup_internal(char *path, int lflag, vfs_lookup_res_t *result, |
vfs_pair_t *altroot, ...) |
92,7 → 91,7 |
va_end(ap); |
} |
fibril_mutex_lock(&plb_mutex); |
futex_down(&plb_futex); |
plb_entry_t entry; |
link_initialize(&entry.plb_link); |
119,7 → 118,7 |
/* |
* The buffer cannot absorb the path. |
*/ |
fibril_mutex_unlock(&plb_mutex); |
futex_up(&plb_futex); |
return ELIMIT; |
} |
} else { |
127,7 → 126,7 |
/* |
* The buffer cannot absorb the path. |
*/ |
fibril_mutex_unlock(&plb_mutex); |
futex_up(&plb_futex); |
return ELIMIT; |
} |
} |
146,7 → 145,7 |
*/ |
list_append(&entry.plb_link, &plb_head); |
fibril_mutex_unlock(&plb_mutex); |
futex_up(&plb_futex); |
/* |
* Copy the path into PLB. |
159,16 → 158,16 |
ipc_call_t answer; |
int phone = vfs_grab_phone(root->fs_handle); |
aid_t req = async_send_5(phone, VFS_OUT_LOOKUP, (ipcarg_t) first, |
aid_t req = async_send_5(phone, VFS_LOOKUP, (ipcarg_t) first, |
(ipcarg_t) (first + len - 1) % PLB_SIZE, |
(ipcarg_t) root->dev_handle, (ipcarg_t) lflag, (ipcarg_t) index, |
&answer); |
vfs_release_phone(phone); |
ipcarg_t rc; |
async_wait_for(req, &rc); |
vfs_release_phone(phone); |
fibril_mutex_lock(&plb_mutex); |
futex_down(&plb_futex); |
list_remove(&entry.plb_link); |
/* |
* Erasing the path from PLB will come handy for debugging purposes. |
175,58 → 174,19 |
*/ |
memset(&plb[first], 0, cnt1); |
memset(plb, 0, cnt2); |
fibril_mutex_unlock(&plb_mutex); |
futex_up(&plb_futex); |
if ((rc == EOK) && (result)) { |
if ((rc == EOK) && result) { |
result->triplet.fs_handle = (fs_handle_t) IPC_GET_ARG1(answer); |
result->triplet.dev_handle = (dev_handle_t) IPC_GET_ARG2(answer); |
result->triplet.index = (fs_index_t) IPC_GET_ARG3(answer); |
result->size = (size_t) IPC_GET_ARG4(answer); |
result->lnkcnt = (unsigned) IPC_GET_ARG5(answer); |
if (lflag & L_FILE) |
result->type = VFS_NODE_FILE; |
else if (lflag & L_DIRECTORY) |
result->type = VFS_NODE_DIRECTORY; |
else |
result->type = VFS_NODE_UNKNOWN; |
} |
return rc; |
} |
/** Perform a node open operation. |
* |
* @return EOK on success or an error code from errno.h. |
* |
*/ |
int vfs_open_node_internal(vfs_lookup_res_t *result) |
{ |
int phone = vfs_grab_phone(result->triplet.fs_handle); |
ipc_call_t answer; |
aid_t req = async_send_2(phone, VFS_OUT_OPEN_NODE, |
(ipcarg_t) result->triplet.dev_handle, |
(ipcarg_t) result->triplet.index, &answer); |
ipcarg_t rc; |
async_wait_for(req, &rc); |
vfs_release_phone(phone); |
if (rc == EOK) { |
result->size = (size_t) IPC_GET_ARG1(answer); |
result->lnkcnt = (unsigned) IPC_GET_ARG2(answer); |
if (IPC_GET_ARG3(answer) & L_FILE) |
result->type = VFS_NODE_FILE; |
else if (IPC_GET_ARG3(answer) & L_DIRECTORY) |
result->type = VFS_NODE_DIRECTORY; |
else |
result->type = VFS_NODE_UNKNOWN; |
} |
return rc; |
} |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/vfs/vfs.c |
---|
28,11 → 28,11 |
/** @addtogroup fs |
* @{ |
*/ |
*/ |
/** |
* @file vfs.c |
* @brief VFS service for HelenOS. |
* @file vfs.c |
* @brief VFS service for HelenOS. |
*/ |
#include <ipc/ipc.h> |
43,14 → 43,17 |
#include <bool.h> |
#include <string.h> |
#include <as.h> |
#include <libadt/list.h> |
#include <atomic.h> |
#include "vfs.h" |
#define NAME "vfs" |
#define dprintf(...) printf(__VA_ARGS__) |
static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
bool keep_on_going = true; |
bool keep_on_going = 1; |
/* |
* The connection was opened via the IPC_CONNECT_ME_TO call. |
57,7 → 60,7 |
* This call needs to be answered. |
*/ |
ipc_answer_0(iid, EOK); |
/* |
* Here we enter the main connection fibril loop. |
* The logic behind this loop and the protocol is that we'd like to keep |
69,76 → 72,71 |
* connection later. |
*/ |
while (keep_on_going) { |
ipc_callid_t callid; |
ipc_call_t call; |
ipc_callid_t callid = async_get_call(&call); |
fs_handle_t fs_handle; |
int phone; |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
keep_on_going = false; |
break; |
case VFS_IN_REGISTER: |
case VFS_REGISTER: |
vfs_register(callid, &call); |
keep_on_going = false; |
break; |
case VFS_IN_MOUNT: |
case VFS_MOUNT: |
vfs_mount(callid, &call); |
break; |
case VFS_IN_OPEN: |
case VFS_OPEN: |
vfs_open(callid, &call); |
break; |
case VFS_IN_OPEN_NODE: |
vfs_open_node(callid, &call); |
break; |
case VFS_IN_CLOSE: |
case VFS_CLOSE: |
vfs_close(callid, &call); |
break; |
case VFS_IN_READ: |
case VFS_READ: |
vfs_read(callid, &call); |
break; |
case VFS_IN_WRITE: |
case VFS_WRITE: |
vfs_write(callid, &call); |
break; |
case VFS_IN_SEEK: |
case VFS_SEEK: |
vfs_seek(callid, &call); |
break; |
case VFS_IN_TRUNCATE: |
case VFS_TRUNCATE: |
vfs_truncate(callid, &call); |
break; |
case VFS_IN_FSTAT: |
vfs_fstat(callid, &call); |
break; |
case VFS_IN_STAT: |
vfs_stat(callid, &call); |
break; |
case VFS_IN_MKDIR: |
case VFS_MKDIR: |
vfs_mkdir(callid, &call); |
break; |
case VFS_IN_UNLINK: |
case VFS_UNLINK: |
vfs_unlink(callid, &call); |
break; |
case VFS_IN_RENAME: |
case VFS_RENAME: |
vfs_rename(callid, &call); |
break; |
case VFS_IN_SYNC: |
vfs_sync(callid, &call); |
break; |
default: |
ipc_answer_0(callid, ENOTSUP); |
break; |
} |
} |
/* TODO: cleanup after the client */ |
/* TODO: cleanup after the client */ |
} |
int main(int argc, char **argv) |
{ |
ipcarg_t phonead; |
printf(NAME ": HelenOS VFS server\n"); |
/* |
* Initialize the list of registered file systems. |
*/ |
list_initialize(&fs_head); |
/* |
* Initialize VFS node hash table. |
*/ |
if (!vfs_nodes_init()) { |
145,16 → 143,16 |
printf(NAME ": Failed to initialize VFS node hash table\n"); |
return ENOMEM; |
} |
/* |
* Allocate and initialize the Path Lookup Buffer. |
*/ |
list_initialize(&plb_head); |
plb = as_get_mappable_page(PLB_SIZE); |
if (!plb) { |
printf(NAME ": Cannot allocate a mappable piece of address space\n"); |
return ENOMEM; |
} |
if (as_area_create(plb, PLB_SIZE, AS_AREA_READ | AS_AREA_WRITE | |
AS_AREA_CACHEABLE) != plb) { |
printf(NAME ": Cannot create address space area\n"); |
163,7 → 161,7 |
memset(plb, 0, PLB_SIZE); |
/* |
* Set a connection handling function/fibril. |
* Set a connectio handling function/fibril. |
*/ |
async_set_client_connection(vfs_connection); |
170,9 → 168,8 |
/* |
* Register at the naming service. |
*/ |
ipcarg_t phonead; |
ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, 0, &phonead); |
/* |
* Start accepting connections. |
*/ |
183,4 → 180,4 |
/** |
* @} |
*/ |
*/ |
/branches/arm/uspace/srv/vfs/vfs_register.c |
---|
28,10 → 28,10 |
/** @addtogroup fs |
* @{ |
*/ |
*/ |
/** |
* @file vfs_register.c |
* @file vfs_register.c |
* @brief |
*/ |
45,16 → 45,15 |
#include <string.h> |
#include <ctype.h> |
#include <bool.h> |
#include <fibril_sync.h> |
#include <adt/list.h> |
#include <futex.h> |
#include <libadt/list.h> |
#include <as.h> |
#include <assert.h> |
#include <atomic.h> |
#include "vfs.h" |
FIBRIL_CONDVAR_INITIALIZE(fs_head_cv); |
FIBRIL_MUTEX_INITIALIZE(fs_head_lock); |
LIST_INITIALIZE(fs_head); |
atomic_t fs_head_futex = FUTEX_INITIALIZER; |
link_t fs_head; |
atomic_t fs_handle_next = { |
.count = 1 |
99,6 → 98,30 |
return false; |
} |
/* |
* Check if the FS implements mandatory VFS operations. |
*/ |
if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] != VFS_OP_DEFINED) { |
dprintf("Operation VFS_LOOKUP not defined by the client.\n"); |
return false; |
} |
if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_READ)] != VFS_OP_DEFINED) { |
dprintf("Operation VFS_READ not defined by the client.\n"); |
return false; |
} |
/* |
* Check if each operation is either not defined, defined or default. |
*/ |
for (i = VFS_FIRST; i < VFS_LAST_CLNT; i++) { |
if ((info->ops[IPC_METHOD_TO_VFS_OP(i)] != VFS_OP_NULL) && |
(info->ops[IPC_METHOD_TO_VFS_OP(i)] != VFS_OP_DEFAULT) && |
(info->ops[IPC_METHOD_TO_VFS_OP(i)] != VFS_OP_DEFINED)) { |
dprintf("Operation info not understood.\n"); |
return false; |
} |
} |
return true; |
} |
160,7 → 183,7 |
return; |
} |
link_initialize(&fs_info->fs_link); |
fibril_mutex_initialize(&fs_info->phone_lock); |
futex_initialize(&fs_info->phone_futex, 1); |
rc = ipc_data_write_finalize(callid, &fs_info->vfs_info, size); |
if (rc != EOK) { |
181,7 → 204,8 |
return; |
} |
fibril_mutex_lock(&fs_head_lock); |
futex_down(&fs_head_futex); |
fibril_inc_sercount(); |
/* |
* Check for duplicit registrations. |
191,7 → 215,8 |
* We already register a fs like this. |
*/ |
dprintf("FS is already registered.\n"); |
fibril_mutex_unlock(&fs_head_lock); |
fibril_dec_sercount(); |
futex_up(&fs_head_futex); |
free(fs_info); |
ipc_answer_0(callid, EEXISTS); |
ipc_answer_0(rid, EEXISTS); |
213,7 → 238,8 |
if (IPC_GET_METHOD(call) != IPC_M_CONNECT_TO_ME) { |
dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call)); |
list_remove(&fs_info->fs_link); |
fibril_mutex_unlock(&fs_head_lock); |
fibril_dec_sercount(); |
futex_up(&fs_head_futex); |
free(fs_info); |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
231,7 → 257,8 |
if (!ipc_share_in_receive(&callid, &size)) { |
dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call)); |
list_remove(&fs_info->fs_link); |
fibril_mutex_unlock(&fs_head_lock); |
fibril_dec_sercount(); |
futex_up(&fs_head_futex); |
ipc_hangup(fs_info->phone); |
free(fs_info); |
ipc_answer_0(callid, EINVAL); |
245,7 → 272,8 |
if (size != PLB_SIZE) { |
dprintf("Client suggests wrong size of PFB, size = %d\n", size); |
list_remove(&fs_info->fs_link); |
fibril_mutex_unlock(&fs_head_lock); |
fibril_dec_sercount(); |
futex_up(&fs_head_futex); |
ipc_hangup(fs_info->phone); |
free(fs_info); |
ipc_answer_0(callid, EINVAL); |
269,8 → 297,8 |
fs_info->fs_handle = (fs_handle_t) atomic_postinc(&fs_handle_next); |
ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle); |
fibril_condvar_broadcast(&fs_head_cv); |
fibril_mutex_unlock(&fs_head_lock); |
fibril_dec_sercount(); |
futex_up(&fs_head_futex); |
dprintf("\"%.*s\" filesystem successfully registered, handle=%d.\n", |
FS_NAME_MAXLEN, fs_info->vfs_info.name, fs_info->fs_handle); |
285,49 → 313,76 |
*/ |
int vfs_grab_phone(fs_handle_t handle) |
{ |
int phone; |
/* |
* For now, we don't try to be very clever and very fast. We simply |
* lookup the phone in the fs_head list and duplicate it. The duplicate |
* phone will be returned to the client and the client will use it for |
* communication. In the future, we should cache the connections so |
* that they do not have to be reestablished over and over again. |
* For now, we don't try to be very clever and very fast. |
* We simply lookup the phone in the fs_head list. We currently don't |
* open any additional phones (even though that itself would be pretty |
* straightforward; housekeeping multiple open phones to a FS task would |
* be more demanding). Instead, we simply take the respective |
* phone_futex and keep it until vfs_release_phone(). |
*/ |
fibril_mutex_lock(&fs_head_lock); |
futex_down(&fs_head_futex); |
link_t *cur; |
fs_info_t *fs; |
for (cur = fs_head.next; cur != &fs_head; cur = cur->next) { |
fs = list_get_instance(cur, fs_info_t, fs_link); |
if (fs->fs_handle == handle) { |
fibril_mutex_unlock(&fs_head_lock); |
fibril_mutex_lock(&fs->phone_lock); |
phone = ipc_connect_me_to(fs->phone, 0, 0, 0); |
fibril_mutex_unlock(&fs->phone_lock); |
assert(phone > 0); |
return phone; |
futex_up(&fs_head_futex); |
/* |
* For now, take the futex unconditionally. |
* Oh yeah, serialization rocks. |
* It will be up'ed in vfs_release_phone(). |
*/ |
futex_down(&fs->phone_futex); |
/* |
* Avoid deadlock with other fibrils in the same thread |
* by disabling fibril preemption. |
*/ |
fibril_inc_sercount(); |
return fs->phone; |
} |
} |
fibril_mutex_unlock(&fs_head_lock); |
futex_up(&fs_head_futex); |
return 0; |
} |
/** Tell VFS that the phone is not needed anymore. |
/** Tell VFS that the phone is in use for any request. |
* |
* @param phone Phone to FS task. |
*/ |
void vfs_release_phone(int phone) |
{ |
/* TODO: implement connection caching */ |
ipc_hangup(phone); |
bool found = false; |
/* |
* Undo the fibril_inc_sercount() done in vfs_grab_phone(). |
*/ |
fibril_dec_sercount(); |
futex_down(&fs_head_futex); |
link_t *cur; |
for (cur = fs_head.next; cur != &fs_head; cur = cur->next) { |
fs_info_t *fs = list_get_instance(cur, fs_info_t, fs_link); |
if (fs->phone == phone) { |
found = true; |
futex_up(&fs_head_futex); |
futex_up(&fs->phone_futex); |
return; |
} |
} |
futex_up(&fs_head_futex); |
/* |
* Not good to get here. |
*/ |
assert(found == true); |
} |
/** Convert file system name to its handle. |
* |
* @param name File system name. |
* @param lock If true, the function will lock and unlock the |
* fs_head_lock. |
* @param lock If true, the function will down and up the |
* fs_head_futex. |
* |
* @return File system handle or zero if file system not found. |
*/ |
336,17 → 391,18 |
int handle = 0; |
if (lock) |
fibril_mutex_lock(&fs_head_lock); |
futex_down(&fs_head_futex); |
link_t *cur; |
for (cur = fs_head.next; cur != &fs_head; cur = cur->next) { |
fs_info_t *fs = list_get_instance(cur, fs_info_t, fs_link); |
if (str_cmp(fs->vfs_info.name, name) == 0) { |
if (strncmp(fs->vfs_info.name, name, |
sizeof(fs->vfs_info.name)) == 0) { |
handle = fs->fs_handle; |
break; |
} |
} |
if (lock) |
fibril_mutex_unlock(&fs_head_lock); |
futex_up(&fs_head_futex); |
return handle; |
} |
/branches/arm/uspace/srv/vfs/vfs_node.c |
---|
38,14 → 38,15 |
#include "vfs.h" |
#include <stdlib.h> |
#include <string.h> |
#include <fibril_sync.h> |
#include <adt/hash_table.h> |
#include <futex.h> |
#include <rwlock.h> |
#include <libadt/hash_table.h> |
#include <assert.h> |
#include <async.h> |
#include <errno.h> |
/** Mutex protecting the VFS node hash table. */ |
FIBRIL_MUTEX_INITIALIZE(nodes_mutex); |
/** Futex protecting the VFS node hash table. */ |
futex_t nodes_futex = FUTEX_INITIALIZER; |
#define NODES_BUCKETS_LOG 8 |
#define NODES_BUCKETS (1 << NODES_BUCKETS_LOG) |
88,9 → 89,9 |
*/ |
void vfs_node_addref(vfs_node_t *node) |
{ |
fibril_mutex_lock(&nodes_mutex); |
futex_down(&nodes_futex); |
_vfs_node_addref(node); |
fibril_mutex_unlock(&nodes_mutex); |
futex_up(&nodes_futex); |
} |
/** Decrement reference count of a VFS node. |
104,7 → 105,7 |
bool free_vfs_node = false; |
bool free_fs_node = false; |
fibril_mutex_lock(&nodes_mutex); |
futex_down(&nodes_futex); |
if (node->refcnt-- == 1) { |
/* |
* We are dropping the last reference to this node. |
120,7 → 121,7 |
if (!node->lnkcnt) |
free_fs_node = true; |
} |
fibril_mutex_unlock(&nodes_mutex); |
futex_up(&nodes_futex); |
if (free_fs_node) { |
/* |
129,7 → 130,7 |
*/ |
int phone = vfs_grab_phone(node->fs_handle); |
ipcarg_t rc; |
rc = async_req_2_0(phone, VFS_OUT_DESTROY, |
rc = async_req_2_0(phone, VFS_DESTROY, |
(ipcarg_t)node->dev_handle, (ipcarg_t)node->index); |
assert(rc == EOK); |
vfs_release_phone(phone); |
160,12 → 161,12 |
link_t *tmp; |
vfs_node_t *node; |
fibril_mutex_lock(&nodes_mutex); |
futex_down(&nodes_futex); |
tmp = hash_table_find(&nodes, key); |
if (!tmp) { |
node = (vfs_node_t *) malloc(sizeof(vfs_node_t)); |
if (!node) { |
fibril_mutex_unlock(&nodes_mutex); |
futex_up(&nodes_futex); |
return NULL; |
} |
memset(node, 0, sizeof(vfs_node_t)); |
174,25 → 175,18 |
node->index = result->triplet.index; |
node->size = result->size; |
node->lnkcnt = result->lnkcnt; |
node->type = result->type; |
link_initialize(&node->nh_link); |
fibril_rwlock_initialize(&node->contents_rwlock); |
rwlock_initialize(&node->contents_rwlock); |
hash_table_insert(&nodes, key, &node->nh_link); |
} else { |
node = hash_table_get_instance(tmp, vfs_node_t, nh_link); |
if (node->type == VFS_NODE_UNKNOWN && |
result->type != VFS_NODE_UNKNOWN) { |
/* Upgrade the node type. */ |
node->type = result->type; |
} |
node = hash_table_get_instance(tmp, vfs_node_t, nh_link); |
} |
assert(node->size == result->size); |
assert(node->lnkcnt == result->lnkcnt); |
assert(node->type == result->type || result->type == VFS_NODE_UNKNOWN); |
_vfs_node_addref(node); |
fibril_mutex_unlock(&nodes_mutex); |
futex_up(&nodes_futex); |
return node; |
} |
232,4 → 226,4 |
/** |
* @} |
*/ |
*/ |
/branches/arm/uspace/srv/rd/rd.c |
---|
0,0 → 1,300 |
/* |
* Copyright (c) 2007 Michal Konopa |
* Copyright (c) 2007 Martin Jelen |
* Copyright (c) 2007 Peter Majer |
* Copyright (c) 2007 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup rd |
* @{ |
*/ |
/** |
* @file rd.c |
* @brief Initial RAM disk for HelenOS. |
*/ |
#include <ipc/ipc.h> |
#include <ipc/services.h> |
#include <ipc/ns.h> |
#include <sysinfo.h> |
#include <as.h> |
#include <ddi.h> |
#include <align.h> |
#include <bool.h> |
#include <errno.h> |
#include <async.h> |
#include <align.h> |
#include <async.h> |
#include <futex.h> |
#include <stdio.h> |
#include <ipc/devmap.h> |
#include "rd.h" |
#define NAME "rd" |
/** Pointer to the ramdisk's image. */ |
static void *rd_addr; |
/** Size of the ramdisk. */ |
static size_t rd_size; |
/** |
* This futex protects the ramdisk's data. |
* If we were to serve multiple requests (read + write or several writes) |
* concurrently (i.e. from two or more threads), each read and write needs to be |
* protected by this futex. |
*/ |
atomic_t rd_futex = FUTEX_INITIALIZER; |
/** Handle one connection to ramdisk. |
* |
* @param iid Hash of the request that opened the connection. |
* @param icall Call data of the request that opened the connection. |
*/ |
static void rd_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
ipc_callid_t callid; |
ipc_call_t call; |
int retval; |
void *fs_va = NULL; |
off_t offset; |
size_t block_size; |
size_t maxblock_size; |
/* |
* Answer the first IPC_M_CONNECT_ME_TO call. |
*/ |
ipc_answer_0(iid, EOK); |
/* |
* Now we wait for the client to send us its communication as_area. |
*/ |
int flags; |
if (ipc_share_out_receive(&callid, &maxblock_size, &flags)) { |
fs_va = as_get_mappable_page(maxblock_size); |
if (fs_va) { |
(void) ipc_share_out_finalize(callid, fs_va); |
} else { |
ipc_answer_0(callid, EHANGUP); |
return; |
} |
} else { |
/* |
* The client doesn't speak the same protocol. |
* At this point we can't handle protocol variations. |
* Close the connection. |
*/ |
ipc_answer_0(callid, EHANGUP); |
return; |
} |
while (1) { |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
/* |
* The other side has hung up. |
* Answer the message and exit the fibril. |
*/ |
ipc_answer_0(callid, EOK); |
return; |
case RD_READ_BLOCK: |
offset = IPC_GET_ARG1(call); |
block_size = IPC_GET_ARG2(call); |
if (block_size > maxblock_size) { |
/* |
* Maximum block size exceeded. |
*/ |
retval = ELIMIT; |
break; |
} |
if (offset * block_size > rd_size - block_size) { |
/* |
* Reading past the end of the device. |
*/ |
retval = ELIMIT; |
break; |
} |
futex_down(&rd_futex); |
memcpy(fs_va, rd_addr + offset * block_size, block_size); |
futex_up(&rd_futex); |
retval = EOK; |
break; |
case RD_WRITE_BLOCK: |
offset = IPC_GET_ARG1(call); |
block_size = IPC_GET_ARG2(call); |
if (block_size > maxblock_size) { |
/* |
* Maximum block size exceeded. |
*/ |
retval = ELIMIT; |
break; |
} |
if (offset * block_size > rd_size - block_size) { |
/* |
* Writing past the end of the device. |
*/ |
retval = ELIMIT; |
break; |
} |
futex_up(&rd_futex); |
memcpy(rd_addr + offset * block_size, fs_va, block_size); |
futex_down(&rd_futex); |
retval = EOK; |
break; |
default: |
/* |
* The client doesn't speak the same protocol. |
* Instead of closing the connection, we just ignore |
* the call. This can be useful if the client uses a |
* newer version of the protocol. |
*/ |
retval = EINVAL; |
break; |
} |
ipc_answer_0(callid, retval); |
} |
} |
static int driver_register(char *name) |
{ |
ipcarg_t retval; |
aid_t req; |
ipc_call_t answer; |
int phone; |
ipcarg_t callback_phonehash; |
phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_DRIVER, 0); |
while (phone < 0) { |
usleep(10000); |
phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
DEVMAP_DRIVER, 0); |
} |
req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer); |
retval = ipc_data_write_start(phone, (char *) name, strlen(name) + 1); |
if (retval != EOK) { |
async_wait_for(req, NULL); |
return -1; |
} |
async_set_client_connection(rd_connection); |
ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash); |
async_wait_for(req, &retval); |
return phone; |
} |
static int device_register(int driver_phone, char *name, int *handle) |
{ |
ipcarg_t retval; |
aid_t req; |
ipc_call_t answer; |
req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0, &answer); |
retval = ipc_data_write_start(driver_phone, (char *) name, strlen(name) + 1); |
if (retval != EOK) { |
async_wait_for(req, NULL); |
return retval; |
} |
async_wait_for(req, &retval); |
if (handle != NULL) |
*handle = -1; |
if (EOK == retval) { |
if (NULL != handle) |
*handle = (int) IPC_GET_ARG1(answer); |
} |
return retval; |
} |
/** Prepare the ramdisk image for operation. */ |
static bool rd_init(void) |
{ |
rd_size = sysinfo_value("rd.size"); |
void *rd_ph_addr = (void *) sysinfo_value("rd.address.physical"); |
if (rd_size == 0) { |
printf(NAME ": No RAM disk found\n"); |
return false; |
} |
rd_addr = as_get_mappable_page(rd_size); |
int flags = AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE; |
int retval = physmem_map(rd_ph_addr, rd_addr, |
ALIGN_UP(rd_size, PAGE_SIZE) >> PAGE_WIDTH, flags); |
if (retval < 0) { |
printf(NAME ": Error mapping RAM disk\n"); |
return false; |
} |
printf(NAME ": Found RAM disk at %p, %d bytes\n", rd_ph_addr, rd_size); |
int driver_phone = driver_register(NAME); |
if (driver_phone < 0) { |
printf(NAME ": Unable to register driver\n"); |
return false; |
} |
int dev_handle; |
if (EOK != device_register(driver_phone, "initrd", &dev_handle)) { |
ipc_hangup(driver_phone); |
printf(NAME ": Unable to register device\n"); |
return false; |
} |
return true; |
} |
int main(int argc, char **argv) |
{ |
printf(NAME ": HelenOS RAM disk server\n"); |
if (!rd_init()) |
return -1; |
printf(NAME ": Accepting connections\n"); |
async_manager(); |
/* Never reached */ |
return 0; |
} |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/rd/rd.h |
---|
0,0 → 1,50 |
/* |
* Copyright (c) 2007 Michal Konopa |
* Copyright (c) 2007 Martin Jelen |
* Copyright (c) 2007 Peter Majer |
* Copyright (c) 2007 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup rd |
* @{ |
*/ |
/** |
* @file rd.h |
* @brief Initial RAM disk for HelenOS - header |
*/ |
/* Basic constants. */ |
#ifndef RD_RD_H_ |
#define RD_RD_H_ |
#define RD_BASE 1024 |
#define RD_READ_BLOCK (RD_BASE + 1) /**< Method for reading block. */ |
#define RD_WRITE_BLOCK (RD_BASE + 2) /**< Method for writing block. */ |
#endif |
/branches/arm/uspace/srv/rd/Makefile |
---|
0,0 → 1,74 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## Setup toolchain |
# |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
LIBS = $(LIBC_PREFIX)/libc.a |
## Sources |
# |
OUTPUT = rd |
SOURCES = \ |
rd.c |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
.PHONY: all clean depend disasm |
all: $(OUTPUT) $(OUTPUT).disasm |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
%.o: %.s |
$(AS) $(AFLAGS) $< -o $@ |
%.o: %.c |
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@ |
/branches/arm/uspace/srv/fb/serial_console.c |
---|
File deleted |
/branches/arm/uspace/srv/fb/serial_console.h |
---|
File deleted |
/branches/arm/uspace/srv/fb/ski.c |
---|
File deleted |
/branches/arm/uspace/srv/fb/ski.h |
---|
File deleted |
/branches/arm/uspace/srv/fb/sgcn.c |
---|
File deleted |
/branches/arm/uspace/srv/fb/sgcn.h |
---|
File deleted |
\ No newline at end of file |
/branches/arm/uspace/srv/fb/msim.c |
---|
36,17 → 36,29 |
*/ |
#include <async.h> |
#include <ipc/fb.h> |
#include <ipc/ipc.h> |
#include <libc.h> |
#include <errno.h> |
#include <string.h> |
#include <libc.h> |
#include <stdio.h> |
#include <ipc/fb.h> |
#include <sysinfo.h> |
#include <as.h> |
#include <align.h> |
#include <ddi.h> |
#include "serial_console.h" |
#include "msim.h" |
#define WIDTH 80 |
#define HEIGHT 24 |
#define HEIGHT 25 |
#define MAX_CONTROL 20 |
/* Allow only 1 connection */ |
static int client_connected = 0; |
static char *virt_addr; |
static void msim_putc(const char c) |
54,17 → 66,159 |
*virt_addr = c; |
} |
static void msim_puts(char *str) |
{ |
while (*str) |
*virt_addr = *(str++); |
} |
static void msim_clrscr(void) |
{ |
msim_puts("\033[2J"); |
} |
static void msim_goto(const unsigned int row, const unsigned int col) |
{ |
if ((row > HEIGHT) || (col > WIDTH)) |
return; |
char control[MAX_CONTROL]; |
snprintf(control, MAX_CONTROL, "\033[%u;%uf", row + 1, col + 1); |
msim_puts(control); |
} |
static void msim_set_style(const unsigned int mode) |
{ |
char control[MAX_CONTROL]; |
snprintf(control, MAX_CONTROL, "\033[%um", mode); |
msim_puts(control); |
} |
static void msim_cursor_disable(void) |
{ |
msim_puts("\033[?25l"); |
} |
static void msim_cursor_enable(void) |
{ |
msim_puts("\033[?25h"); |
} |
static void msim_scroll(int i) |
{ |
if (i > 0) { |
msim_goto(HEIGHT - 1, 0); |
while (i--) |
msim_puts("\033D"); |
} else if (i < 0) { |
msim_goto(0, 0); |
while (i++) |
msim_puts("\033M"); |
} |
} |
static void msim_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
int retval; |
ipc_callid_t callid; |
ipc_call_t call; |
char c; |
int lastcol = 0; |
int lastrow = 0; |
int newcol; |
int newrow; |
int fgcolor; |
int bgcolor; |
int i; |
if (client_connected) { |
ipc_answer_0(iid, ELIMIT); |
return; |
} |
client_connected = 1; |
ipc_answer_0(iid, EOK); |
/* Clear the terminal, set scrolling region |
to 0 - 25 lines */ |
msim_clrscr(); |
msim_goto(0, 0); |
msim_puts("\033[0;25r"); |
while (true) { |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
client_connected = 0; |
ipc_answer_0(callid, EOK); |
return; |
case FB_PUTCHAR: |
c = IPC_GET_ARG1(call); |
newrow = IPC_GET_ARG2(call); |
newcol = IPC_GET_ARG3(call); |
if ((lastcol != newcol) || (lastrow != newrow)) |
msim_goto(newrow, newcol); |
lastcol = newcol + 1; |
lastrow = newrow; |
msim_putc(c); |
retval = 0; |
break; |
case FB_CURSOR_GOTO: |
newrow = IPC_GET_ARG1(call); |
newcol = IPC_GET_ARG2(call); |
msim_goto(newrow, newcol); |
lastrow = newrow; |
lastcol = newcol; |
retval = 0; |
break; |
case FB_GET_CSIZE: |
ipc_answer_2(callid, EOK, HEIGHT, WIDTH); |
continue; |
case FB_CLEAR: |
msim_clrscr(); |
retval = 0; |
break; |
case FB_SET_STYLE: |
fgcolor = IPC_GET_ARG1(call); |
bgcolor = IPC_GET_ARG2(call); |
if (fgcolor < bgcolor) |
msim_set_style(0); |
else |
msim_set_style(7); |
retval = 0; |
break; |
case FB_SCROLL: |
i = IPC_GET_ARG1(call); |
if ((i > HEIGHT) || (i < -HEIGHT)) { |
retval = EINVAL; |
break; |
} |
msim_scroll(i); |
msim_goto(lastrow, lastcol); |
retval = 0; |
break; |
case FB_CURSOR_VISIBILITY: |
if(IPC_GET_ARG1(call)) |
msim_cursor_enable(); |
else |
msim_cursor_disable(); |
retval = 0; |
break; |
default: |
retval = ENOENT; |
} |
ipc_answer_0(callid, retval); |
} |
} |
int msim_init(void) |
{ |
void *phys_addr = (void *) sysinfo_value("fb.address.physical"); |
virt_addr = (char *) as_get_mappable_page(1); |
if (physmem_map(phys_addr, virt_addr, 1, AS_AREA_READ | AS_AREA_WRITE) != 0) |
return -1; |
physmem_map(phys_addr, virt_addr, 1, AS_AREA_READ | AS_AREA_WRITE); |
serial_console_init(msim_putc, WIDTH, HEIGHT); |
async_set_client_connection(serial_client_connection); |
async_set_client_connection(msim_client_connection); |
return 0; |
} |
/branches/arm/uspace/srv/fb/main.c |
---|
38,8 → 38,6 |
#include "fb.h" |
#include "ega.h" |
#include "msim.h" |
#include "ski.h" |
#include "sgcn.h" |
#include "main.h" |
#define NAME "fb" |
47,7 → 45,7 |
void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area) |
{ |
void *dest; |
dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
if (ipc_answer_1(callid, EOK, (sysarg_t) dest) == 0) { |
if (*area) |
62,12 → 60,12 |
ipcarg_t phonead; |
bool initialized = false; |
#ifdef FB_ENABLED |
if (sysinfo_value("fb.kind") == 1) { |
if (fb_init() == 0) |
initialized = true; |
} |
} |
#endif |
#ifdef EGA_ENABLED |
if ((!initialized) && (sysinfo_value("fb.kind") == 2)) { |
81,28 → 79,15 |
initialized = true; |
} |
#endif |
#ifdef SGCN_ENABLED |
if ((!initialized) && (sysinfo_value("fb.kind") == 4)) { |
if (sgcn_init() == 0) |
initialized = true; |
} |
#endif |
#ifdef SKI_ENABLED |
if ((!initialized) && (sysinfo_value("fb") != true)) { |
if (ski_init() == 0) |
initialized = true; |
} |
#endif |
if (!initialized) |
return -1; |
if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0) |
return -1; |
printf(NAME ": Accepting connections\n"); |
async_manager(); |
/* Never reached */ |
return 0; |
} |
/branches/arm/uspace/srv/fb/Makefile |
---|
31,11 → 31,12 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
LIBS = $(LIBC_PREFIX)/libc.a |
CFLAGS += -I../libipc/include |
LIBS = $(LIBC_PREFIX)/libc.a |
## Sources |
# |
44,45 → 45,27 |
main.c \ |
ppm.c |
ifneq ($(UARCH),ia64) |
ifneq ($(ARCH), ia64) |
SOURCES += fb.c \ |
font-8x16.c |
CFLAGS += -DFB_ENABLED |
endif |
ifeq ($(UARCH),ia32) |
ifeq ($(ARCH), ia32) |
SOURCES += ega.c |
CFLAGS += -DEGA_ENABLED |
endif |
ifeq ($(UARCH),ia64) |
SOURCES += ega.c \ |
ski.c \ |
serial_console.c |
CFLAGS += -DSKI_ENABLED |
CFLAGS += -DEGA_ENABLED |
endif |
ifeq ($(UARCH),amd64) |
ifeq ($(ARCH), amd64) |
SOURCES += ega.c |
CFLAGS += -DEGA_ENABLED |
endif |
ifeq ($(UARCH),mips32) |
SOURCES += msim.c \ |
serial_console.c |
CFLAGS += -DMSIM_ENABLED |
ifeq ($(ARCH), mips32) |
SOURCES += msim.c |
CFLAGS += -DMSIM_ENABLED -DFB_INVERT_ENDIAN |
endif |
ifeq ($(UARCH),sparc64) |
SOURCES += sgcn.c \ |
serial_console.c |
CFLAGS += -DSGCN_ENABLED |
endif |
CFLAGS += -D$(ARCH) |
CFLAGS += -D$(UARCH) |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
.PHONY: all clean depend disasm |
92,18 → 75,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/srv/fb/fb.c |
---|
1,5 → 1,4 |
/* |
* Copyright (c) 2008 Martin Decky |
* Copyright (c) 2006 Jakub Vana |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
30,10 → 29,10 |
/** |
* @defgroup fb Graphical framebuffer |
* @brief HelenOS graphical framebuffer. |
* @brief HelenOS graphical framebuffer. |
* @ingroup fbs |
* @{ |
*/ |
*/ |
/** @file |
*/ |
51,12 → 50,8 |
#include <ipc/services.h> |
#include <kernel/errno.h> |
#include <kernel/genarch/fb/visuals.h> |
#include <io/color.h> |
#include <io/style.h> |
#include <async.h> |
#include <fibril.h> |
#include <bool.h> |
#include <stdio.h> |
#include "font-8x16.h" |
#include "fb.h" |
67,859 → 62,574 |
#include "pointer.xbm" |
#include "pointer_mask.xbm" |
#define DEFAULT_BGCOLOR 0xf0f0f0 |
#define DEFAULT_FGCOLOR 0x000000 |
#define DEFAULT_BGCOLOR 0xf0f0f0 |
#define DEFAULT_FGCOLOR 0x0 |
#define GLYPH_UNAVAIL '?' |
/***************************************************************/ |
/* Pixel specific fuctions */ |
#define MAX_ANIM_LEN 8 |
#define MAX_ANIMATIONS 4 |
#define MAX_PIXMAPS 256 /**< Maximum number of saved pixmaps */ |
#define MAX_VIEWPORTS 128 /**< Viewport is a rectangular area on the screen */ |
typedef void (*conv2scr_fn_t)(void *, int); |
typedef int (*conv2rgb_fn_t)(void *); |
/** Function to render a pixel from a RGB value. */ |
typedef void (*rgb_conv_t)(void *, uint32_t); |
struct { |
uint8_t *fbaddress; |
/** Function to render a bit mask. */ |
typedef void (*mask_conv_t)(void *, bool); |
/** Function to draw a glyph. */ |
typedef void (*dg_t)(unsigned int x, unsigned int y, bool cursor, |
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color); |
struct { |
uint8_t *fb_addr; |
unsigned int xres; |
unsigned int yres; |
unsigned int scanline; |
unsigned int glyphscanline; |
unsigned int pixelbytes; |
unsigned int glyphbytes; |
/** Pre-rendered mask for rendering glyphs. Specific for the visual. */ |
uint8_t *glyphs; |
rgb_conv_t rgb_conv; |
mask_conv_t mask_conv; |
unsigned int invert_colors; |
conv2scr_fn_t rgb2scr; |
conv2rgb_fn_t scr2rgb; |
} screen; |
/** Backbuffer character cell. */ |
typedef struct { |
uint32_t glyph; |
uint32_t fg_color; |
uint32_t bg_color; |
} bb_cell_t; |
int initialized; |
unsigned int x, y; |
unsigned int width, height; |
typedef struct { |
bool initialized; |
unsigned int x; |
unsigned int y; |
unsigned int width; |
unsigned int height; |
/* Text support in window */ |
unsigned int cols; |
unsigned int rows; |
/* |
* Style and glyphs for text printing |
*/ |
/** Current attributes. */ |
attr_rgb_t attr; |
uint8_t *bgpixel; |
/** |
* Glyph drawing function for this viewport. Different viewports |
* might use different drawing functions depending on whether their |
* scanlines are aligned on a word boundary. |
*/ |
dg_t dglyph; |
unsigned int rows, cols; |
/* Style for text printing */ |
style_t style; |
/* Auto-cursor position */ |
bool cursor_active; |
unsigned int cur_col; |
unsigned int cur_row; |
bool cursor_shown; |
/* Back buffer */ |
bb_cell_t *backbuf; |
unsigned int bbsize; |
int cursor_active, cur_col, cur_row; |
int cursor_shown; |
/* Double buffering */ |
uint8_t *dbdata; |
unsigned int dboffset; |
unsigned int paused; |
} viewport_t; |
#define MAX_ANIM_LEN 8 |
#define MAX_ANIMATIONS 4 |
typedef struct { |
bool initialized; |
bool enabled; |
int initialized; |
int enabled; |
unsigned int vp; |
unsigned int pos; |
unsigned int animlen; |
unsigned int pixmaps[MAX_ANIM_LEN]; |
} animation_t; |
static animation_t animations[MAX_ANIMATIONS]; |
static bool anims_enabled; |
static int anims_enabled; |
/** Maximum number of saved pixmaps |
* Pixmap is a saved rectangle |
*/ |
#define MAX_PIXMAPS 256 |
typedef struct { |
unsigned int width; |
unsigned int height; |
uint8_t *data; |
} pixmap_t; |
static pixmap_t pixmaps[MAX_PIXMAPS]; |
static pixmap_t pixmaps[MAX_PIXMAPS]; |
/* Viewport is a rectangular area on the screen */ |
#define MAX_VIEWPORTS 128 |
static viewport_t viewports[128]; |
static bool client_connected = false; /**< Allow only 1 connection */ |
/* Allow only 1 connection */ |
static int client_connected = 0; |
static uint32_t color_table[16] = { |
[COLOR_BLACK] = 0x000000, |
[COLOR_BLUE] = 0x0000f0, |
[COLOR_GREEN] = 0x00f000, |
[COLOR_CYAN] = 0x00f0f0, |
[COLOR_RED] = 0xf00000, |
[COLOR_MAGENTA] = 0xf000f0, |
[COLOR_YELLOW] = 0xf0f000, |
[COLOR_WHITE] = 0xf0f0f0, |
[8 + COLOR_BLACK] = 0x000000, |
[8 + COLOR_BLUE] = 0x0000ff, |
[8 + COLOR_GREEN] = 0x00ff00, |
[8 + COLOR_CYAN] = 0x00ffff, |
[8 + COLOR_RED] = 0xff0000, |
[8 + COLOR_MAGENTA] = 0xff00ff, |
[8 + COLOR_YELLOW] = 0xffff00, |
[8 + COLOR_WHITE] = 0xffffff, |
}; |
#define RED(x, bits) ((x >> (16 + 8 - bits)) & ((1 << bits) - 1)) |
#define GREEN(x, bits) ((x >> (8 + 8 - bits)) & ((1 << bits) - 1)) |
#define BLUE(x, bits) ((x >> (8 - bits)) & ((1 << bits) - 1)) |
static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a); |
static int rgb_from_style(attr_rgb_t *rgb, int style); |
static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color, |
ipcarg_t bg_color, ipcarg_t flags); |
#define COL_WIDTH 8 |
#define ROW_BYTES (screen.scanline * FONT_SCANLINES) |
static int fb_set_color(viewport_t *vport, ipcarg_t fg_color, |
ipcarg_t bg_color, ipcarg_t attr); |
#define POINTPOS(x, y) ((y) * screen.scanline + (x) * screen.pixelbytes) |
static void draw_glyph_aligned(unsigned int x, unsigned int y, bool cursor, |
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color); |
static void draw_glyph_fallback(unsigned int x, unsigned int y, bool cursor, |
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color); |
static inline int COLOR(int color) |
{ |
return screen.invert_colors ? ~color : color; |
} |
static void draw_vp_glyph(viewport_t *vport, bool cursor, unsigned int col, |
unsigned int row); |
/* Conversion routines between different color representations */ |
static void |
rgb_byte0888(void *dst, int rgb) |
{ |
*(int *)dst = rgb; |
} |
static int |
byte0888_rgb(void *src) |
{ |
return (*(int *)src) & 0xffffff; |
} |
#define RED(x, bits) ((x >> (8 + 8 + 8 - bits)) & ((1 << bits) - 1)) |
#define GREEN(x, bits) ((x >> (8 + 8 - bits)) & ((1 << bits) - 1)) |
#define BLUE(x, bits) ((x >> (8 - bits)) & ((1 << bits) - 1)) |
static void |
bgr_byte0888(void *dst, int rgb) |
{ |
*((uint32_t *) dst) = BLUE(rgb, 8) << 16 | GREEN(rgb, 8) << 8 | |
RED(rgb, 8); |
} |
#define COL2X(col) ((col) * FONT_WIDTH) |
#define ROW2Y(row) ((row) * FONT_SCANLINES) |
static int |
byte0888_bgr(void *src) |
{ |
int color = *(uint32_t *)(src); |
return ((color & 0xff) << 16) | (((color >> 8) & 0xff) << 8) | |
((color >> 16) & 0xff); |
} |
#define X2COL(x) ((x) / FONT_WIDTH) |
#define Y2ROW(y) ((y) / FONT_SCANLINES) |
static void |
rgb_byte888(void *dst, int rgb) |
{ |
uint8_t *scr = dst; |
#if defined(FB_INVERT_ENDIAN) |
scr[0] = RED(rgb, 8); |
scr[1] = GREEN(rgb, 8); |
scr[2] = BLUE(rgb, 8); |
#else |
scr[2] = RED(rgb, 8); |
scr[1] = GREEN(rgb, 8); |
scr[0] = BLUE(rgb, 8); |
#endif |
} |
#define FB_POS(x, y) ((y) * screen.scanline + (x) * screen.pixelbytes) |
#define BB_POS(vport, col, row) ((row) * vport->cols + (col)) |
#define GLYPH_POS(glyph, y, cursor) (((glyph) + (cursor) * FONT_GLYPHS) * screen.glyphbytes + (y) * screen.glyphscanline) |
/** ARGB 8:8:8:8 conversion |
* |
*/ |
static void rgb_0888(void *dst, uint32_t rgb) |
static int |
byte888_rgb(void *src) |
{ |
*((uint32_t *) dst) = rgb & 0x00ffffff; |
uint8_t *scr = src; |
#if defined(FB_INVERT_ENDIAN) |
return scr[0] << 16 | scr[1] << 8 | scr[2]; |
#else |
return scr[2] << 16 | scr[1] << 8 | scr[0]; |
#endif |
} |
static void mask_0888(void *dst, bool mask) |
/** 16-bit depth (5:5:5) */ |
static void |
rgb_byte555(void *dst, int rgb) |
{ |
*((uint32_t *) dst) = (mask ? 0x00ffffff : 0); |
/* 5-bit, 5-bits, 5-bits */ |
*((uint16_t *)(dst)) = RED(rgb, 5) << 10 | GREEN(rgb, 5) << 5 | |
BLUE(rgb, 5); |
} |
/** ABGR 8:8:8:8 conversion |
* |
*/ |
static void bgr_0888(void *dst, uint32_t rgb) |
/** 16-bit depth (5:5:5) */ |
static int |
byte555_rgb(void *src) |
{ |
*((uint32_t *) dst) |
= (BLUE(rgb, 8) << 16) | (GREEN(rgb, 8) << 8) | RED(rgb, 8); |
int color = *(uint16_t *)(src); |
return (((color >> 10) & 0x1f) << (16 + 3)) | |
(((color >> 5) & 0x1f) << (8 + 3)) | ((color & 0x1f) << 3); |
} |
static void rgb_8880(void *dst, uint32_t rgb) |
/** 16-bit depth (5:6:5) */ |
static void |
rgb_byte565(void *dst, int rgb) |
{ |
*((uint32_t *) dst) |
= (RED(rgb, 8) << 24) | (GREEN(rgb, 8) << 16) | BLUE(rgb, 8) << 8; |
/* 5-bit, 6-bits, 5-bits */ |
*((uint16_t *)(dst)) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 | |
BLUE(rgb, 5); |
} |
static void mask_8880(void *dst, bool mask) |
/** 16-bit depth (5:6:5) */ |
static int |
byte565_rgb(void *src) |
{ |
*((uint32_t *) dst) = (mask ? 0xffffff00 : 0); |
int color = *(uint16_t *)(src); |
return (((color >> 11) & 0x1f) << (16 + 3)) | |
(((color >> 5) & 0x3f) << (8 + 2)) | ((color & 0x1f) << 3); |
} |
/** RGB 8:8:8 conversion |
* |
*/ |
static void rgb_888(void *dst, uint32_t rgb) |
/** Put pixel - 8-bit depth (3:2:3) */ |
static void |
rgb_byte8(void *dst, int rgb) |
{ |
((uint8_t *) dst)[0] = BLUE(rgb, 8); |
((uint8_t *) dst)[1] = GREEN(rgb, 8); |
((uint8_t *) dst)[2] = RED(rgb, 8); |
*(uint8_t *)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3); |
} |
static void mask_888(void *dst, bool mask) |
/** Return pixel color - 8-bit depth (3:2:3) */ |
static int |
byte8_rgb(void *src) |
{ |
if (mask) { |
((uint8_t *) dst)[0] = 0xff; |
((uint8_t *) dst)[1] = 0xff; |
((uint8_t *) dst)[2] = 0xff; |
} else { |
((uint8_t *) dst)[0] = 0; |
((uint8_t *) dst)[1] = 0; |
((uint8_t *) dst)[2] = 0; |
} |
int color = *(uint8_t *)src; |
return (((color >> 5) & 0x7) << (16 + 5)) | |
(((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5); |
} |
/** BGR 8:8:8 conversion |
/** Put pixel into viewport |
* |
* @param vport Viewport identification |
* @param x X coord relative to viewport |
* @param y Y coord relative to viewport |
* @param color RGB color |
*/ |
static void bgr_888(void *dst, uint32_t rgb) |
static void |
putpixel(viewport_t *vport, unsigned int x, unsigned int y, int color) |
{ |
((uint8_t *) dst)[0] = RED(rgb, 8); |
((uint8_t *) dst)[1] = GREEN(rgb, 8); |
((uint8_t *) dst)[2] = BLUE(rgb, 8); |
} |
int dx = vport->x + x; |
int dy = vport->y + y; |
if (! (vport->paused && vport->dbdata)) |
(*screen.rgb2scr)(&screen.fbaddress[POINTPOS(dx,dy)], |
COLOR(color)); |
/** RGB 5:5:5 conversion |
* |
*/ |
static void rgb_555(void *dst, uint32_t rgb) |
{ |
*((uint16_t *) dst) |
= (RED(rgb, 5) << 10) | (GREEN(rgb, 5) << 5) | BLUE(rgb, 5); |
if (vport->dbdata) { |
int dline = (y + vport->dboffset) % vport->height; |
int doffset = screen.pixelbytes * (dline * vport->width + x); |
(*screen.rgb2scr)(&vport->dbdata[doffset], COLOR(color)); |
} |
} |
static void mask_555(void *dst, bool mask) |
/** Get pixel from viewport */ |
static int |
getpixel(viewport_t *vport, unsigned int x, unsigned int y) |
{ |
*((uint16_t *) dst) = (mask ? 0x7fff : 0); |
int dx = vport->x + x; |
int dy = vport->y + y; |
return COLOR((*screen.scr2rgb)(&screen.fbaddress[POINTPOS(dx, dy)])); |
} |
/** RGB 5:6:5 conversion |
* |
*/ |
static void rgb_565(void *dst, uint32_t rgb) |
static inline void |
putpixel_mem(char *mem, unsigned int x, unsigned int y, int color) |
{ |
*((uint16_t *) dst) |
= (RED(rgb, 5) << 11) | (GREEN(rgb, 6) << 5) | BLUE(rgb, 5); |
(*screen.rgb2scr)(&mem[POINTPOS(x, y)], COLOR(color)); |
} |
static void mask_565(void *dst, bool mask) |
static void |
draw_rectangle(viewport_t *vport, unsigned int sx, unsigned int sy, |
unsigned int width, unsigned int height, int color) |
{ |
*((uint16_t *) dst) = (mask ? 0xffff : 0); |
} |
unsigned int x, y; |
static void *tmpline; |
if (!tmpline) |
tmpline = malloc(screen.scanline * screen.pixelbytes); |
/** RGB 3:2:3 |
* |
*/ |
static void rgb_323(void *dst, uint32_t rgb) |
{ |
*((uint8_t *) dst) |
= ~((RED(rgb, 3) << 5) | (GREEN(rgb, 2) << 3) | BLUE(rgb, 3)); |
/* Clear first line */ |
for (x = 0; x < width; x++) |
putpixel_mem(tmpline, x, 0, color); |
if (!vport->paused) { |
/* Recompute to screen coords */ |
sx += vport->x; |
sy += vport->y; |
/* Copy the rest */ |
for (y = sy;y < sy+height; y++) |
memcpy(&screen.fbaddress[POINTPOS(sx,y)], tmpline, |
screen.pixelbytes * width); |
} |
if (vport->dbdata) { |
for (y = sy; y < sy + height; y++) { |
int rline = (y + vport->dboffset) % vport->height; |
int rpos = (rline * vport->width + sx) * |
screen.pixelbytes; |
memcpy(&vport->dbdata[rpos], tmpline, |
screen.pixelbytes * width); |
} |
} |
} |
static void mask_323(void *dst, bool mask) |
/** Fill viewport with background color */ |
static void |
clear_port(viewport_t *vport) |
{ |
*((uint8_t *) dst) = (mask ? 0xff : 0); |
draw_rectangle(vport, 0, 0, vport->width, vport->height, |
vport->style.bg_color); |
} |
/** Draw a filled rectangle. |
/** Scroll unbuffered viewport up/down |
* |
* @note Need real implementation that does not access VRAM twice. |
* |
* @param vport Viewport to scroll |
* @param lines Positive number - scroll up, negative - scroll down |
*/ |
static void draw_filled_rect(unsigned int x0, unsigned int y0, unsigned int x1, |
unsigned int y1, uint32_t color) |
static void |
scroll_port_nodb(viewport_t *vport, int lines) |
{ |
unsigned int x; |
unsigned int y; |
unsigned int copy_bytes; |
uint8_t *sp; |
uint8_t *dp; |
uint8_t cbuf[4]; |
if ((y0 >= y1) || (x0 >= x1)) |
return; |
screen.rgb_conv(cbuf, color); |
sp = &screen.fb_addr[FB_POS(x0, y0)]; |
dp = sp; |
/* Draw the first line. */ |
for (x = x0; x < x1; x++) { |
memcpy(dp, cbuf, screen.pixelbytes); |
dp += screen.pixelbytes; |
int y; |
if (lines > 0) { |
for (y = vport->y; y < vport->y+vport->height - lines; y++) |
memcpy(&screen.fbaddress[POINTPOS(vport->x,y)], |
&screen.fbaddress[POINTPOS(vport->x,y + lines)], |
screen.pixelbytes * vport->width); |
draw_rectangle(vport, 0, vport->height - lines, vport->width, |
lines, vport->style.bg_color); |
} else if (lines < 0) { |
lines = -lines; |
for (y = vport->y + vport->height-1; y >= vport->y + lines; y--) |
memcpy(&screen.fbaddress[POINTPOS(vport->x,y)], |
&screen.fbaddress[POINTPOS(vport->x,y - lines)], |
screen.pixelbytes * vport->width); |
draw_rectangle(vport, 0, 0, vport->width, lines, |
vport->style.bg_color); |
} |
dp = sp + screen.scanline; |
copy_bytes = (x1 - x0) * screen.pixelbytes; |
/* Draw the remaining lines by copying. */ |
for (y = y0 + 1; y < y1; y++) { |
memcpy(dp, sp, copy_bytes); |
dp += screen.scanline; |
} |
/** Refresh given viewport from double buffer */ |
static void |
refresh_viewport_db(viewport_t *vport) |
{ |
unsigned int y, srcy, srcoff, dsty, dstx; |
for (y = 0; y < vport->height; y++) { |
srcy = (y + vport->dboffset) % vport->height; |
srcoff = (vport->width * srcy) * screen.pixelbytes; |
dstx = vport->x; |
dsty = vport->y + y; |
memcpy(&screen.fbaddress[POINTPOS(dstx,dsty)], |
&vport->dbdata[srcoff], vport->width * screen.pixelbytes); |
} |
} |
/** Redraw viewport. |
* |
* @param vport Viewport to redraw |
* |
*/ |
static void vport_redraw(viewport_t *vport) |
/** Scroll viewport that has double buffering enabled */ |
static void |
scroll_port_db(viewport_t *vport, int lines) |
{ |
unsigned int col; |
unsigned int row; |
for (row = 0; row < vport->rows; row++) { |
for (col = 0; col < vport->cols; col++) { |
draw_vp_glyph(vport, false, col, row); |
} |
++vport->paused; |
if (lines > 0) { |
draw_rectangle(vport, 0, 0, vport->width, lines, |
vport->style.bg_color); |
vport->dboffset += lines; |
vport->dboffset %= vport->height; |
} else if (lines < 0) { |
lines = -lines; |
draw_rectangle(vport, 0, vport->height-lines, vport->width, |
lines, vport->style.bg_color); |
if (vport->dboffset < lines) |
vport->dboffset += vport->height; |
vport->dboffset -= lines; |
} |
if (COL2X(vport->cols) < vport->width) { |
draw_filled_rect( |
vport->x + COL2X(vport->cols), vport->y, |
vport->x + vport->width, vport->y + vport->height, |
vport->attr.bg_color); |
} |
--vport->paused; |
if (ROW2Y(vport->rows) < vport->height) { |
draw_filled_rect( |
vport->x, vport->y + ROW2Y(vport->rows), |
vport->x + vport->width, vport->y + vport->height, |
vport->attr.bg_color); |
} |
refresh_viewport_db(vport); |
} |
static void backbuf_clear(bb_cell_t *backbuf, size_t len, uint32_t fg_color, |
uint32_t bg_color) |
/** Scrolls viewport given number of lines */ |
static void |
scroll_port(viewport_t *vport, int lines) |
{ |
size_t i; |
if (vport->dbdata) |
scroll_port_db(vport, lines); |
else |
scroll_port_nodb(vport, lines); |
for (i = 0; i < len; i++) { |
backbuf[i].glyph = 0; |
backbuf[i].fg_color = fg_color; |
backbuf[i].bg_color = bg_color; |
} |
} |
/** Clear viewport. |
* |
* @param vport Viewport to clear |
* |
*/ |
static void vport_clear(viewport_t *vport) |
static void |
invert_pixel(viewport_t *vport, unsigned int x, unsigned int y) |
{ |
backbuf_clear(vport->backbuf, vport->cols * vport->rows, |
vport->attr.fg_color, vport->attr.bg_color); |
vport_redraw(vport); |
putpixel(vport, x, y, ~getpixel(vport, x, y)); |
} |
/** Scroll viewport by the specified number of lines. |
/***************************************************************/ |
/* Character-console functions */ |
/** Draw character at given position |
* |
* @param vport Viewport to scroll |
* @param lines Number of lines to scroll |
* |
* @param vport Viewport where the character is printed |
* @param sx Coordinates of top-left of the character |
* @param sy Coordinates of top-left of the character |
* @param style Color of the character |
* @param transparent If false, print background color |
*/ |
static void vport_scroll(viewport_t *vport, int lines) |
static void |
draw_glyph(viewport_t *vport,uint8_t glyph, unsigned int sx, unsigned int sy, |
style_t style, int transparent) |
{ |
unsigned int col; |
unsigned int row; |
unsigned int x; |
int i; |
unsigned int y; |
uint32_t glyph; |
uint32_t fg_color; |
uint32_t bg_color; |
bb_cell_t *bbp; |
bb_cell_t *xbp; |
/* |
* Redraw. |
*/ |
y = vport->y; |
for (row = 0; row < vport->rows; row++) { |
x = vport->x; |
for (col = 0; col < vport->cols; col++) { |
if (((int) row + lines >= 0) && |
((int) row + lines < (int) vport->rows)) { |
xbp = &vport->backbuf[BB_POS(vport, col, row + lines)]; |
bbp = &vport->backbuf[BB_POS(vport, col, row)]; |
glyph = xbp->glyph; |
fg_color = xbp->fg_color; |
bg_color = xbp->bg_color; |
if ((bbp->glyph == glyph) |
&& (bbp->fg_color == xbp->fg_color) |
&& (bbp->bg_color == xbp->bg_color)) { |
x += FONT_WIDTH; |
continue; |
} |
} else { |
glyph = 0; |
fg_color = vport->attr.fg_color; |
bg_color = vport->attr.bg_color; |
} |
(*vport->dglyph)(x, y, false, screen.glyphs, glyph, |
fg_color, bg_color); |
x += FONT_WIDTH; |
unsigned int glline; |
for (y = 0; y < FONT_SCANLINES; y++) { |
glline = fb_font[glyph * FONT_SCANLINES + y]; |
for (i = 0; i < 8; i++) { |
if (glline & (1 << (7 - i))) |
putpixel(vport, sx + i, sy + y, style.fg_color); |
else if (!transparent) |
putpixel(vport, sx + i, sy + y, style.bg_color); |
} |
y += FONT_SCANLINES; |
} |
/* |
* Scroll backbuffer. |
*/ |
if (lines > 0) { |
memmove(vport->backbuf, vport->backbuf + vport->cols * lines, |
vport->cols * (vport->rows - lines) * sizeof(bb_cell_t)); |
backbuf_clear(&vport->backbuf[BB_POS(vport, 0, vport->rows - lines)], |
vport->cols * lines, vport->attr.fg_color, vport->attr.bg_color); |
} else { |
memmove(vport->backbuf - vport->cols * lines, vport->backbuf, |
vport->cols * (vport->rows + lines) * sizeof(bb_cell_t)); |
backbuf_clear(vport->backbuf, - vport->cols * lines, |
vport->attr.fg_color, vport->attr.bg_color); |
} |
} |
/** Render glyphs |
* |
* Convert glyphs from device independent font |
* description to current visual representation. |
* |
*/ |
static void render_glyphs(void) |
/** Invert character at given position */ |
static void |
invert_char(viewport_t *vport,unsigned int row, unsigned int col) |
{ |
unsigned int glyph; |
for (glyph = 0; glyph < FONT_GLYPHS; glyph++) { |
unsigned int y; |
for (y = 0; y < FONT_SCANLINES; y++) { |
unsigned int x; |
for (x = 0; x < FONT_WIDTH; x++) { |
screen.mask_conv(&screen.glyphs[GLYPH_POS(glyph, y, false) + x * screen.pixelbytes], |
(fb_font[glyph][y] & (1 << (7 - x))) ? true : false); |
screen.mask_conv(&screen.glyphs[GLYPH_POS(glyph, y, true) + x * screen.pixelbytes], |
(fb_font[glyph][y] & (1 << (7 - x))) ? false : true); |
} |
} |
} |
unsigned int x; |
unsigned int y; |
for (x = 0; x < COL_WIDTH; x++) |
for (y = 0; y < FONT_SCANLINES; y++) |
invert_pixel(vport, col * COL_WIDTH + x, row * |
FONT_SCANLINES + y); |
} |
/***************************************************************/ |
/* Stdout specific functions */ |
/** Create new viewport |
* |
* @param x Origin of the viewport (x). |
* @param y Origin of the viewport (y). |
* @param width Width of the viewport. |
* @param height Height of the viewport. |
* |
* @return New viewport number. |
* |
* @return New viewport number |
*/ |
static int vport_create(unsigned int x, unsigned int y, |
unsigned int width, unsigned int height) |
static int |
viewport_create(unsigned int x, unsigned int y,unsigned int width, |
unsigned int height) |
{ |
unsigned int i; |
int i; |
for (i = 0; i < MAX_VIEWPORTS; i++) { |
if (!viewports[i].initialized) |
break; |
} |
if (i == MAX_VIEWPORTS) |
return ELIMIT; |
unsigned int cols = width / FONT_WIDTH; |
unsigned int rows = height / FONT_SCANLINES; |
unsigned int bbsize = cols * rows * sizeof(bb_cell_t); |
unsigned int word_size = sizeof(unsigned long); |
bb_cell_t *backbuf = (bb_cell_t *) malloc(bbsize); |
if (!backbuf) |
return ENOMEM; |
uint8_t *bgpixel = (uint8_t *) malloc(screen.pixelbytes); |
if (!bgpixel) { |
free(backbuf); |
return ENOMEM; |
} |
backbuf_clear(backbuf, cols * rows, DEFAULT_FGCOLOR, DEFAULT_BGCOLOR); |
memset(bgpixel, 0, screen.pixelbytes); |
viewports[i].x = x; |
viewports[i].y = y; |
viewports[i].width = width; |
viewports[i].height = height; |
viewports[i].cols = cols; |
viewports[i].rows = rows; |
viewports[i].rows = height / FONT_SCANLINES; |
viewports[i].cols = width / COL_WIDTH; |
viewports[i].style.bg_color = DEFAULT_BGCOLOR; |
viewports[i].style.fg_color = DEFAULT_FGCOLOR; |
viewports[i].attr.bg_color = DEFAULT_BGCOLOR; |
viewports[i].attr.fg_color = DEFAULT_FGCOLOR; |
viewports[i].bgpixel = bgpixel; |
/* |
* Conditions necessary to select aligned version: |
* - word size is divisible by pixelbytes |
* - cell scanline size is divisible by word size |
* - cell scanlines are word-aligned |
* |
*/ |
if (((word_size % screen.pixelbytes) == 0) |
&& ((FONT_WIDTH * screen.pixelbytes) % word_size == 0) |
&& ((x * screen.pixelbytes) % word_size == 0) |
&& (screen.scanline % word_size == 0)) { |
viewports[i].dglyph = draw_glyph_aligned; |
} else { |
viewports[i].dglyph = draw_glyph_fallback; |
} |
viewports[i].cur_col = 0; |
viewports[i].cur_row = 0; |
viewports[i].cursor_active = false; |
viewports[i].cursor_shown = false; |
viewports[i].bbsize = bbsize; |
viewports[i].backbuf = backbuf; |
viewports[i].initialized = true; |
screen.rgb_conv(viewports[i].bgpixel, viewports[i].attr.bg_color); |
viewports[i].cursor_active = 0; |
viewports[i].initialized = 1; |
return i; |
} |
/** Initialize framebuffer as a chardev output device |
* |
* @param addr Address of the framebuffer |
* @param xres Screen width in pixels |
* @param yres Screen height in pixels |
* @param visual Bits per pixel (8, 16, 24, 32) |
* @param scan Bytes per one scanline |
* @param addr Address of theframebuffer |
* @param xres Screen width in pixels |
* @param yres Screen height in pixels |
* @param visual Bits per pixel (8, 16, 24, 32) |
* @param scan Bytes per one scanline |
* @param invert_colors Inverted colors. |
* |
*/ |
static bool screen_init(void *addr, unsigned int xres, unsigned int yres, |
unsigned int scan, unsigned int visual) |
static bool |
screen_init(void *addr, unsigned int xres, unsigned int yres, |
unsigned int scan, unsigned int visual, bool invert_colors) |
{ |
switch (visual) { |
case VISUAL_INDIRECT_8: |
screen.rgb_conv = rgb_323; |
screen.mask_conv = mask_323; |
screen.rgb2scr = rgb_byte8; |
screen.scr2rgb = byte8_rgb; |
screen.pixelbytes = 1; |
break; |
case VISUAL_RGB_5_5_5: |
screen.rgb_conv = rgb_555; |
screen.mask_conv = mask_555; |
screen.rgb2scr = rgb_byte555; |
screen.scr2rgb = byte555_rgb; |
screen.pixelbytes = 2; |
break; |
case VISUAL_RGB_5_6_5: |
screen.rgb_conv = rgb_565; |
screen.mask_conv = mask_565; |
screen.rgb2scr = rgb_byte565; |
screen.scr2rgb = byte565_rgb; |
screen.pixelbytes = 2; |
break; |
case VISUAL_RGB_8_8_8: |
screen.rgb_conv = rgb_888; |
screen.mask_conv = mask_888; |
screen.rgb2scr = rgb_byte888; |
screen.scr2rgb = byte888_rgb; |
screen.pixelbytes = 3; |
break; |
case VISUAL_BGR_8_8_8: |
screen.rgb_conv = bgr_888; |
screen.mask_conv = mask_888; |
screen.pixelbytes = 3; |
break; |
case VISUAL_RGB_8_8_8_0: |
screen.rgb_conv = rgb_8880; |
screen.mask_conv = mask_8880; |
screen.rgb2scr = rgb_byte888; |
screen.scr2rgb = byte888_rgb; |
screen.pixelbytes = 4; |
break; |
case VISUAL_RGB_0_8_8_8: |
screen.rgb_conv = rgb_0888; |
screen.mask_conv = mask_0888; |
screen.rgb2scr = rgb_byte0888; |
screen.scr2rgb = byte0888_rgb; |
screen.pixelbytes = 4; |
break; |
case VISUAL_BGR_0_8_8_8: |
screen.rgb_conv = bgr_0888; |
screen.mask_conv = mask_0888; |
screen.rgb2scr = bgr_byte0888; |
screen.scr2rgb = byte0888_bgr; |
screen.pixelbytes = 4; |
break; |
default: |
return false; |
} |
screen.fb_addr = (unsigned char *) addr; |
screen.fbaddress = (unsigned char *) addr; |
screen.xres = xres; |
screen.yres = yres; |
screen.scanline = scan; |
screen.invert_colors = invert_colors; |
screen.glyphscanline = FONT_WIDTH * screen.pixelbytes; |
screen.glyphbytes = screen.glyphscanline * FONT_SCANLINES; |
size_t glyphsize = 2 * FONT_GLYPHS * screen.glyphbytes; |
uint8_t *glyphs = (uint8_t *) malloc(glyphsize); |
if (!glyphs) |
return false; |
memset(glyphs, 0, glyphsize); |
screen.glyphs = glyphs; |
render_glyphs(); |
/* Create first viewport */ |
vport_create(0, 0, xres, yres); |
viewport_create(0, 0, xres, yres); |
return true; |
} |
/** Draw a glyph, takes advantage of alignment. |
* |
* This version can only be used if the following conditions are met: |
* |
* - word size is divisible by pixelbytes |
* - cell scanline size is divisible by word size |
* - cell scanlines are word-aligned |
* |
* It makes use of the pre-rendered mask to process (possibly) several |
* pixels at once (word size / pixelbytes pixels at a time are processed) |
* making it very fast. Most notably this version is not applicable at 24 bits |
* per pixel. |
* |
* @param x x coordinate of top-left corner on screen. |
* @param y y coordinate of top-left corner on screen. |
* @param cursor Draw glyph with cursor |
* @param glyphs Pointer to font bitmap. |
* @param glyph Code of the glyph to draw. |
* @param fg_color Foreground color. |
* @param bg_color Backgroudn color. |
* |
*/ |
static void draw_glyph_aligned(unsigned int x, unsigned int y, bool cursor, |
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color) |
/** Hide cursor if it is shown */ |
static void |
cursor_hide(viewport_t *vport) |
{ |
unsigned int i; |
unsigned int yd; |
unsigned long fg_buf; |
unsigned long bg_buf; |
unsigned long mask; |
/* |
* Prepare a pair of words, one filled with foreground-color |
* pattern and the other filled with background-color pattern. |
*/ |
for (i = 0; i < sizeof(unsigned long) / screen.pixelbytes; i++) { |
screen.rgb_conv(&((uint8_t *) &fg_buf)[i * screen.pixelbytes], |
fg_color); |
screen.rgb_conv(&((uint8_t *) &bg_buf)[i * screen.pixelbytes], |
bg_color); |
if (vport->cursor_active && vport->cursor_shown) { |
invert_char(vport, vport->cur_row, vport->cur_col); |
vport->cursor_shown = 0; |
} |
/* Pointer to the current position in the mask. */ |
unsigned long *maskp = (unsigned long *) &glyphs[GLYPH_POS(glyph, 0, cursor)]; |
/* Pointer to the current position on the screen. */ |
unsigned long *dp = (unsigned long *) &screen.fb_addr[FB_POS(x, y)]; |
/* Width of the character cell in words. */ |
unsigned int ww = FONT_WIDTH * screen.pixelbytes / sizeof(unsigned long); |
/* Offset to add when moving to another screen scanline. */ |
unsigned int d_add = screen.scanline - FONT_WIDTH * screen.pixelbytes; |
for (yd = 0; yd < FONT_SCANLINES; yd++) { |
/* |
* Now process the cell scanline, combining foreground |
* and background color patters using the pre-rendered mask. |
*/ |
for (i = 0; i < ww; i++) { |
mask = *maskp++; |
*dp++ = (fg_buf & mask) | (bg_buf & ~mask); |
} |
/* Move to the beginning of the next scanline of the cell. */ |
dp = (unsigned long *) ((uint8_t *) dp + d_add); |
} |
} |
/** Draw a glyph, fallback version. |
* |
* This version does not make use of the pre-rendered mask, it uses |
* the font bitmap directly. It works always, but it is slower. |
* |
* @param x x coordinate of top-left corner on screen. |
* @param y y coordinate of top-left corner on screen. |
* @param cursor Draw glyph with cursor |
* @param glyphs Pointer to font bitmap. |
* @param glyph Code of the glyph to draw. |
* @param fg_color Foreground color. |
* @param bg_color Backgroudn color. |
* |
*/ |
void draw_glyph_fallback(unsigned int x, unsigned int y, bool cursor, |
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color) |
/** Show cursor if cursor showing is enabled */ |
static void |
cursor_print(viewport_t *vport) |
{ |
unsigned int i; |
unsigned int j; |
unsigned int yd; |
uint8_t fg_buf[4]; |
uint8_t bg_buf[4]; |
uint8_t *sp; |
uint8_t b; |
/* Pre-render 1x the foreground and background color pixels. */ |
if (cursor) { |
screen.rgb_conv(fg_buf, bg_color); |
screen.rgb_conv(bg_buf, fg_color); |
} else { |
screen.rgb_conv(fg_buf, fg_color); |
screen.rgb_conv(bg_buf, bg_color); |
} |
/* Pointer to the current position on the screen. */ |
uint8_t *dp = (uint8_t *) &screen.fb_addr[FB_POS(x, y)]; |
/* Offset to add when moving to another screen scanline. */ |
unsigned int d_add = screen.scanline - FONT_WIDTH * screen.pixelbytes; |
for (yd = 0; yd < FONT_SCANLINES; yd++) { |
/* Byte containing bits of the glyph scanline. */ |
b = fb_font[glyph][yd]; |
for (i = 0; i < FONT_WIDTH; i++) { |
/* Choose color based on the current bit. */ |
sp = (b & 0x80) ? fg_buf : bg_buf; |
/* Copy the pixel. */ |
for (j = 0; j < screen.pixelbytes; j++) { |
*dp++ = *sp++; |
} |
/* Move to the next bit. */ |
b = b << 1; |
} |
/* Move to the beginning of the next scanline of the cell. */ |
dp += d_add; |
} |
} |
/** Draw glyph at specified position in viewport. |
* |
* @param vport Viewport identification |
* @param cursor Draw glyph with cursor |
* @param col Screen position relative to viewport |
* @param row Screen position relative to viewport |
* |
*/ |
static void draw_vp_glyph(viewport_t *vport, bool cursor, unsigned int col, |
unsigned int row) |
{ |
unsigned int x = vport->x + COL2X(col); |
unsigned int y = vport->y + ROW2Y(row); |
uint32_t glyph = vport->backbuf[BB_POS(vport, col, row)].glyph; |
uint32_t fg_color = vport->backbuf[BB_POS(vport, col, row)].fg_color; |
uint32_t bg_color = vport->backbuf[BB_POS(vport, col, row)].bg_color; |
(*vport->dglyph)(x, y, cursor, screen.glyphs, glyph, |
fg_color, bg_color); |
} |
/** Hide cursor if it is shown |
* |
*/ |
static void cursor_hide(viewport_t *vport) |
{ |
if ((vport->cursor_active) && (vport->cursor_shown)) { |
draw_vp_glyph(vport, false, vport->cur_col, vport->cur_row); |
vport->cursor_shown = false; |
} |
} |
/** Show cursor if cursor showing is enabled |
* |
*/ |
static void cursor_show(viewport_t *vport) |
{ |
/* Do not check for cursor_shown */ |
if (vport->cursor_active) { |
draw_vp_glyph(vport, true, vport->cur_col, vport->cur_row); |
vport->cursor_shown = true; |
invert_char(vport, vport->cur_row, vport->cur_col); |
vport->cursor_shown = 1; |
} |
} |
/** Invert cursor, if it is enabled |
* |
*/ |
static void cursor_blink(viewport_t *vport) |
/** Invert cursor, if it is enabled */ |
static void |
cursor_blink(viewport_t *vport) |
{ |
if (vport->cursor_shown) |
cursor_hide(vport); |
else |
cursor_show(vport); |
cursor_print(vport); |
} |
/** Draw character at given position relative to viewport |
* |
* @param vport Viewport identification |
* @param c Character to draw |
* @param col Screen position relative to viewport |
* @param row Screen position relative to viewport |
* |
/** Draw character at given position relative to viewport |
* |
* @param vport Viewport identification |
* @param c Character to print |
* @param row Screen position relative to viewport |
* @param col Screen position relative to viewport |
* @param transparent If false, print background color with character |
*/ |
static void draw_char(viewport_t *vport, wchar_t c, unsigned int col, unsigned int row) |
static void |
draw_char(viewport_t *vport, char c, unsigned int row, unsigned int col, |
style_t style, int transparent) |
{ |
bb_cell_t *bbp; |
/* Optimize - do not hide cursor if we are going to overwrite it */ |
if (vport->cursor_active && vport->cursor_shown && |
(vport->cur_col != col || vport->cur_row != row)) |
invert_char(vport, vport->cur_row, vport->cur_col); |
/* Do not hide cursor if we are going to overwrite it */ |
if ((vport->cursor_active) && (vport->cursor_shown) && |
((vport->cur_col != col) || (vport->cur_row != row))) |
cursor_hide(vport); |
bbp = &vport->backbuf[BB_POS(vport, col, row)]; |
bbp->glyph = fb_font_glyph(c); |
bbp->fg_color = vport->attr.fg_color; |
bbp->bg_color = vport->attr.bg_color; |
draw_vp_glyph(vport, false, col, row); |
draw_glyph(vport, c, col * COL_WIDTH, row * FONT_SCANLINES, style, |
transparent); |
vport->cur_col = col; |
vport->cur_row = row; |
vport->cur_col++; |
if (vport->cur_col >= vport->cols) { |
vport->cur_col = 0; |
927,97 → 637,65 |
if (vport->cur_row >= vport->rows) |
vport->cur_row--; |
} |
cursor_show(vport); |
cursor_print(vport); |
} |
/** Draw text data to viewport. |
/** Draw text data to viewport |
* |
* @param vport Viewport id |
* @param data Text data. |
* @param x Leftmost column of the area. |
* @param y Topmost row of the area. |
* @param w Number of rows. |
* @param h Number of columns. |
* |
* @param data Text data fitting exactly into viewport |
*/ |
static void draw_text_data(viewport_t *vport, keyfield_t *data, unsigned int x, |
unsigned int y, unsigned int w, unsigned int h) |
static void |
draw_text_data(viewport_t *vport, keyfield_t *data) |
{ |
unsigned int i; |
unsigned int j; |
bb_cell_t *bbp; |
attrs_t *a; |
attr_rgb_t rgb; |
for (j = 0; j < h; j++) { |
for (i = 0; i < w; i++) { |
unsigned int col = x + i; |
unsigned int row = y + j; |
bbp = &vport->backbuf[BB_POS(vport, col, row)]; |
a = &data[j * w + i].attrs; |
rgb_from_attr(&rgb, a); |
bbp->glyph = fb_font_glyph(data[j * w + i].character); |
bbp->fg_color = rgb.fg_color; |
bbp->bg_color = rgb.bg_color; |
draw_vp_glyph(vport, false, col, row); |
} |
int i; |
int col,row; |
clear_port(vport); |
for (i = 0; i < vport->cols * vport->rows; i++) { |
if (data[i].character == ' ' && style_same(data[i].style, |
vport->style)) |
continue; |
col = i % vport->cols; |
row = i / vport->cols; |
draw_glyph(vport, data[i].character, col * COL_WIDTH, row * |
FONT_SCANLINES, data[i].style, style_same(data[i].style, |
vport->style)); |
} |
cursor_show(vport); |
cursor_print(vport); |
} |
static void putpixel_pixmap(void *data, unsigned int x, unsigned int y, uint32_t color) |
/** Return first free pixmap */ |
static int |
find_free_pixmap(void) |
{ |
int pm = *((int *) data); |
pixmap_t *pmap = &pixmaps[pm]; |
unsigned int pos = (y * pmap->width + x) * screen.pixelbytes; |
int i; |
screen.rgb_conv(&pmap->data[pos], color); |
for (i = 0;i < MAX_PIXMAPS;i++) |
if (!pixmaps[i].data) |
return i; |
return -1; |
} |
static void putpixel(void *data, unsigned int x, unsigned int y, uint32_t color) |
static void |
putpixel_pixmap(int pm, unsigned int x, unsigned int y, int color) |
{ |
viewport_t *vport = (viewport_t *) data; |
unsigned int dx = vport->x + x; |
unsigned int dy = vport->y + y; |
screen.rgb_conv(&screen.fb_addr[FB_POS(dx, dy)], color); |
} |
pixmap_t *pmap = &pixmaps[pm]; |
int pos = (y * pmap->width + x) * screen.pixelbytes; |
/** Return first free pixmap |
* |
*/ |
static int find_free_pixmap(void) |
{ |
unsigned int i; |
for (i = 0; i < MAX_PIXMAPS; i++) |
if (!pixmaps[i].data) |
return i; |
return -1; |
(*screen.rgb2scr)(&pmap->data[pos],COLOR(color)); |
} |
/** Create a new pixmap and return appropriate ID |
* |
*/ |
static int shm2pixmap(unsigned char *shm, size_t size) |
/** Create a new pixmap and return appropriate ID */ |
static int |
shm2pixmap(unsigned char *shm, size_t size) |
{ |
int pm; |
pixmap_t *pmap; |
pm = find_free_pixmap(); |
if (pm == -1) |
return ELIMIT; |
pmap = &pixmaps[pm]; |
if (ppm_get_data(shm, size, &pmap->width, &pmap->height)) |
1026,19 → 704,19 |
pmap->data = malloc(pmap->width * pmap->height * screen.pixelbytes); |
if (!pmap->data) |
return ENOMEM; |
ppm_draw(shm, size, 0, 0, pmap->width, pmap->height, putpixel_pixmap, (void *) &pm); |
ppm_draw(shm, size, 0, 0, pmap->width, pmap->height, |
(putpixel_cb_t)putpixel_pixmap, (void *)pm); |
return pm; |
} |
/** Handle shared memory communication calls |
* |
* Protocol for drawing pixmaps: |
* - FB_PREPARE_SHM(client shm identification) |
* - IPC_M_AS_AREA_SEND |
* - FB_DRAW_PPM(startx, starty) |
* - FB_DRAW_PPM(startx,starty) |
* - FB_DROP_SHM |
* |
* Protocol for text drawing |
1046,32 → 724,28 |
* - FB_DRAW_TEXT_DATA |
* |
* @param callid Callid of the current call |
* @param call Current call data |
* @param vp Active viewport |
* @param call Current call data |
* @param vp Active viewport |
* @return 0 if the call was not handled byt this function, 1 otherwise |
* |
* @return false if the call was not handled byt this function, true otherwise |
* |
* Note: this function is not thread-safe, you would have |
* to redefine static variables with fibril_local. |
* |
* note: this function is not threads safe, you would have |
* to redefine static variables with __thread |
*/ |
static bool shm_handle(ipc_callid_t callid, ipc_call_t *call, int vp) |
static int |
shm_handle(ipc_callid_t callid, ipc_call_t *call, int vp) |
{ |
static keyfield_t *interbuffer = NULL; |
static size_t intersize = 0; |
static unsigned char *shm = NULL; |
static ipcarg_t shm_id = 0; |
static size_t shm_size; |
bool handled = true; |
int retval = EOK; |
int handled = 1; |
int retval = 0; |
viewport_t *vport = &viewports[vp]; |
unsigned int x; |
unsigned int y; |
unsigned int w; |
unsigned int h; |
unsigned int x, y; |
switch (IPC_GET_METHOD(*call)) { |
case IPC_M_SHARE_OUT: |
/* We accept one area for data interchange */ |
1078,21 → 752,19 |
if (IPC_GET_ARG1(*call) == shm_id) { |
void *dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
shm_size = IPC_GET_ARG2(*call); |
if (ipc_answer_1(callid, EOK, (sysarg_t) dest)) { |
if (!ipc_answer_1(callid, EOK, (sysarg_t) dest)) |
shm = dest; |
else |
shm_id = 0; |
return false; |
} |
shm = dest; |
if (shm[0] != 'P') |
return false; |
return true; |
while (1) |
; |
return 1; |
} else { |
intersize = IPC_GET_ARG2(*call); |
receive_comm_area(callid, call, (void *) &interbuffer); |
} |
return true; |
return 1; |
case FB_PREPARE_SHM: |
if (shm_id) |
retval = EBUSY; |
1107,7 → 779,7 |
} |
shm_id = 0; |
break; |
case FB_SHM2PIXMAP: |
if (!shm) { |
retval = EINVAL; |
1122,36 → 794,29 |
} |
x = IPC_GET_ARG1(*call); |
y = IPC_GET_ARG2(*call); |
if ((x > vport->width) || (y > vport->height)) { |
if (x > vport->width || y > vport->height) { |
retval = EINVAL; |
break; |
} |
ppm_draw(shm, shm_size, IPC_GET_ARG1(*call), |
IPC_GET_ARG2(*call), vport->width - x, vport->height - y, putpixel, (void *) vport); |
IPC_GET_ARG2(*call), vport->width - x, vport->height - y, |
(putpixel_cb_t)putpixel, vport); |
break; |
case FB_DRAW_TEXT_DATA: |
x = IPC_GET_ARG1(*call); |
y = IPC_GET_ARG2(*call); |
w = IPC_GET_ARG3(*call); |
h = IPC_GET_ARG4(*call); |
if (!interbuffer) { |
retval = EINVAL; |
break; |
} |
if (x + w > vport->cols || y + h > vport->rows) { |
if (intersize < vport->cols * vport->rows * |
sizeof(*interbuffer)) { |
retval = EINVAL; |
break; |
} |
if (intersize < w * h * sizeof(*interbuffer)) { |
retval = EINVAL; |
break; |
} |
draw_text_data(vport, interbuffer, x, y, w, h); |
draw_text_data(vport, interbuffer); |
break; |
default: |
handled = false; |
handled = 0; |
} |
if (handled) |
1159,39 → 824,41 |
return handled; |
} |
static void |
copy_vp_to_pixmap(viewport_t *vport, pixmap_t *pmap) |
{ |
int y; |
int tmp, srcrowsize; |
int realwidth, realheight, realrowsize; |
int width = vport->width; |
int height = vport->height; |
static void copy_vp_to_pixmap(viewport_t *vport, pixmap_t *pmap) |
{ |
unsigned int width = vport->width; |
unsigned int height = vport->height; |
if (width + vport->x > screen.xres) |
width = screen.xres - vport->x; |
if (height + vport->y > screen.yres) |
height = screen.yres - vport->y; |
unsigned int realwidth = pmap->width <= width ? pmap->width : width; |
unsigned int realheight = pmap->height <= height ? pmap->height : height; |
realwidth = pmap->width <= width ? pmap->width : width; |
realheight = pmap->height <= height ? pmap->height : height; |
srcrowsize = vport->width * screen.pixelbytes; |
realrowsize = realwidth * screen.pixelbytes; |
unsigned int srcrowsize = vport->width * screen.pixelbytes; |
unsigned int realrowsize = realwidth * screen.pixelbytes; |
unsigned int y; |
for (y = 0; y < realheight; y++) { |
unsigned int tmp = (vport->y + y) * screen.scanline + vport->x * screen.pixelbytes; |
memcpy(pmap->data + srcrowsize * y, screen.fb_addr + tmp, realrowsize); |
tmp = (vport->y + y) * screen.scanline + |
vport->x * screen.pixelbytes; |
memcpy(pmap->data + srcrowsize * y, screen.fbaddress + tmp, |
realrowsize); |
} |
} |
/** Save viewport to pixmap |
* |
*/ |
static int save_vp_to_pixmap(viewport_t *vport) |
/** Save viewport to pixmap */ |
static int |
save_vp_to_pixmap(viewport_t *vport) |
{ |
int pm; |
pixmap_t *pmap; |
pm = find_free_pixmap(); |
if (pm == -1) |
return ELIMIT; |
1200,60 → 867,58 |
pmap->data = malloc(screen.pixelbytes * vport->width * vport->height); |
if (!pmap->data) |
return ENOMEM; |
pmap->width = vport->width; |
pmap->height = vport->height; |
copy_vp_to_pixmap(vport, pmap); |
return pm; |
} |
/** Draw pixmap on screen |
* |
* @param vp Viewport to draw on |
* @param pm Pixmap identifier |
* |
*/ |
static int draw_pixmap(int vp, int pm) |
{ |
pixmap_t *pmap = &pixmaps[pm]; |
viewport_t *vport = &viewports[vp]; |
unsigned int width = vport->width; |
unsigned int height = vport->height; |
int y; |
int tmp, srcrowsize; |
int realwidth, realheight, realrowsize; |
int width = vport->width; |
int height = vport->height; |
if (width + vport->x > screen.xres) |
width = screen.xres - vport->x; |
if (height + vport->y > screen.yres) |
height = screen.yres - vport->y; |
if (!pmap->data) |
return EINVAL; |
unsigned int realwidth = pmap->width <= width ? pmap->width : width; |
unsigned int realheight = pmap->height <= height ? pmap->height : height; |
unsigned int srcrowsize = vport->width * screen.pixelbytes; |
unsigned int realrowsize = realwidth * screen.pixelbytes; |
unsigned int y; |
realwidth = pmap->width <= width ? pmap->width : width; |
realheight = pmap->height <= height ? pmap->height : height; |
srcrowsize = vport->width * screen.pixelbytes; |
realrowsize = realwidth * screen.pixelbytes; |
for (y = 0; y < realheight; y++) { |
unsigned int tmp = (vport->y + y) * screen.scanline + vport->x * screen.pixelbytes; |
memcpy(screen.fb_addr + tmp, pmap->data + y * srcrowsize, realrowsize); |
tmp = (vport->y + y) * screen.scanline + |
vport->x * screen.pixelbytes; |
memcpy(screen.fbaddress + tmp, pmap->data + y * srcrowsize, |
realrowsize); |
} |
return EOK; |
return 0; |
} |
/** Tick animation one step forward |
* |
*/ |
static void anims_tick(void) |
/** Tick animation one step forward */ |
static void |
anims_tick(void) |
{ |
unsigned int i; |
int i; |
static int counts = 0; |
/* Limit redrawing */ |
1260,38 → 925,39 |
counts = (counts + 1) % 8; |
if (counts) |
return; |
for (i = 0; i < MAX_ANIMATIONS; i++) { |
if ((!animations[i].animlen) || (!animations[i].initialized) || |
(!animations[i].enabled)) |
if (!animations[i].animlen || !animations[i].initialized || |
!animations[i].enabled) |
continue; |
draw_pixmap(animations[i].vp, animations[i].pixmaps[animations[i].pos]); |
animations[i].pos = (animations[i].pos + 1) % animations[i].animlen; |
draw_pixmap(animations[i].vp, |
animations[i].pixmaps[animations[i].pos]); |
animations[i].pos = (animations[i].pos + 1) % |
animations[i].animlen; |
} |
} |
static unsigned int pointer_x; |
static unsigned int pointer_y; |
static bool pointer_shown, pointer_enabled; |
static int pointer_x, pointer_y; |
static int pointer_shown, pointer_enabled; |
static int pointer_vport = -1; |
static int pointer_pixmap = -1; |
static void mouse_show(void) |
static void |
mouse_show(void) |
{ |
int i, j; |
int visibility; |
int color; |
int bytepos; |
if ((pointer_shown) || (!pointer_enabled)) |
if (pointer_shown || !pointer_enabled) |
return; |
/* Save image under the pointer. */ |
/* Save image under the cursor */ |
if (pointer_vport == -1) { |
pointer_vport = vport_create(pointer_x, pointer_y, pointer_width, pointer_height); |
pointer_vport = viewport_create(pointer_x, pointer_y, |
pointer_width, pointer_height); |
if (pointer_vport < 0) |
return; |
} else { |
1298,13 → 964,14 |
viewports[pointer_vport].x = pointer_x; |
viewports[pointer_vport].y = pointer_y; |
} |
if (pointer_pixmap == -1) |
pointer_pixmap = save_vp_to_pixmap(&viewports[pointer_vport]); |
else |
copy_vp_to_pixmap(&viewports[pointer_vport], &pixmaps[pointer_pixmap]); |
/* Draw mouse pointer. */ |
copy_vp_to_pixmap(&viewports[pointer_vport], |
&pixmaps[pointer_pixmap]); |
/* Draw cursor */ |
for (i = 0; i < pointer_height; i++) |
for (j = 0; j < pointer_width; j++) { |
bytepos = i * ((pointer_width - 1) / 8 + 1) + j / 8; |
1322,10 → 989,10 |
pointer_shown = 1; |
} |
static void mouse_hide(void) |
static void |
mouse_hide(void) |
{ |
/* Restore image under the pointer. */ |
/* Restore image under the cursor */ |
if (pointer_shown) { |
draw_pixmap(pointer_vport, pointer_pixmap); |
pointer_shown = 0; |
1332,8 → 999,8 |
} |
} |
static void mouse_move(unsigned int x, unsigned int y) |
static void |
mouse_move(unsigned int x, unsigned int y) |
{ |
mouse_hide(); |
pointer_x = x; |
1341,14 → 1008,14 |
mouse_show(); |
} |
static int anim_handle(ipc_callid_t callid, ipc_call_t *call, int vp) |
static int |
anim_handle(ipc_callid_t callid, ipc_call_t *call, int vp) |
{ |
bool handled = true; |
int retval = EOK; |
int i, nvp; |
int handled = 1; |
int retval = 0; |
int i,nvp; |
int newval; |
switch (IPC_GET_METHOD(*call)) { |
case FB_ANIM_CREATE: |
nvp = IPC_GET_ARG1(*call); |
1438,16 → 1105,14 |
return handled; |
} |
/** Handler for messages concerning pixmap handling */ |
static int |
pixmap_handle(ipc_callid_t callid, ipc_call_t *call, int vp) |
{ |
int handled = 1; |
int retval = 0; |
int i,nvp; |
/** Handler for messages concerning pixmap handling |
* |
*/ |
static int pixmap_handle(ipc_callid_t callid, ipc_call_t *call, int vp) |
{ |
bool handled = true; |
int retval = EOK; |
int i, nvp; |
switch (IPC_GET_METHOD(*call)) { |
case FB_VP_DRAW_PIXMAP: |
nvp = IPC_GET_ARG1(*call); |
1485,7 → 1150,7 |
default: |
handled = 0; |
} |
if (handled) |
ipc_answer_0(callid, retval); |
return handled; |
1492,99 → 1157,35 |
} |
static int rgb_from_style(attr_rgb_t *rgb, int style) |
{ |
switch (style) { |
case STYLE_NORMAL: |
rgb->fg_color = color_table[COLOR_BLACK]; |
rgb->bg_color = color_table[COLOR_WHITE]; |
break; |
case STYLE_EMPHASIS: |
rgb->fg_color = color_table[COLOR_RED]; |
rgb->bg_color = color_table[COLOR_WHITE]; |
break; |
default: |
return EINVAL; |
} |
return EOK; |
} |
static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color, |
ipcarg_t bg_color, ipcarg_t flags) |
{ |
fg_color = (fg_color & 7) | ((flags & CATTR_BRIGHT) ? 8 : 0); |
bg_color = (bg_color & 7) | ((flags & CATTR_BRIGHT) ? 8 : 0); |
rgb->fg_color = color_table[fg_color]; |
rgb->bg_color = color_table[bg_color]; |
return EOK; |
} |
static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a) |
{ |
int rc; |
switch (a->t) { |
case at_style: |
rc = rgb_from_style(rgb, a->a.s.style); |
break; |
case at_idx: |
rc = rgb_from_idx(rgb, a->a.i.fg_color, |
a->a.i.bg_color, a->a.i.flags); |
break; |
case at_rgb: |
*rgb = a->a.r; |
rc = EOK; |
break; |
} |
return rc; |
} |
static int fb_set_style(viewport_t *vport, ipcarg_t style) |
{ |
return rgb_from_style(&vport->attr, (int) style); |
} |
static int fb_set_color(viewport_t *vport, ipcarg_t fg_color, |
ipcarg_t bg_color, ipcarg_t flags) |
{ |
return rgb_from_idx(&vport->attr, fg_color, bg_color, flags); |
} |
/** Function for handling connections to FB |
* |
*/ |
static void fb_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
static void |
fb_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
unsigned int vp = 0; |
viewport_t *vport = &viewports[vp]; |
ipc_callid_t callid; |
ipc_call_t call; |
int retval; |
int i; |
unsigned int row,col; |
char c; |
int vp = 0; |
viewport_t *vport = &viewports[0]; |
if (client_connected) { |
ipc_answer_0(iid, ELIMIT); |
return; |
} |
/* Accept connection */ |
client_connected = true; |
ipc_answer_0(iid, EOK); |
while (true) { |
ipc_callid_t callid; |
ipc_call_t call; |
int retval; |
unsigned int i; |
int scroll; |
wchar_t ch; |
unsigned int col, row; |
if ((vport->cursor_active) || (anims_enabled)) |
client_connected = 1; |
ipc_answer_0(iid, EOK); /* Accept connection */ |
while (1) { |
if (vport->cursor_active || anims_enabled) |
callid = async_get_call_timeout(&call, 250000); |
else |
callid = async_get_call(&call); |
mouse_hide(); |
if (!callid) { |
cursor_blink(vport); |
1592,92 → 1193,105 |
mouse_show(); |
continue; |
} |
if (shm_handle(callid, &call, vp)) |
continue; |
if (pixmap_handle(callid, &call, vp)) |
continue; |
if (anim_handle(callid, &call, vp)) |
continue; |
switch (IPC_GET_METHOD(call)) { |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
client_connected = false; |
/* Cleanup other viewports */ |
client_connected = 0; |
/* cleanup other viewports */ |
for (i = 1; i < MAX_VIEWPORTS; i++) |
vport->initialized = false; |
/* Exit thread */ |
return; |
vport->initialized = 0; |
return; /* Exit thread */ |
case FB_PUTCHAR: |
ch = IPC_GET_ARG1(call); |
col = IPC_GET_ARG2(call); |
row = IPC_GET_ARG3(call); |
if ((col >= vport->cols) || (row >= vport->rows)) { |
case FB_TRANS_PUTCHAR: |
c = IPC_GET_ARG1(call); |
row = IPC_GET_ARG2(call); |
col = IPC_GET_ARG3(call); |
if (row >= vport->rows || col >= vport->cols) { |
retval = EINVAL; |
break; |
} |
ipc_answer_0(callid, EOK); |
draw_char(vport, ch, col, row); |
/* Message already answered */ |
continue; |
draw_char(vport, c, row, col, vport->style, |
IPC_GET_METHOD(call) == FB_TRANS_PUTCHAR); |
continue; /* msg already answered */ |
case FB_CLEAR: |
vport_clear(vport); |
cursor_show(vport); |
retval = EOK; |
clear_port(vport); |
cursor_print(vport); |
retval = 0; |
break; |
case FB_CURSOR_GOTO: |
col = IPC_GET_ARG1(call); |
row = IPC_GET_ARG2(call); |
if ((col >= vport->cols) || (row >= vport->rows)) { |
case FB_CURSOR_GOTO: |
row = IPC_GET_ARG1(call); |
col = IPC_GET_ARG2(call); |
if (row >= vport->rows || col >= vport->cols) { |
retval = EINVAL; |
break; |
} |
retval = EOK; |
retval = 0; |
cursor_hide(vport); |
vport->cur_col = col; |
vport->cur_row = row; |
cursor_show(vport); |
break; |
cursor_print(vport); |
break; |
case FB_CURSOR_VISIBILITY: |
cursor_hide(vport); |
vport->cursor_active = IPC_GET_ARG1(call); |
cursor_show(vport); |
retval = EOK; |
cursor_print(vport); |
retval = 0; |
break; |
case FB_GET_CSIZE: |
ipc_answer_2(callid, EOK, vport->cols, vport->rows); |
ipc_answer_2(callid, EOK, vport->rows, vport->cols); |
continue; |
case FB_GET_COLOR_CAP: |
ipc_answer_1(callid, EOK, FB_CCAP_RGB); |
continue; |
case FB_SCROLL: |
scroll = IPC_GET_ARG1(call); |
if ((scroll > (int) vport->rows) || (scroll < (-(int) vport->rows))) { |
i = IPC_GET_ARG1(call); |
if (i > vport->rows || i < (- (int)vport->rows)) { |
retval = EINVAL; |
break; |
} |
cursor_hide(vport); |
vport_scroll(vport, scroll); |
cursor_show(vport); |
retval = EOK; |
scroll_port(vport, i*FONT_SCANLINES); |
cursor_print(vport); |
retval = 0; |
break; |
case FB_VIEWPORT_DB: |
/* Enable double buffering */ |
i = IPC_GET_ARG1(call); |
if (i == -1) |
i = vp; |
if (i < 0 || i >= MAX_VIEWPORTS) { |
retval = EINVAL; |
break; |
} |
if (!viewports[i].initialized ) { |
retval = EADDRNOTAVAIL; |
break; |
} |
viewports[i].dboffset = 0; |
if (IPC_GET_ARG2(call) == 1 && !viewports[i].dbdata) |
viewports[i].dbdata = |
malloc(screen.pixelbytes * |
viewports[i].width * viewports[i].height); |
else if (IPC_GET_ARG2(call) == 0 && |
viewports[i].dbdata) { |
free(viewports[i].dbdata); |
viewports[i].dbdata = NULL; |
} |
retval = 0; |
break; |
case FB_VIEWPORT_SWITCH: |
i = IPC_GET_ARG1(call); |
if (i >= MAX_VIEWPORTS) { |
if (i < 0 || i >= MAX_VIEWPORTS) { |
retval = EINVAL; |
break; |
} |
if (!viewports[i].initialized) { |
if (! viewports[i].initialized ) { |
retval = EADDRNOTAVAIL; |
break; |
} |
1684,11 → 1298,11 |
cursor_hide(vport); |
vp = i; |
vport = &viewports[vp]; |
cursor_show(vport); |
retval = EOK; |
cursor_print(vport); |
retval = 0; |
break; |
case FB_VIEWPORT_CREATE: |
retval = vport_create(IPC_GET_ARG1(call) >> 16, |
retval = viewport_create(IPC_GET_ARG1(call) >> 16, |
IPC_GET_ARG1(call) & 0xffff, |
IPC_GET_ARG2(call) >> 16, |
IPC_GET_ARG2(call) & 0xffff); |
1695,45 → 1309,34 |
break; |
case FB_VIEWPORT_DELETE: |
i = IPC_GET_ARG1(call); |
if (i >= MAX_VIEWPORTS) { |
if (i < 0 || i >= MAX_VIEWPORTS) { |
retval = EINVAL; |
break; |
} |
if (!viewports[i].initialized) { |
if (! viewports[i].initialized ) { |
retval = EADDRNOTAVAIL; |
break; |
} |
viewports[i].initialized = false; |
if (viewports[i].bgpixel) |
free(viewports[i].bgpixel); |
if (viewports[i].backbuf) |
free(viewports[i].backbuf); |
retval = EOK; |
viewports[i].initialized = 0; |
if (viewports[i].dbdata) { |
free(viewports[i].dbdata); |
viewports[i].dbdata = NULL; |
} |
retval = 0; |
break; |
case FB_SET_STYLE: |
retval = fb_set_style(vport, IPC_GET_ARG1(call)); |
vport->style.fg_color = IPC_GET_ARG1(call); |
vport->style.bg_color = IPC_GET_ARG2(call); |
retval = 0; |
break; |
case FB_SET_COLOR: |
retval = fb_set_color(vport, IPC_GET_ARG1(call), |
IPC_GET_ARG2(call), IPC_GET_ARG3(call)); |
break; |
case FB_SET_RGB_COLOR: |
vport->attr.fg_color = IPC_GET_ARG1(call); |
vport->attr.bg_color = IPC_GET_ARG2(call); |
retval = EOK; |
break; |
case FB_GET_RESOLUTION: |
ipc_answer_2(callid, EOK, screen.xres, screen.yres); |
continue; |
case FB_POINTER_MOVE: |
pointer_enabled = true; |
pointer_enabled = 1; |
mouse_move(IPC_GET_ARG1(call), IPC_GET_ARG2(call)); |
retval = EOK; |
retval = 0; |
break; |
case FB_SCREEN_YIELD: |
case FB_SCREEN_RECLAIM: |
retval = EOK; |
break; |
default: |
retval = ENOENT; |
} |
1741,33 → 1344,41 |
} |
} |
/** Initialization of framebuffer |
* |
*/ |
int fb_init(void) |
/** Initialization of framebuffer */ |
int |
fb_init(void) |
{ |
void *fb_ph_addr; |
unsigned int fb_width; |
unsigned int fb_height; |
unsigned int fb_scanline; |
unsigned int fb_visual; |
bool fb_invert_colors; |
void *fb_addr; |
size_t asz; |
async_set_client_connection(fb_client_connection); |
void *fb_ph_addr = (void *) sysinfo_value("fb.address.physical"); |
unsigned int fb_offset = sysinfo_value("fb.offset"); |
unsigned int fb_width = sysinfo_value("fb.width"); |
unsigned int fb_height = sysinfo_value("fb.height"); |
unsigned int fb_scanline = sysinfo_value("fb.scanline"); |
unsigned int fb_visual = sysinfo_value("fb.visual"); |
unsigned int fbsize = fb_scanline * fb_height; |
void *fb_addr = as_get_mappable_page(fbsize); |
fb_ph_addr = (void *) sysinfo_value("fb.address.physical"); |
fb_width = sysinfo_value("fb.width"); |
fb_height = sysinfo_value("fb.height"); |
fb_scanline = sysinfo_value("fb.scanline"); |
fb_visual = sysinfo_value("fb.visual"); |
fb_invert_colors = sysinfo_value("fb.invert-colors"); |
if (physmem_map(fb_ph_addr + fb_offset, fb_addr, |
ALIGN_UP(fbsize, PAGE_SIZE) >> PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE) != 0) |
return -1; |
asz = fb_scanline * fb_height; |
fb_addr = as_get_mappable_page(asz); |
physmem_map(fb_ph_addr, fb_addr, ALIGN_UP(asz, PAGE_SIZE) >> |
PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE); |
if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual)) |
if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual, |
fb_invert_colors)) |
return 0; |
return -1; |
} |
/** |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/fb/ega.c |
---|
49,9 → 49,6 |
#include <ipc/ns.h> |
#include <ipc/services.h> |
#include <libarch/ddi.h> |
#include <io/style.h> |
#include <io/color.h> |
#include <sys/types.h> |
#include "ega.h" |
#include "../console/screenbuffer.h" |
64,14 → 61,13 |
saved_screen saved_screens[MAX_SAVED_SCREENS]; |
#define EGA_IO_BASE ((ioport8_t *) 0x3d4) |
#define EGA_IO_ADDRESS 0x3d4 |
#define EGA_IO_SIZE 2 |
int ega_normal_color = 0x0f; |
int ega_inverted_color = 0xf0; |
#define NORMAL_COLOR 0x0f |
#define INVERTED_COLOR 0xf0 |
#define NORMAL_COLOR ega_normal_color |
#define INVERTED_COLOR ega_inverted_color |
#define EGA_STYLE(fg,bg) ((fg) > (bg) ? NORMAL_COLOR : INVERTED_COLOR) |
/* Allow only 1 connection */ |
static int client_connected = 0; |
78,16 → 74,13 |
static unsigned int scr_width; |
static unsigned int scr_height; |
static uint8_t *scr_addr; |
static char *scr_addr; |
static unsigned int style; |
static unsigned int style = NORMAL_COLOR; |
static unsigned attr_to_ega_style(const attrs_t *a); |
static uint8_t ega_glyph(wchar_t ch); |
static void clrscr(void) |
{ |
unsigned i; |
int i; |
for (i = 0; i < scr_width * scr_height; i++) { |
scr_addr[i * 2] = ' '; |
95,16 → 88,16 |
} |
} |
static void cursor_goto(unsigned int col, unsigned int row) |
static void cursor_goto(unsigned int row, unsigned int col) |
{ |
int ega_cursor; |
ega_cursor = col + scr_width * row; |
pio_write_8(EGA_IO_BASE, 0xe); |
pio_write_8(EGA_IO_BASE + 1, (ega_cursor >> 8) & 0xff); |
pio_write_8(EGA_IO_BASE, 0xf); |
pio_write_8(EGA_IO_BASE + 1, ega_cursor & 0xff); |
outb(EGA_IO_ADDRESS, 0xe); |
outb(EGA_IO_ADDRESS + 1, (ega_cursor >> 8) & 0xff); |
outb(EGA_IO_ADDRESS, 0xf); |
outb(EGA_IO_ADDRESS + 1, ega_cursor & 0xff); |
} |
static void cursor_disable(void) |
111,10 → 104,10 |
{ |
uint8_t stat; |
pio_write_8(EGA_IO_BASE, 0xa); |
stat = pio_read_8(EGA_IO_BASE + 1); |
pio_write_8(EGA_IO_BASE, 0xa); |
pio_write_8(EGA_IO_BASE + 1, stat | (1 << 5)); |
outb(EGA_IO_ADDRESS, 0xa); |
stat=inb(EGA_IO_ADDRESS + 1); |
outb(EGA_IO_ADDRESS, 0xa); |
outb(EGA_IO_ADDRESS + 1, stat | (1 << 5)); |
} |
static void cursor_enable(void) |
121,24 → 114,23 |
{ |
uint8_t stat; |
pio_write_8(EGA_IO_BASE, 0xa); |
stat = pio_read_8(EGA_IO_BASE + 1); |
pio_write_8(EGA_IO_BASE, 0xa); |
pio_write_8(EGA_IO_BASE + 1, stat & (~(1 << 5))); |
outb(EGA_IO_ADDRESS, 0xa); |
stat=inb(EGA_IO_ADDRESS + 1); |
outb(EGA_IO_ADDRESS, 0xa); |
outb(EGA_IO_ADDRESS + 1, stat & (~(1 << 5))); |
} |
static void scroll(int rows) |
{ |
unsigned i; |
int i; |
if (rows > 0) { |
memmove(scr_addr, ((char *) scr_addr) + rows * scr_width * 2, |
memcpy(scr_addr, ((char *) scr_addr) + rows * scr_width * 2, |
scr_width * scr_height * 2 - rows * scr_width * 2); |
for (i = 0; i < rows * scr_width; i++) |
(((short *) scr_addr) + scr_width * scr_height - rows * |
scr_width)[i] = ((style << 8) + ' '); |
} else if (rows < 0) { |
memmove(((char *)scr_addr) - rows * scr_width * 2, scr_addr, |
memcpy(((char *)scr_addr) - rows * scr_width * 2, scr_addr, |
scr_width * scr_height * 2 + rows * scr_width * 2); |
for (i = 0; i < -rows * scr_width; i++) |
((short *)scr_addr)[i] = ((style << 8 ) + ' '); |
145,38 → 137,22 |
} |
} |
static void printchar(wchar_t c, unsigned int col, unsigned int row) |
static void printchar(char c, unsigned int row, unsigned int col) |
{ |
scr_addr[(row * scr_width + col) * 2] = ega_glyph(c); |
scr_addr[(row * scr_width + col) * 2] = c; |
scr_addr[(row * scr_width + col) * 2 + 1] = style; |
cursor_goto(col + 1, row); |
cursor_goto(row, col + 1); |
} |
/** Draw text data to viewport. |
* |
* @param vport Viewport id |
* @param data Text data. |
* @param x Leftmost column of the area. |
* @param y Topmost row of the area. |
* @param w Number of rows. |
* @param h Number of columns. |
*/ |
static void draw_text_data(keyfield_t *data, unsigned int x, |
unsigned int y, unsigned int w, unsigned int h) |
static void draw_text_data(keyfield_t *data) |
{ |
unsigned int i, j; |
keyfield_t *field; |
uint8_t *dp; |
int i; |
for (j = 0; j < h; j++) { |
for (i = 0; i < w; i++) { |
field = &data[j * w + i]; |
dp = &scr_addr[2 * ((y + j) * scr_width + (x + i))]; |
dp[0] = ega_glyph(field->character); |
dp[1] = attr_to_ega_style(&field->attrs); |
} |
for (i = 0; i < scr_width * scr_height; i++) { |
scr_addr[i * 2] = data[i].character; |
scr_addr[i * 2 + 1] = EGA_STYLE(data[i].style.fg_color, |
data[i].style.bg_color); |
} |
} |
205,72 → 181,15 |
return i; |
} |
static int style_to_ega_style(int style) |
{ |
unsigned int ega_style; |
switch (style) { |
case STYLE_NORMAL: |
ega_style = INVERTED_COLOR; |
break; |
case STYLE_EMPHASIS: |
ega_style = INVERTED_COLOR | 4; |
break; |
default: |
return INVERTED_COLOR; |
} |
return ega_style; |
} |
static unsigned int color_to_ega_style(int fg_color, int bg_color, int attr) |
{ |
unsigned int style; |
style = (fg_color & 7) | ((bg_color & 7) << 4); |
if (attr & CATTR_BRIGHT) |
style = style | 0x08; |
return style; |
} |
static unsigned int rgb_to_ega_style(uint32_t fg, uint32_t bg) |
{ |
return (fg > bg) ? NORMAL_COLOR : INVERTED_COLOR; |
} |
static unsigned attr_to_ega_style(const attrs_t *a) |
{ |
switch (a->t) { |
case at_style: |
return style_to_ega_style(a->a.s.style); |
case at_rgb: |
return rgb_to_ega_style(a->a.r.fg_color, a->a.r.bg_color); |
case at_idx: |
return color_to_ega_style(a->a.i.fg_color, |
a->a.i.bg_color, a->a.i.flags); |
default: |
return INVERTED_COLOR; |
} |
} |
static uint8_t ega_glyph(wchar_t ch) |
{ |
if (ch >= 0 && ch < 128) |
return ch; |
return '?'; |
} |
static void ega_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
int retval; |
ipc_callid_t callid; |
ipc_call_t call; |
wchar_t c; |
unsigned int row, col, w, h; |
int bg_color, fg_color, attr; |
uint32_t bg_rgb, fg_rgb; |
char c; |
unsigned int row, col; |
int bgcolor,fgcolor; |
keyfield_t *interbuf = NULL; |
size_t intersize = 0; |
int i; |
301,27 → 220,16 |
retval = EINVAL; |
break; |
case FB_DRAW_TEXT_DATA: |
col = IPC_GET_ARG1(call); |
row = IPC_GET_ARG2(call); |
w = IPC_GET_ARG3(call); |
h = IPC_GET_ARG4(call); |
if (!interbuf) { |
retval = EINVAL; |
break; |
} |
if (col + w > scr_width || row + h > scr_height) { |
retval = EINVAL; |
break; |
} |
draw_text_data(interbuf, col, row, w, h); |
draw_text_data(interbuf); |
retval = 0; |
break; |
case FB_GET_CSIZE: |
ipc_answer_2(callid, EOK, scr_width, scr_height); |
ipc_answer_2(callid, EOK, scr_height, scr_width); |
continue; |
case FB_GET_COLOR_CAP: |
ipc_answer_1(callid, EOK, FB_CCAP_INDEXED); |
continue; |
case FB_CLEAR: |
clrscr(); |
retval = 0; |
328,28 → 236,28 |
break; |
case FB_PUTCHAR: |
c = IPC_GET_ARG1(call); |
col = IPC_GET_ARG2(call); |
row = IPC_GET_ARG3(call); |
row = IPC_GET_ARG2(call); |
col = IPC_GET_ARG3(call); |
if (col >= scr_width || row >= scr_height) { |
retval = EINVAL; |
break; |
} |
printchar(c, col, row); |
printchar(c, row, col); |
retval = 0; |
break; |
case FB_CURSOR_GOTO: |
col = IPC_GET_ARG1(call); |
row = IPC_GET_ARG2(call); |
row = IPC_GET_ARG1(call); |
col = IPC_GET_ARG2(call); |
if (row >= scr_height || col >= scr_width) { |
retval = EINVAL; |
break; |
} |
cursor_goto(col, row); |
cursor_goto(row, col); |
retval = 0; |
break; |
case FB_SCROLL: |
i = IPC_GET_ARG1(call); |
if (i > (int) scr_height || i < -((int) scr_height)) { |
if (i > scr_height || i < -((int) scr_height)) { |
retval = EINVAL; |
break; |
} |
357,7 → 265,7 |
retval = 0; |
break; |
case FB_CURSOR_VISIBILITY: |
if (IPC_GET_ARG1(call)) |
if(IPC_GET_ARG1(call)) |
cursor_enable(); |
else |
cursor_disable(); |
364,22 → 272,11 |
retval = 0; |
break; |
case FB_SET_STYLE: |
style = style_to_ega_style(IPC_GET_ARG1(call)); |
fgcolor = IPC_GET_ARG1(call); |
bgcolor = IPC_GET_ARG2(call); |
style = EGA_STYLE(fgcolor, bgcolor); |
retval = 0; |
break; |
case FB_SET_COLOR: |
fg_color = IPC_GET_ARG1(call); |
bg_color = IPC_GET_ARG2(call); |
attr = IPC_GET_ARG3(call); |
style = color_to_ega_style(fg_color, bg_color, attr); |
retval = 0; |
break; |
case FB_SET_RGB_COLOR: |
fg_rgb = IPC_GET_ARG1(call); |
bg_rgb = IPC_GET_ARG2(call); |
style = rgb_to_ega_style(fg_rgb, bg_rgb); |
retval = 0; |
break; |
case FB_VP_DRAW_PIXMAP: |
i = IPC_GET_ARG2(call); |
retval = print_screen(i); |
399,12 → 296,9 |
} |
retval = 0; |
break; |
case FB_SCREEN_YIELD: |
case FB_SCREEN_RECLAIM: |
retval = EOK; |
break; |
default: |
retval = EINVAL; |
retval = ENOENT; |
} |
ipc_answer_0(callid, retval); |
} |
418,22 → 312,13 |
ega_ph_addr = (void *) sysinfo_value("fb.address.physical"); |
scr_width = sysinfo_value("fb.width"); |
scr_height = sysinfo_value("fb.height"); |
iospace_enable(task_get_id(), (void *) EGA_IO_ADDRESS, 2); |
if (sysinfo_value("fb.blinking")) { |
ega_normal_color &= 0x77; |
ega_inverted_color &= 0x77; |
} |
style = NORMAL_COLOR; |
iospace_enable(task_get_id(), (void *) EGA_IO_BASE, 2); |
sz = scr_width * scr_height * 2; |
scr_addr = as_get_mappable_page(sz); |
if (physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >> |
PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE) != 0) |
return -1; |
physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >> |
PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE); |
async_set_client_connection(ega_client_connection); |
441,6 → 326,6 |
} |
/** |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/fb/ppm.c |
---|
89,26 → 89,26 |
{ |
unsigned int width, height; |
unsigned int maxcolor; |
unsigned int i; |
int i; |
unsigned int color; |
unsigned int coef; |
/* Read magic */ |
if ((data[0] != 'P') || (data[1] != '6')) |
if (data[0] != 'P' || data[1] != '6') |
return EINVAL; |
data += 2; |
data+=2; |
skip_whitespace(&data); |
read_num(&data, &width); |
skip_whitespace(&data); |
read_num(&data, &height); |
read_num(&data,&height); |
skip_whitespace(&data); |
read_num(&data, &maxcolor); |
read_num(&data,&maxcolor); |
data++; |
if ((maxcolor == 0) || (maxcolor > 255) || (width * height > datasz)) |
if (maxcolor == 0 || maxcolor > 255 || width * height > datasz) { |
return EINVAL; |
} |
coef = 255 / maxcolor; |
if (coef * maxcolor > 255) |
coef -= 1; |
125,6 → 125,6 |
(*putpixel)(vport, sx + (i % width), sy + (i / width), color); |
data += 3; |
} |
return 0; |
} |
/branches/arm/uspace/srv/fb/font-8x16.h |
---|
26,25 → 26,12 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** @file |
*/ |
#ifndef FB_FONT_8X16_H_ |
#define FB_FONT_8X16_H_ |
#ifndef FONT_8X16_H_ |
#define FONT_8X16_H_ |
#define FONT_GLIPHS 256 |
#define FONT_SCANLINES 16 |
#define FONT_GLYPHS 2899 |
#define FONT_WIDTH 8 |
#define FONT_SCANLINES 16 |
extern unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES]; |
#include <sys/types.h> |
extern uint16_t fb_font_glyph(const wchar_t ch); |
extern uint8_t fb_font[FONT_GLYPHS][FONT_SCANLINES]; |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/fb/ega.h |
---|
27,10 → 27,10 |
*/ |
/** @addtogroup egafb |
* @brief HelenOS EGA framebuffer. |
* @brief HelenOS EGA framebuffer. |
* @ingroup fbs |
* @{ |
*/ |
*/ |
/** @file |
*/ |
43,3 → 43,4 |
/** @} |
*/ |
/branches/arm/uspace/srv/fb/fb.h |
---|
29,7 → 29,7 |
/** @addtogroup fb |
* @ingroup fbs |
* @{ |
*/ |
*/ |
/** @file |
*/ |
36,10 → 36,8 |
#ifndef FB_FB_H_ |
#define FB_FB_H_ |
#include <stdint.h> |
typedef void (* putpixel_cb_t)(void *, unsigned int, unsigned int, int); |
typedef void (* putpixel_cb_t)(void *, unsigned int, unsigned int, uint32_t); |
extern int fb_init(void); |
#endif |
/branches/arm/uspace/srv/fb/font-8x16.c |
---|
1,6 → 1,5 |
/* |
* Copyright (c) 2000 Dmitry Bolkhovityanov |
* Copyright (c) 2009 Martin Decky |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
27,3245 → 26,4616 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** @file |
*/ |
#include <sys/types.h> |
#include "font-8x16.h" |
/** Convert character to font glyph index |
* |
* The font does not cover all Unicode characters. |
* This function converts the character to an appropriate |
* glyph in the font or returns an index to the question |
* mark glyph if no specific glyph exists. |
*/ |
uint16_t fb_font_glyph(const wchar_t ch) |
{ |
if (ch == 0x0000) |
return 0; |
if ((ch >= 0x0020) && (ch <= 0x007f)) |
return (ch - 32); |
if ((ch >= 0x00a0) && (ch <= 0x021f)) |
return (ch - 64); |
if ((ch >= 0x0222) && (ch <= 0x0233)) |
return (ch - 66); |
if ((ch >= 0x0250) && (ch <= 0x02ad)) |
return (ch - 94); |
if ((ch >= 0x02b0) && (ch <= 0x02cf)) |
return (ch - 96); |
if ((ch >= 0x02d8) && (ch <= 0x02dd)) |
return (ch - 104); |
if (ch == 0x02ee) |
return 630; |
if ((ch >= 0x0300) && (ch <= 0x0301)) |
return (ch - 137); |
if (ch == 0x0303) |
return 633; |
if (ch == 0x0309) |
return 634; |
if ((ch >= 0x0312) && (ch <= 0x0314)) |
return (ch - 151); |
if (ch == 0x0323) |
return 638; |
if ((ch >= 0x0340) && (ch <= 0x0341)) |
return (ch - 193); |
if ((ch >= 0x0374) && (ch <= 0x0375)) |
return (ch - 243); |
if (ch == 0x037a) |
return 643; |
if (ch == 0x037e) |
return 644; |
if ((ch >= 0x0384) && (ch <= 0x038a)) |
return (ch - 255); |
if (ch == 0x038c) |
return 652; |
if ((ch >= 0x038e) && (ch <= 0x03a1)) |
return (ch - 257); |
if ((ch >= 0x03a3) && (ch <= 0x03ce)) |
return (ch - 258); |
if ((ch >= 0x03d0) && (ch <= 0x03d7)) |
return (ch - 259); |
if ((ch >= 0x03da) && (ch <= 0x03f3)) |
return (ch - 261); |
if ((ch >= 0x0400) && (ch <= 0x0486)) |
return (ch - 273); |
if ((ch >= 0x0488) && (ch <= 0x04ce)) |
return (ch - 274); |
if ((ch >= 0x04d0) && (ch <= 0x04f5)) |
return (ch - 275); |
if ((ch >= 0x04f8) && (ch <= 0x04f9)) |
return (ch - 277); |
if ((ch >= 0x0500) && (ch <= 0x050f)) |
return (ch - 283); |
if ((ch >= 0x0530) && (ch <= 0x0556)) |
return (ch - 315); |
if ((ch >= 0x0559) && (ch <= 0x055f)) |
return (ch - 317); |
if ((ch >= 0x0561) && (ch <= 0x0587)) |
return (ch - 318); |
if ((ch >= 0x0589) && (ch <= 0x058a)) |
return (ch - 319); |
if ((ch >= 0x0591) && (ch <= 0x05a1)) |
return (ch - 325); |
if ((ch >= 0x05a3) && (ch <= 0x05b9)) |
return (ch - 326); |
if ((ch >= 0x05bb) && (ch <= 0x05c4)) |
return (ch - 327); |
if ((ch >= 0x05d0) && (ch <= 0x05ea)) |
return (ch - 338); |
if ((ch >= 0x05f0) && (ch <= 0x05f4)) |
return (ch - 343); |
if (ch == 0x060c) |
return 1182; |
if (ch == 0x061b) |
return 1183; |
if (ch == 0x061f) |
return 1184; |
if ((ch >= 0x0621) && (ch <= 0x063a)) |
return (ch - 384); |
if ((ch >= 0x0640) && (ch <= 0x0655)) |
return (ch - 389); |
if ((ch >= 0x0660) && (ch <= 0x066d)) |
return (ch - 399); |
if ((ch >= 0x0670) && (ch <= 0x06ed)) |
return (ch - 401); |
if ((ch >= 0x06f0) && (ch <= 0x06fe)) |
return (ch - 403); |
if (ch == 0x10d3) |
return 1388; |
if (ch == 0x10d7) |
return 1389; |
if (ch == 0x10da) |
return 1390; |
if (ch == 0x10dd) |
return 1391; |
if (ch == 0x10e6) |
return 1392; |
if ((ch >= 0x1e00) && (ch <= 0x1e9b)) |
return (ch - 6287); |
if ((ch >= 0x1ea0) && (ch <= 0x1ef9)) |
return (ch - 6291); |
if ((ch >= 0x1f00) && (ch <= 0x1f07)) |
return (ch - 6297); |
if ((ch >= 0x2000) && (ch <= 0x2027)) |
return (ch - 6545); |
if ((ch >= 0x2030) && (ch <= 0x2046)) |
return (ch - 6553); |
if ((ch >= 0x2048) && (ch <= 0x204d)) |
return (ch - 6554); |
if (ch == 0x2070) |
return 1716; |
if ((ch >= 0x2074) && (ch <= 0x208f)) |
return (ch - 6591); |
if ((ch >= 0x20a0) && (ch <= 0x20af)) |
return (ch - 6607); |
if ((ch >= 0x2100) && (ch <= 0x213a)) |
return (ch - 6687); |
if ((ch >= 0x2153) && (ch <= 0x2183)) |
return (ch - 6711); |
if ((ch >= 0x2190) && (ch <= 0x21f3)) |
return (ch - 6723); |
if ((ch >= 0x2200) && (ch <= 0x22f1)) |
return (ch - 6735); |
if (ch == 0x2300) |
return 2211; |
if (ch == 0x2302) |
return 2212; |
if ((ch >= 0x2308) && (ch <= 0x230b)) |
return (ch - 6755); |
if (ch == 0x2310) |
return 2217; |
if (ch == 0x2318) |
return 2218; |
if ((ch >= 0x231a) && (ch <= 0x231b)) |
return (ch - 6767); |
if ((ch >= 0x2320) && (ch <= 0x2321)) |
return (ch - 6771); |
if ((ch >= 0x2329) && (ch <= 0x232a)) |
return (ch - 6778); |
if ((ch >= 0x239b) && (ch <= 0x23bd)) |
return (ch - 6890); |
if (ch == 0x23ce) |
return 2260; |
if ((ch >= 0x2409) && (ch <= 0x240d)) |
return (ch - 6964); |
if ((ch >= 0x2423) && (ch <= 0x2424)) |
return (ch - 6985); |
if (ch == 0x2426) |
return 2268; |
if ((ch >= 0x2500) && (ch <= 0x2595)) |
return (ch - 7203); |
if ((ch >= 0x25a0) && (ch <= 0x25f7)) |
return (ch - 7213); |
if ((ch >= 0x2600) && (ch <= 0x2602)) |
return (ch - 7221); |
if ((ch >= 0x2605) && (ch <= 0x260d)) |
return (ch - 7223); |
if ((ch >= 0x2610) && (ch <= 0x2613)) |
return (ch - 7225); |
if (ch == 0x2620) |
return 2523; |
if (ch == 0x2622) |
return 2524; |
if (ch == 0x2626) |
return 2525; |
if ((ch >= 0x2628) && (ch <= 0x262b)) |
return (ch - 7242); |
if ((ch >= 0x262e) && (ch <= 0x2637)) |
return (ch - 7244); |
if ((ch >= 0x2639) && (ch <= 0x2653)) |
return (ch - 7245); |
if ((ch >= 0x2660) && (ch <= 0x2667)) |
return (ch - 7257); |
if ((ch >= 0x2669) && (ch <= 0x266f)) |
return (ch - 7258); |
if ((ch >= 0xfb00) && (ch <= 0xfb05)) |
return (ch - 61674); |
if ((ch >= 0xfb50) && (ch <= 0xfbb1)) |
return (ch - 61748); |
if ((ch >= 0xfbd3) && (ch <= 0xfbe9)) |
return (ch - 61781); |
if ((ch >= 0xfbfc) && (ch <= 0xfbff)) |
return (ch - 61799); |
if ((ch >= 0xfc5b) && (ch <= 0xfc63)) |
return (ch - 61890); |
if (ch == 0xfc90) |
return 2722; |
if ((ch >= 0xfcf2) && (ch <= 0xfcf4)) |
return (ch - 62031); |
if ((ch >= 0xfd3c) && (ch <= 0xfd3f)) |
return (ch - 62102); |
if (ch == 0xfdf2) |
return 2730; |
if ((ch >= 0xfe50) && (ch <= 0xfe52)) |
return (ch - 62373); |
if ((ch >= 0xfe54) && (ch <= 0xfe66)) |
return (ch - 62374); |
if ((ch >= 0xfe68) && (ch <= 0xfe6b)) |
return (ch - 62375); |
if ((ch >= 0xfe70) && (ch <= 0xfe72)) |
return (ch - 62379); |
if (ch == 0xfe74) |
return 2760; |
if ((ch >= 0xfe76) && (ch <= 0xfefc)) |
return (ch - 62381); |
if (ch == 0xfeff) |
return 2896; |
return 2898; |
} |
unsigned char fb_font[FONT_GLIPHS * FONT_SCANLINES] = { |
uint8_t fb_font[FONT_GLYPHS][FONT_SCANLINES] = { |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0x86, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xde, 0xde, 0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, 0x0c, 0x0e, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00}, |
{0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x3c, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x99, 0xa5, 0xa1, 0xa1, 0xa5, 0x99, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x44, 0xba, 0xb2, 0xaa, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0x30, 0x60, 0xc8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0x30, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xf6, 0xc0, 0xc0, 0xc0, 0x00}, |
{0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x30, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xce, 0x9e, 0x3e, 0x06, 0x06, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xdc, 0x86, 0x0c, 0x18, 0x3e, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0x36, 0xec, 0x18, 0x30, 0x66, 0xce, 0x9e, 0x3e, 0x06, 0x06, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x18, 0x0c, 0x38, 0x00}, |
{0x30, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x3c, 0x42, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0xf6, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7a, 0xc4, 0xce, 0xce, 0xd6, 0xd6, 0xe6, 0xe6, 0x46, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x6c, 0x66, 0x66, 0x66, 0x66, 0xec, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0x1c, 0x3c, 0x06, 0x7e, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0xc4, 0xce, 0xd6, 0xe6, 0x46, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x30, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x7c, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x0c, 0x18, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x0c, 0x18, 0x0e, 0x00}, |
{0x0c, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0xf6, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x3e, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x18, 0x30, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x6c, 0x38, 0x10, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x6c, 0x38, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x18, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x18, 0x30, 0x30, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x10, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xff, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf8, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7e, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7e, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x3c, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x3c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x30, 0x1c, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x30, 0x1c, 0x00}, |
{0x18, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf7, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7b, 0x7b, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x00, 0xee, 0x66, 0x66, 0x66, 0x66, 0x66, 0xf6, 0x06, 0x66, 0x3c, 0x00}, |
{0x08, 0x1c, 0x22, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x0e, 0x1b, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x30, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x30}, |
{0x6c, 0x38, 0x10, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x66, 0x66, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x30, 0x30, 0x30, 0x36, 0x36, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x78, 0xe0, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x1e, 0x78, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x18, 0x18, 0x30}, |
{0x6c, 0x38, 0x10, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x60, 0x60, 0xc0, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0xcc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6e, 0xd8, 0xd8, 0xd8, 0xde, 0xd8, 0xd8, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xd6, 0xd6, 0xde, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x18, 0x18, 0x30}, |
{0x6c, 0x38, 0x10, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x6c, 0x38, 0x10, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x18, 0x0c, 0x38, 0x00}, |
{0x6c, 0x38, 0x10, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x10, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x3c, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0xfc, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x78, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x78, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x38, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0xcc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x30, 0x60, 0x38, 0x00}, |
{0x10, 0x38, 0x44, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x66, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf8, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xb3, 0xb3, 0x33, 0x3e, 0x33, 0x33, 0x33, 0x33, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x64, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x62, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xe6, 0xe6, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xe0, 0xe0, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x86, 0x06, 0x06, 0x06, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x03, 0x3e, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x7e, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0xf6, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xb6, 0xb3, 0x33, 0x33, 0x33, 0x33, 0x33, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x4c, 0x0c, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0x4c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x18, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0xfe, 0xcc, 0x8c, 0x2c, 0x3c, 0x2c, 0x0c, 0x8c, 0xcc, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x06, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc2, 0xc0, 0x78, 0xc0, 0xc0, 0xc2, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xc0, 0x00}, |
{0x00, 0x00, 0x1c, 0x36, 0x32, 0x30, 0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0, 0x00}, |
{0x00, 0x03, 0x3e, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x38, 0x6c, 0x38, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xf3, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x6d, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc8, 0x38, 0x70, 0xd0, 0x38, 0x38, 0x6c, 0x64, 0xc6, 0xc2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0xec, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x76, 0x7e, 0x7e, 0x6e, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0xc0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x73, 0xdf, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x73, 0x03, 0x03, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0xdf, 0xdb, 0xdb, 0xdb, 0xdb, 0x73, 0x03, 0x03, 0x03, 0x00}, |
{0x00, 0x00, 0x7e, 0xb3, 0xb3, 0x33, 0x3e, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x6c, 0xe6, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x38, 0x60, 0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x0c, 0x38, 0x60, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x62, 0x30, 0x18, 0x18, 0x30, 0x62, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b, 0x0e, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x0c, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0x7e, 0xfe, 0x9a, 0x58, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x36, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00}, |
{0x03, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0x6c, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x63, 0xb3, 0xb3, 0x33, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x0d, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x18, 0xf0, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x7e, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0xfc, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x30, 0x7c, 0x06, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc0, 0x60, 0x30, 0x18, 0x7c, 0xc0, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0x60, 0x30, 0x78, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x7c, 0xc0, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x7e, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x60, 0x60, 0x78, 0x0c, 0x06, 0x06, 0x06, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x60, 0x78, 0x0c, 0x06, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x18, 0x4c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x70, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x1b, 0x0e, 0x04, 0xf7, 0xd9, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0xdc, 0xf7, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf5, 0xda, 0xd8, 0xdf, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0xf7, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3d, 0x1a, 0x18, 0x7f, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0x6f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xcb, 0xf6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf3, 0x63, 0x60, 0x67, 0x63, 0x63, 0x63, 0x67, 0x6f, 0xff, 0x03, 0x1b, 0x0e, 0x00}, |
{0x00, 0x00, 0xe3, 0x63, 0x60, 0x67, 0x63, 0x63, 0x63, 0x63, 0x63, 0xf3, 0x03, 0x33, 0x1e, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xfb, 0xfb, 0xfb, 0xdb, 0xdb, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xf8, 0xff, 0xfb, 0xfb, 0xdb, 0xdb, 0xdb, 0xdb, 0x03, 0x33, 0x1e, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x00, 0xb7, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x03, 0x33, 0x1e, 0x00}, |
{0x6c, 0x38, 0x10, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x78, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x10, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x30, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x28, 0x10, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x78, 0x30, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x10, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x30, 0x30, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xdf, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x3e, 0xcc, 0x78, 0x00}, |
{0x6c, 0x38, 0x10, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x6c, 0x38, 0x10, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xe0, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x6c, 0x38, 0x10, 0xfe, 0x0c, 0x18, 0x30, 0x7c, 0x06, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00}, |
{0x00, 0x1b, 0x0e, 0x04, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0xf7, 0xd9, 0xd9, 0xda, 0xda, 0xda, 0xda, 0xdc, 0xdc, 0xf7, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0xd8, 0xd8, 0xdf, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0xf7, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x7f, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0x6f, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x30, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xdb, 0xfb, 0xdb, 0xdb, 0xdb, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x6c, 0x78, 0x70, 0x60, 0x60, 0x60, 0x60, 0xe0, 0x00}, |
{0x60, 0x30, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x38, 0x6c, 0x38, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x38, 0x6c, 0x38, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7a, 0xc4, 0xce, 0xce, 0xd6, 0xe6, 0xe6, 0x46, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7a, 0xc4, 0xce, 0xd6, 0xe6, 0x46, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x3c, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x18, 0x18, 0x30}, |
{0x00, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x1c, 0x74, 0x06, 0x06, 0x06, 0x06, 0x1c, 0xf0, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0e, 0x3c, 0x06, 0x06, 0x1c, 0xf0, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc0, 0xfc, 0x06, 0x0c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc0, 0xfc, 0x06, 0x0c, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x7c, 0x00, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x72, 0x9c, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x00, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x3c, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x5c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xdc, 0xe6, 0x7c, 0x80, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0d, 0x06, 0x00}, |
{0x00, 0x00, 0x06, 0x0d, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x6c, 0x8e, 0x16, 0x26, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0x78, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7a, 0xcd, 0x0d, 0x38, 0x0c, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xdc, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x06, 0x06, 0x1f, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x0d, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xce, 0xc6, 0xc6, 0x7a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x46, 0x6c, 0x2c, 0x2c, 0x38, 0x18, 0x18, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x64, 0x28, 0x38, 0x38, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xdc, 0x6c, 0x0c, 0x0c, 0x0e, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x7b, 0xde, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x78, 0x58, 0x3e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b, 0x0e, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x7f, 0x63, 0x66, 0x6c, 0x7e, 0x63, 0xf3, 0x03, 0x33, 0x1e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6e, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0xc0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0xd8, 0xd8, 0xde, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0xcc, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0xcc, 0xdc, 0x6c, 0x0c, 0x0d, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0x60, 0x60, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x66, 0x6c, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xfc, 0xc0, 0xd8, 0x70, 0x00}, |
{0x00, 0x00, 0x0e, 0x1b, 0x19, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x98, 0xd8, 0x70, 0x00}, |
{0x00, 0x00, 0x0e, 0x1b, 0x19, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x98, 0xd8, 0x70, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x18, 0x18, 0x18, 0x18, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0e, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0xd8, 0x70, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x3b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xd6, 0xd6, 0xd6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x60, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x06, 0x06, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x66, 0xcb, 0xfe, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x7e, 0xc7, 0x7c, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0x70, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc3, 0xc3, 0xdb, 0xdb, 0xc3, 0xc3, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x76, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x7e, 0xc6, 0xc0, 0xce, 0xc6, 0xc6, 0x7a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0x00, 0x1c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x7e, 0xcc, 0x78, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0xcc, 0x6c, 0x3c, 0x3c, 0x6c, 0xcc, 0x0c, 0x0c, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x0d, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x1c, 0x18, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0x70, 0x30, 0xfc, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x7f, 0xd9, 0xda, 0xda, 0xda, 0xdc, 0x6f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x7f, 0xdb, 0xdb, 0xde, 0xde, 0xdb, 0x6b, 0x03, 0x1b, 0x0e, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x7f, 0xd9, 0xda, 0xda, 0xdb, 0xdd, 0x6f, 0x04, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x60, 0x60, 0xf6, 0x6d, 0x6c, 0x66, 0x63, 0x6b, 0x36, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x26, 0x6d, 0x6c, 0xfc, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x3c, 0x0c, 0x2c, 0x18, 0x00}, |
{0x00, 0x00, 0x20, 0x60, 0x60, 0xf6, 0x6d, 0x6c, 0x6c, 0x6e, 0x6d, 0x36, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0xc0, 0xfe, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x03, 0x03, 0x0e, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6d, 0x6c, 0x66, 0x63, 0x6b, 0xf6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6f, 0x6b, 0x63, 0x66, 0x6c, 0x6d, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xd6, 0x7c, 0x6c, 0x28, 0xc6, 0xd6, 0x7c, 0x6c, 0x28, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xf0, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xc0, 0xf0, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x00, 0x38, 0x18, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xb0, 0xd8, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x18, 0xd8, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x18, 0xd8, 0x68, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xd8, 0xd8, 0xf0, 0xd8, 0xd8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0xd6, 0x7c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd8, 0x78, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0x18, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0xc0, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x70, 0xc0, 0x70, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0x70, 0x18, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x20, 0x20, 0x70, 0x70, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xd8, 0xd8, 0x70, 0x70, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x1c, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x6c, 0x6c, 0x6c, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x34, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00}, |
{0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x34, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x3e, 0x32, 0x30, 0x34, 0x3c, 0x34, 0x30, 0x30, 0x32, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x33, 0x33, 0x33, 0x33, 0x3f, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x3e, 0x63, 0x63, 0x63, 0x63, 0x63, 0x36, 0x36, 0x36, 0x77, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x6c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x82, 0x44, 0x7c, 0x44, 0x00, 0x82, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x62, 0x30, 0x18, 0x18, 0x30, 0x62, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x92, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc0, 0x78, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x6c, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x6c, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x46, 0x6c, 0x2c, 0x2c, 0x38, 0x18, 0x18, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x30, 0x18, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0x78, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x46, 0x7c, 0x18, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x7c, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0x20, 0x30, 0x10, 0x38, 0x38, 0x6c, 0x64, 0xc6, 0xc2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xf6, 0xc0, 0xc0, 0xc0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x66, 0x6c, 0x3c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x3c, 0x30, 0x60, 0x3c, 0x60, 0xc0, 0xc0, 0xc0, 0x7c, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0x7c, 0x06, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x46, 0x2c, 0x2c, 0x18, 0x30, 0x68, 0x68, 0xc4, 0xc2, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x6c, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x36, 0x1e, 0xc6, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc2, 0x65, 0x24, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0xc0, 0x21, 0x32, 0x12, 0x1c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc2, 0x65, 0x24, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xa6, 0x2c, 0x38, 0x68, 0xca, 0xc4, 0x0c, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0x60, 0x3c, 0x06, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x7c, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x78, 0x68, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x32, 0x30, 0x30, 0x3c, 0x34, 0x30, 0x30, 0x30, 0x30, 0x00}, |
{0x00, 0x60, 0x30, 0x30, 0x60, 0x63, 0xff, 0xc6, 0x06, 0x0c, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x60, 0x60, 0xfe, 0xfe, 0x0c, 0x0c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xac, 0x26, 0x26, 0x0b, 0x0b, 0x1b, 0x1b, 0x1b, 0x1b, 0x03, 0x02, 0x04, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x30, 0x18, 0x28, 0x4c, 0x14, 0x24, 0x06, 0x02, 0x02, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x6d, 0x03, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x6d, 0x03, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xd6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x36, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x06, 0x76, 0x9c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x7c, 0xd6, 0x66, 0x06, 0x06, 0x66, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x3c, 0x60, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x26, 0x1c, 0x70, 0xc0, 0xc2, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0x68, 0x38, 0x30, 0x38, 0x38, 0x4c, 0x4c, 0x86, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0xba, 0x30, 0x38, 0x28, 0x4c, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xc0, 0xcc, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xc0, 0xdc, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x7e, 0x99, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x1c, 0x18, 0x7e, 0x58, 0x18, 0x18, 0x18, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0xa6, 0x2c, 0x38, 0x68, 0xca, 0xc4, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0xc0, 0x60, 0x3c, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x30, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xb2, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x03, 0x06, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xf8, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x66, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xd8, 0xd8, 0xd8, 0xde, 0xdb, 0xdb, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xd8, 0xfe, 0xdb, 0xdb, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xb2, 0x30, 0x3e, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x18, 0x00, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x38, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xfe, 0xc6, 0x82, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x3c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0xc6, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xfe, 0x06, 0x02, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xff, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xb0, 0xb0, 0x30, 0x3c, 0x36, 0x36, 0x36, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xf3, 0xdb, 0xdb, 0xdb, 0xdb, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x86, 0x06, 0x3e, 0x06, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x9c, 0xb6, 0xb6, 0xb6, 0xf6, 0xb6, 0xb6, 0xb6, 0xb6, 0x9c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xcc, 0xcc, 0xcc, 0x7c, 0x6c, 0x6c, 0x6c, 0x6c, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x7c, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xfe, 0xc6, 0x82, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xfe, 0x06, 0x02, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xff, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xb0, 0x30, 0x3c, 0x36, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xf3, 0xdb, 0xdb, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3e, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0xb6, 0xb6, 0xf6, 0xb6, 0xb6, 0x9c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xcc, 0xcc, 0x7c, 0x6c, 0x6c, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf8, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x06, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xf8, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xd8, 0xd8, 0xde, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xfe, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf8, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x38, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0xfc, 0xb4, 0x30, 0x3c, 0x36, 0x36, 0x36, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x30, 0xfc, 0xb4, 0x30, 0x3c, 0x36, 0x36, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xce, 0xdb, 0xd9, 0xd8, 0xfe, 0xd8, 0xd8, 0xd9, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0xdb, 0xd8, 0xfe, 0xd8, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0x6c, 0xfe, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x6c, 0x7c, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x88, 0x8c, 0x9c, 0x96, 0xf6, 0xb6, 0xbf, 0xab, 0xeb, 0xeb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x8c, 0x9c, 0xf6, 0xbe, 0xab, 0xeb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x6c, 0x6c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x6c, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xa3, 0xb2, 0x96, 0xfc, 0x9c, 0xbe, 0xaa, 0xab, 0xeb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xa3, 0x96, 0xfe, 0xab, 0xab, 0xeb, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x10, 0x7c, 0xc6, 0x06, 0x06, 0x7c, 0x06, 0x06, 0x06, 0x7c, 0xc0, 0x7c, 0x00, 0x00}, |
{0x00, 0x6c, 0x38, 0x10, 0x00, 0x7c, 0x86, 0x06, 0x7c, 0x06, 0x06, 0x7c, 0xc0, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x96, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x96, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc2, 0xc6, 0xc6, 0xc4, 0xcc, 0x6c, 0x68, 0x78, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x64, 0x6c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0x66, 0x00, 0xc2, 0xc6, 0xc4, 0xc4, 0x6c, 0x68, 0x78, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0x66, 0x00, 0xc2, 0xc6, 0x64, 0x6c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd8, 0xd8, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x6f, 0x03, 0x06, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x6f, 0x03, 0x06, 0x1c, 0x00}, |
{0x00, 0x10, 0x7c, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0x7c, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0xd6, 0xc6, 0xc6, 0xc6, 0xd6, 0x7c, 0x10, 0x00, 0x00, 0x00}, |
{0x04, 0x7c, 0x40, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x7c, 0x40, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x7c, 0x54, 0x00, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0x54, 0x00, 0x6c, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x60, 0x3c, 0x0c, 0x0c, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0x78, 0x18, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x3c, 0x0f, 0x18, 0x18, 0xf0, 0x3c, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x7c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x24, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x40, 0x7c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x7c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x66, 0x00, 0xc3, 0x00, 0x66, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x50, 0x46, 0x00, 0x82, 0x41, 0x00, 0x62, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0xc6, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x60, 0xf0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x6e, 0x64, 0x7a, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x6e, 0x64, 0x7a, 0x60, 0x60, 0xf0, 0x00}, |
{0x02, 0x06, 0xfe, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x02, 0x06, 0xfe, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0xf8, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0xf8, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xf6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x78, 0x6c, 0x66, 0xf6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0xd7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x3c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x30, 0x60, 0x38, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xdc, 0xf8, 0xdc, 0xd6, 0xd6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xdc, 0xf8, 0xdc, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0xf6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0xf0, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf3, 0xb3, 0xb3, 0x36, 0x3c, 0x3c, 0x36, 0x33, 0x33, 0x73, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf3, 0xb6, 0xbc, 0x3c, 0x36, 0x33, 0x73, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xdf, 0xdb, 0xd9, 0xd8, 0xf8, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0xdb, 0xd9, 0xf8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xd8, 0xd8, 0xd8, 0xde, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x03, 0x0b, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xfe, 0xdb, 0xdb, 0xdb, 0x03, 0x0b, 0x06, 0x00}, |
{0x00, 0x00, 0x7c, 0xc2, 0xcc, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xcc, 0x7a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc2, 0xcc, 0xd6, 0xd6, 0xcc, 0x7a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0c, 0x04, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0c, 0x04, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x3c, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x3c, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xf6, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7f, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7f, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0x7e, 0x16, 0x16, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0x7e, 0x16, 0x16, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x33, 0xb3, 0xb3, 0x7f, 0x30, 0x30, 0x30, 0x33, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xb3, 0x7f, 0x30, 0x30, 0x33, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x33, 0xb3, 0xb3, 0x7f, 0x30, 0x30, 0x30, 0x33, 0x1e, 0x0c, 0x18, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0xb3, 0x7f, 0x30, 0x30, 0x33, 0x1e, 0x0c, 0x18, 0x0e, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0xd6, 0xd6, 0xd6, 0x7c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x06, 0x16, 0x0c, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0e, 0x0c, 0x08, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x0e, 0x0c, 0x08, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc7, 0x03, 0x01, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x06, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0xfe, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0x38, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xd6, 0xd6, 0xd6, 0x7c, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x3c, 0x06, 0x86, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00}, |
{0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xce, 0xde, 0xfe, 0xf6, 0xe6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x78, 0xcc, 0x86, 0x06, 0x3e, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0x06, 0x3e, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x66, 0xcc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc3, 0xc3, 0xc3, 0xf3, 0xdb, 0xdb, 0xdb, 0xdb, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc3, 0xc3, 0xc3, 0xf3, 0xdb, 0xdb, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x7c, 0xcd, 0xcd, 0xcd, 0xcd, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcd, 0xcd, 0xcd, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x8c, 0x0c, 0x38, 0x0d, 0x0d, 0x0d, 0x0d, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0x0c, 0x39, 0x0d, 0x0d, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0x86, 0x06, 0x3c, 0x06, 0x06, 0x06, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6d, 0x6d, 0x6d, 0x6d, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x6d, 0x6d, 0x6d, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xfc, 0xcd, 0xcd, 0xcd, 0xcd, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xfd, 0xcd, 0xcd, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xce, 0xc6, 0xc6, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xce, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x1b, 0x1b, 0x1b, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x5a, 0x18, 0x1b, 0x1b, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x64, 0x94, 0xba, 0x52, 0x4c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0x7b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x7f, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x7e, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x0c, 0xd8, 0xfe, 0xc3, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7c, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x60, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xcf, 0xd6, 0xd6, 0xd6, 0xd6, 0xcc, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x0c, 0x7f, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7c, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xf6, 0xd6, 0xd6, 0xd6, 0xd6, 0xcc, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0x7f, 0x24, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, 0xf0, 0x3c, 0x0e, 0x04, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x6c, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x0c, 0x0c, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x30, 0x60, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcf, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x06, 0x06, 0x7c, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x06, 0x3e, 0x66, 0x60, 0x60, 0x60, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x06, 0x06, 0x06, 0x6c, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x16, 0x16, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x76, 0x1e, 0x0e, 0x0c, 0xd8, 0xfe, 0xc3, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x30, 0x18, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x06, 0x06, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x63, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xfe, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd0, 0xd0, 0xd0, 0x7c, 0x16, 0x16, 0x16, 0xd6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x3c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x36, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x60, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x6a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7f, 0x0c, 0x0c, 0x0c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0x0c, 0x0c, 0x0c, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x0f, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x7c, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x0c, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x7e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc6, 0xc6, 0xcf, 0xd6, 0xd6, 0xcc, 0xc0, 0xc0, 0xc0, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x7f, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3e, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xf6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xca, 0xc0, 0xc0, 0xc0, 0x00}, |
{0x00, 0x00, 0x60, 0x38, 0x0c, 0x7f, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x1c, 0x0c, 0x18, 0x3c, 0x64, 0x66, 0x62, 0x63, 0x3d, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x0c, 0x0c, 0x0f, 0x00}, |
{0x00, 0x00, 0x0e, 0x18, 0x30, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0f, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x3e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x3e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x7e, 0x06, 0x06, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x76, 0x1c, 0x18, 0x30, 0x60, 0x3e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcf, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x0f, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x06, 0x66, 0x3c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0xdc, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x76, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0xfe, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xd0, 0xd0, 0x7c, 0x16, 0x16, 0x16, 0x16, 0xd6, 0x7c, 0x10, 0x10, 0x10, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0xcc, 0xcc, 0xcc, 0x77, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x6c}, |
{0x18, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x38, 0x10, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x60, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0c, 0x00}, |
{0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x74, 0xd6, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x18, 0x30, 0x00}, |
{0x0c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1b, 0x36, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x44, 0xaa, 0x6c, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x0a, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0x50, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x3c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x6c, 0xd8, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x08, 0x30}, |
{0x60, 0x30, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0xa0, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x38, 0x10, 0x10}, |
{0x18, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x06, 0x03, 0x00}, |
{0x48, 0xa8, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x33, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x00, 0x06, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x60, 0x66, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x18}, |
{0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x03, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x66, 0x76, 0xdc, 0xcc, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf8, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x0c, 0x0c, 0x0c, 0x1c, 0x36, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xcc, 0xd6, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0x06, 0x0c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0xc6, 0xc6, 0xc6, 0xc6, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xee, 0x66, 0x66, 0x66, 0x66, 0x66, 0x2c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf8, 0x4c, 0xcc, 0xcc, 0xec, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0e, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x46, 0xc6, 0xc6, 0xe6, 0x06, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xee, 0x66, 0x66, 0x6c, 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x70, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xee, 0x66, 0x66, 0x34, 0x18, 0x0c, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x66, 0x64, 0x6c, 0x6e, 0x60, 0x60, 0x60, 0x60, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xf6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x66, 0xe6, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x66, 0x66, 0xc6, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x22, 0x20, 0x10, 0x08, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x20, 0x1e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x3c, 0x40, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x20, 0x1c, 0x20, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x18, 0x20, 0x1c, 0x20, 0x00, 0x00}, |
{0x00, 0x30, 0x40, 0x38, 0x40, 0x07, 0x08, 0x88, 0x86, 0x81, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x28, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x14, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x88, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x20, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x40, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x09, 0x47, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x19, 0x21, 0x19, 0x21, 0x01, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x3c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x40, 0x30, 0x4e, 0x49, 0x39, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x24, 0x00}, |
{0x0c, 0x30, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x12, 0xca, 0x2c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0c, 0x30, 0x00, 0x00}, |
{0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x14, 0x0c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00}, |
{0x0a, 0x2a, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x7e, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x10, 0x0c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x10, 0x0c, 0x10}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x70, 0x70, 0x38, 0x18, 0x18, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x44, 0xfc, 0xf8, 0x60, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4a, 0xfe, 0xf4, 0x60, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x20, 0x40, 0x30, 0x10, 0x20, 0x42, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x2c, 0x44, 0x42, 0x82, 0x82, 0xfe, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xf8, 0x78, 0x08, 0x08, 0x08, 0x0c, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x82, 0xc6, 0xc6, 0x6c, 0x28, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x38, 0x28, 0x6c, 0xc6, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xf8, 0x88, 0xf8, 0x78, 0x08, 0x0c, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x91, 0x92, 0x64, 0x08, 0x10, 0x26, 0x49, 0x89, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x18, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0xfe, 0x7c, 0x38, 0x6c, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x29, 0x5e, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x28, 0x5e, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x06, 0x28, 0x5e, 0x00, 0x00, 0x00}, |
{0x00, 0x07, 0x08, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x04, 0x03, 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x04, 0x03, 0x04, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x23, 0x54, 0x33, 0x24, 0x40, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x04, 0x03, 0x04, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x14, 0x40, 0x81, 0x81, 0x7e, 0x08, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x08, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00}, |
{0x06, 0x08, 0x06, 0x08, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x08, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x94, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x88, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x94, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x20, 0x38, 0x28, 0x70, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x08, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x38, 0x28, 0x70, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x08, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x14, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x1c, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x14, 0x08, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x12, 0x04, 0x18, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x14, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x14, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x15, 0x88, 0x88, 0x8a, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0x88, 0x88, 0x90, 0x65, 0x00, 0x02, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x00, 0x0a, 0x00, 0x01, 0x15, 0x88, 0x88, 0x90, 0x65, 0x00, 0x02, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x90, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x2a, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x00, 0x50, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x0a, 0x00, 0x04, 0x00, 0x00, 0x00}, |
{0x0a, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x09, 0x47, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x09, 0x47, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x01, 0x02, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x20, 0x40, 0x3e, 0x01, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x01, 0x02, 0x05, 0x0b, 0x48, 0x84, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x19, 0x21, 0x19, 0x21, 0x01, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x29, 0x01, 0x19, 0x21, 0x19, 0xa1, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x19, 0x21, 0x19, 0x21, 0x01, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x05, 0x0b, 0x48, 0x84, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xa4, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x44, 0x09, 0xa2, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x08, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x02, 0x2a, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x14, 0x00, 0x08, 0x00}, |
{0x00, 0x08, 0x00, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x04, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x08, 0x14, 0x08, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0x3c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x38, 0x40, 0x38, 0x40, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x40, 0x38, 0x40, 0x00, 0x0c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x0c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x12, 0x2c, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x3c, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x18, 0x10, 0x20, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x08, 0x08, 0x08, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x20, 0x47, 0x88, 0x08, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x50, 0x20, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x82, 0x7c, 0x00, 0x08, 0x00, 0x08}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x82, 0x7c, 0x00, 0x14, 0x00, 0x08}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x60, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x80, 0x60, 0x80, 0x08, 0x14, 0x60, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0x40, 0x43, 0x55, 0x7e, 0x80, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x2a, 0x20, 0x26, 0x2a, 0x7c, 0x80, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0e, 0x1c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x14, 0x08, 0x14, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x2c, 0x10, 0x28, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x15, 0x8a, 0x90, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x5a, 0xa5, 0x66, 0x5b, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x5a, 0x66, 0xa5, 0x5a, 0x00}, |
{0x00, 0x00, 0x18, 0x66, 0x42, 0x42, 0x81, 0x99, 0x99, 0x81, 0x42, 0x42, 0x66, 0x18, 0x00, 0x00}, |
{0x08, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x26, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0c, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x8a, 0x90, 0x60}, |
{0x32, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x0c, 0x04, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x30, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x54, 0xaa, 0x92, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x82, 0xfe, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x14, 0x08}, |
{0x08, 0x14, 0x22, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x10, 0x10, 0x10}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x70, 0x70, 0x38, 0x18, 0x18, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x44, 0xfc, 0xf8, 0x60, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4a, 0xfe, 0xf4, 0x60, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4e, 0xf0, 0xfe, 0x7c, 0x30, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x38, 0x2c, 0x44, 0x42, 0x82, 0x92, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x60, 0x7e, 0x3c, 0x30, 0x60, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x82, 0xc6, 0xc6, 0x6c, 0x28, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x10, 0x38, 0x28, 0x6c, 0xc6, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xf8, 0x88, 0xf8, 0x78, 0x08, 0x0c, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x01, 0x15, 0x88, 0x88, 0x88, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x40, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x88, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x20, 0x1e, 0x20, 0x00, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x3c, 0x40, 0x54, 0x54, 0x54, 0x54, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x4c, 0x30, 0x4c, 0x02, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x64, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xaa, 0xaa, 0xaa, 0x82, 0x82, 0x40, 0x30, 0x4c, 0x02, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x82, 0x82, 0x44, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x82, 0x82, 0x40, 0x30, 0x4c, 0x02, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x38, 0x6c, 0x38}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x38, 0x6c, 0x38}, |
{0x18, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x0c, 0xec, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x7c, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x30, 0x30, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x60, 0x0c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x30, 0x18, 0x70, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x30, 0x18, 0x70, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x10, 0x38, 0x6c, 0x00}, |
{0x60, 0x30, 0x00, 0x7c, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x76, 0xdc, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x76, 0xdc, 0x00}, |
{0x6c, 0x38, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x18, 0x0c, 0x38, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x0c, 0x38, 0x00}, |
{0x18, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x38, 0x6c, 0x64, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0c, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x60, 0x30, 0xe0, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x30, 0x18, 0x70, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x6c, 0x38, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x76, 0xdc, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x76, 0xdc, 0x00}, |
{0x0c, 0x18, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x0c, 0xec, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x7c, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x7c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x10, 0x38, 0x6c, 0x00}, |
{0x0c, 0x18, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x10, 0x38, 0x6c, 0x00}, |
{0x0c, 0x18, 0x72, 0x9c, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x00, 0x72, 0x9c, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0x7c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x18, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00}, |
{0x18, 0x18, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x7c, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x7c, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x60, 0x6c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0x70, 0x1c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x60, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x44, 0x38, 0x10, 0x7c, 0xc6, 0xc6, 0x70, 0x1c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x44, 0x38, 0x10, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x18, 0x18, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x16, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x7e, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x08, 0x1c, 0x36, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x6c, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x6c, 0x6c, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x76, 0xdc, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x76, 0xdc, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x10, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x10, 0x38, 0x6c, 0x00}, |
{0x0c, 0x18, 0x72, 0x9c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x76, 0xdc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x00, 0x7c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xcc, 0xcc, 0x00, 0xfc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x18, 0x18, 0x00}, |
{0x60, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x30, 0x30, 0x00}, |
{0x30, 0x30, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x10, 0x38, 0x44, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x7c, 0x00, 0x00}, |
{0x6c, 0x6c, 0x00, 0x10, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x6c, 0x38, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x18, 0x0c, 0x18, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x30, 0x00, 0x38, 0x6c, 0x64, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x16, 0x38, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x16, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x68, 0x1c, 0x36, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x68, 0x1c, 0x36, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x28, 0x54, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x38, 0x44, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x6c, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x0c, 0x18, 0x44, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x18, 0x44, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x44, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x30, 0x44, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x08, 0x54, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x08, 0x54, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x72, 0x9c, 0x44, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x72, 0x9c, 0x44, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x6c, 0x38, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x23, 0x76, 0x88, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x26, 0x70, 0xd8, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xc4, 0x6e, 0x11, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x64, 0x0e, 0x1b, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x38, 0x44, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x38, 0x44, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x23, 0x76, 0x88, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x26, 0x70, 0xd8, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xc4, 0x6e, 0x11, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0xc0, 0x64, 0x0e, 0x1b, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0e, 0x13, 0x3a, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x28, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x76, 0xdc, 0x10, 0x38, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x38, 0x44, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x18, 0x33, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1b, 0x33, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x33, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x63, 0x33, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x70, 0x1b, 0x33, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x1b, 0x33, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x68, 0xb3, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x68, 0xb3, 0x03, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x03, 0x7a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x38, 0x0c, 0x18, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x18, 0x30, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x33, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1b, 0x33, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x33, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x63, 0x33, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x70, 0x1b, 0x33, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0x1b, 0x33, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x68, 0xb3, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x68, 0xb3, 0x03, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x03, 0x03, 0xce, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x30, 0x30, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x00}, |
{0x30, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x18, 0x18, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x0c, 0x18, 0xf6, 0x06, 0x00}, |
{0x38, 0x0c, 0x18, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x38, 0x0c, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x3a, 0x5c, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x76, 0xdc, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00}, |
{0x00, 0x18, 0x18, 0x30, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x18, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x60, 0x6c, 0xc6, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xcc, 0x66, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x60, 0x66, 0xcc, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc6, 0x6c, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x34, 0x58, 0x0c, 0x18, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x34, 0x58, 0x30, 0x18, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0xfe, 0x00, 0xa4, 0xaa, 0xea, 0xea, 0xa6, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xa4, 0xea, 0xaa, 0xaa, 0xa6, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x8a, 0xce, 0x8e, 0xea, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x8e, 0xca, 0x8a, 0xea, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xca, 0x2e, 0x4a, 0x2a, 0xca, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xaa, 0xae, 0xea, 0x2a, 0x2a, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x6a, 0x8e, 0xca, 0xaa, 0x4a, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x38, 0x20, 0x30, 0x20, 0x20, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x30, 0x28, 0x30, 0x20, 0x20, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x4a, 0x4e, 0x4a, 0x4a, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x28, 0x28, 0x38, 0x28, 0x28, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x2a, 0x4e, 0x8e, 0xee, 0x00, 0x6c, 0x8a, 0x4c, 0x28, 0xc8, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x2a, 0x4e, 0x8e, 0xee, 0x00, 0xa2, 0xa2, 0xe2, 0xea, 0xa4, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xea, 0x2a, 0x4e, 0x8e, 0xee, 0x00, 0x08, 0x08, 0x08, 0x28, 0x10, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0x80, 0x80, 0x80, 0xf0, 0x28, 0x30, 0x28, 0x0a, 0x0e, 0x0e, 0x0a, 0x00, 0xfe, 0x00}, |
{0xfe, 0x00, 0xc0, 0xa0, 0xc0, 0xa0, 0x20, 0x20, 0x38, 0x0a, 0x0e, 0x0e, 0x0a, 0x00, 0xfe, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x9c, 0xd2, 0xbc, 0x92, 0x9c, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0xfe, 0x00}, |
{0x00, 0x18, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x66, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00}, |
{0x00, 0xcc, 0xcc, 0xcc, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x38, 0x3c, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x6b, 0x6b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x92, 0x44, 0x28, 0x92, 0x28, 0x44, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xc3, 0xdb, 0x1b, 0x1e, 0x1c, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x7c, 0x00, 0x00}, |
{0x7c, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x38, 0x6c, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x28, 0x00, 0x00, 0x44, 0xee, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7b, 0xcf, 0xcf, 0x1b, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xde, 0xf3, 0xf3, 0xc6, 0xcc, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x06, 0x06, 0x0c, 0x0c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xdb, 0xdb, 0xdb, 0xde, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x3e, 0x72, 0xf2, 0xf2, 0xf2, 0x72, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf8, 0x9c, 0x9e, 0x9e, 0x9e, 0x9c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x18, 0x38, 0x78, 0xd8, 0xfc, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xf8, 0xc0, 0xf0, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x78, 0xc0, 0xf0, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xf8, 0xd8, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0x70, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd8, 0xd8, 0x78, 0x18, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x60, 0x60, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x60, 0x30, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xb0, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x30, 0x60, 0xc8, 0xf8, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x30, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0xd8, 0xfc, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xc0, 0xf0, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xc0, 0xf0, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xd8, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x70, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0xd8, 0x78, 0x18, 0xf0, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x60, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0xc0, 0xcf, 0xcc, 0xcc, 0x7f, 0x0c, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x04, 0x7c, 0xce, 0xc8, 0xc8, 0xd0, 0xd0, 0xd0, 0xe0, 0xe6, 0x7c, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xd6, 0xd8, 0xd8, 0xd8, 0xde, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xc0, 0xc0, 0xc0, 0xf0, 0xcd, 0xce, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x60, 0xf8, 0x60, 0xf8, 0x60, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0xec, 0xd6, 0xde, 0xd6, 0xd6, 0xf6, 0xd6, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x66, 0x76, 0xff, 0x76, 0x6e, 0xff, 0x6e, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x62, 0x66, 0x6f, 0x66, 0x66, 0xf3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xf8, 0xe0, 0xf3, 0xd6, 0xdb, 0xce, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x81, 0x81, 0x81, 0x5a, 0xff, 0x5a, 0xff, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf2, 0x8a, 0xaa, 0xaa, 0xaa, 0xaa, 0xa2, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x3e, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x7c, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x36, 0x60, 0xfc, 0x60, 0xf8, 0x60, 0x60, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x6c, 0x78, 0xfe, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x1e, 0x78, 0x1e, 0x78, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x7c, 0xb6, 0x36, 0x33, 0x33, 0x33, 0x63, 0x66, 0xf6, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd0, 0xd2, 0xd6, 0x7c, 0x18, 0x30, 0x6e, 0xd8, 0x98, 0x18, 0x0e, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xd0, 0xd2, 0xd6, 0x7c, 0x18, 0x30, 0x6e, 0xd8, 0x8c, 0x06, 0x1c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x62, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0x62, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4e, 0xb9, 0x58, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x7c, 0xda, 0xd8, 0xd8, 0xda, 0x7c, 0x19, 0x3f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xc0, 0xc2, 0xc6, 0x7c, 0x18, 0x30, 0x6e, 0xdb, 0x9b, 0x1b, 0x0e, 0x00, 0x00, 0x00}, |
{0x00, 0x70, 0xc0, 0xc2, 0xc6, 0x7c, 0x18, 0x30, 0x7b, 0xdb, 0x9b, 0x1b, 0x0d, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc2, 0xc0, 0x78, 0xc0, 0xc0, 0xc2, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x86, 0x26, 0x3e, 0x26, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7f, 0xb9, 0x58, 0x1a, 0x1e, 0x1a, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x66, 0x46, 0x87, 0x8c, 0x8c, 0x7c, 0x98, 0x98, 0x70, 0x00}, |
{0x00, 0x00, 0x52, 0xb5, 0x15, 0x16, 0x2c, 0x34, 0x68, 0xa9, 0xaa, 0x4c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x48, 0xb0, 0x80, 0x48, 0x7c, 0x66, 0x26, 0x26, 0xa6, 0x46, 0x06, 0x34, 0x48, 0x00}, |
{0x00, 0x00, 0xe2, 0xa2, 0xa2, 0xa2, 0xbe, 0xa2, 0xa2, 0xa2, 0xa2, 0xe2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x36, 0x3b, 0x3b, 0x33, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x1e, 0x18, 0x76, 0x3b, 0x3b, 0x33, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x33, 0x4e, 0x06, 0x06, 0x0c, 0x0c, 0x1f, 0x6c, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x71, 0x8e, 0x04, 0x0c, 0x06, 0x03, 0x63, 0xc3, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x46, 0x49, 0x39, 0x1e, 0x18, 0x30, 0x70, 0xb1, 0xba, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0e, 0x19, 0x31, 0x32, 0x64, 0x68, 0x70, 0xe1, 0x66, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd8, 0xff, 0xd8, 0xde, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xde, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe2, 0xa2, 0xb2, 0xb2, 0xaa, 0xaa, 0xa6, 0xa6, 0xa2, 0xe2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xcc, 0xcf, 0xed, 0xff, 0xfc, 0xdf, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0xb9, 0xa5, 0xa5, 0xb9, 0xa1, 0xa1, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x40, 0x8e, 0x93, 0xa3, 0x63, 0x4b, 0x6a, 0xa4, 0xb0, 0xb0, 0x60, 0x00}, |
{0x00, 0x00, 0xfc, 0xa2, 0xa2, 0xa2, 0xa2, 0xbc, 0xa0, 0xa0, 0xa0, 0xe0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xa2, 0xa2, 0xa2, 0xa2, 0xa2, 0xa2, 0xaa, 0xa6, 0x7e, 0x01, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x4d, 0x4d, 0x19, 0x1e, 0x1c, 0x34, 0x34, 0xb5, 0x62, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x58, 0xa6, 0xa3, 0x6c, 0xb8, 0x26, 0x26, 0x26, 0xa7, 0xc2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0xa2, 0xa2, 0xa2, 0xa2, 0xbc, 0xb0, 0xa8, 0xa4, 0xe2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x6d, 0x67, 0x66, 0xee, 0x08, 0x00, 0x00, 0x00}, |
{0x30, 0x0c, 0xfc, 0xc6, 0xc6, 0xc6, 0xfc, 0xd8, 0xdc, 0xdc, 0xe6, 0xe6, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x71, 0xdb, 0x35, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x52, 0x5a, 0x52, 0x5f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf1, 0x5b, 0x55, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x18, 0xce, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xe6, 0x6c, 0x38, 0x50, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x0a, 0x14, 0x14, 0x28, 0x28, 0x50, 0x50, 0xa0, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x9c, 0x30, 0xfe, 0x0c, 0x18, 0x38, 0x0c, 0x06, 0x06, 0xc6, 0xc6, 0x7c, 0x00}, |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0x6c, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x26, 0x03, 0x13, 0x0c, 0x13, 0x03, 0x03, 0x66, 0x98, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x6c, 0x38, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x2d, 0x2d, 0x1a, 0x1e, 0x1b, 0x31, 0x31, 0xb2, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x14, 0x6b, 0xc8, 0xcc, 0xc6, 0xc6, 0xcc, 0xc0, 0x63, 0x1c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xe7, 0xff, 0xe0, 0x67, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x26, 0x44, 0xf8, 0xc0, 0xc8, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x4c, 0x52, 0x3c, 0x10, 0x3c, 0x60, 0xc0, 0xc3, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x73, 0xce, 0x18, 0x3a, 0x5c, 0x18, 0x30, 0x30, 0xb0, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x2c, 0x3c, 0x2c, 0x8c, 0xcc, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x12, 0x12, 0x12, 0x16, 0x36, 0x3e, 0x3a, 0x5a, 0x52, 0x91, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x26, 0x46, 0xc6, 0xc4, 0xc8, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x42, 0xc6, 0xe7, 0x7a, 0x38, 0x5c, 0xce, 0xe7, 0x63, 0xe2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xfc, 0x7e, 0x06, 0x06, 0x06, 0x06, 0x0c, 0x7e, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x40, 0x78, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x1e, 0x7e, 0xf2, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xfe, 0x7e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x38, 0x00, 0x78, 0x38, 0x38, 0x38, 0x38, 0x38, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0xff, 0x83, 0x86, 0x82, 0xfe, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xdc, 0x86, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0xc6, 0xfc, 0x18, 0x30, 0x60, 0xdc, 0x86, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xde, 0x98, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0xc6, 0xfc, 0x18, 0x30, 0x60, 0xde, 0x98, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0x36, 0xec, 0x18, 0x30, 0x60, 0xde, 0x98, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0x30, 0x70, 0xb2, 0xf6, 0x3c, 0x18, 0x30, 0x60, 0xde, 0x98, 0x1c, 0x06, 0x1c, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xdc, 0xb0, 0x3c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xf0, 0xc0, 0xe2, 0x36, 0xec, 0x18, 0x30, 0x60, 0xdc, 0xb0, 0x3c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xdc, 0xb6, 0x1c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xe0, 0x30, 0x62, 0x36, 0xec, 0x18, 0x30, 0x60, 0xdc, 0xb6, 0x1c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xf0, 0x80, 0xe2, 0x36, 0xec, 0x18, 0x30, 0x60, 0xdc, 0xb6, 0x1c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xf0, 0x30, 0x62, 0x66, 0x6c, 0x18, 0x30, 0x60, 0xdc, 0xb6, 0x1c, 0x36, 0x1c, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xce, 0xce, 0xc4, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x73, 0x73, 0x23, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x65, 0x65, 0x65, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0x55, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xce, 0xce, 0xce, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0x73, 0x73, 0x73, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x95, 0x95, 0x95, 0x65, 0x65, 0x65, 0x95, 0x95, 0x95, 0x95, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xdb, 0xdb, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xce, 0xc4, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x73, 0x23, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x05, 0x05, 0x00, 0x95, 0x95, 0x95, 0x95, 0x95, 0x65, 0x65, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x15, 0x15, 0x00, 0xb5, 0xb5, 0xb5, 0xb5, 0x55, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0x00, 0xdb, 0xdb, 0xce, 0xce, 0xce, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x00, 0xdb, 0xdb, 0x73, 0x73, 0x73, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x05, 0x05, 0x00, 0x95, 0x95, 0x65, 0x65, 0x95, 0x95, 0x95, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x5a, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x5a, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xcc, 0xe6, 0xd6, 0xd6, 0xd6, 0xd6, 0xe6, 0xcc, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x5a, 0x99, 0xbd, 0xdb, 0xdb, 0xbd, 0x99, 0x5a, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0xcc, 0x86, 0x06, 0x06, 0x06, 0x06, 0x86, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xff, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0xff, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xf0, 0xe0, 0xb0, 0x18, 0x0c, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0f, 0x07, 0x0d, 0x18, 0x30, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x30, 0x18, 0x0d, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x0c, 0x18, 0xb0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x62, 0xff, 0x64, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x26, 0xff, 0x46, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xce, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x73, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xff, 0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x36, 0xff, 0x36, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x66, 0xfc, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x3f, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x63, 0xff, 0x63, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xc6, 0xff, 0xc6, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x33, 0x63, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0xc6, 0x7f, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x3b, 0x6b, 0xfe, 0x68, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x60, 0xdc, 0xd6, 0x7f, 0x16, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x5a, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x6e, 0xff, 0x76, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x30, 0x60, 0x63, 0xff, 0xc6, 0x16, 0x1c, 0x1c, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x66, 0x36, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0xcc, 0xd8, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x36, 0x66, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xd8, 0xcc, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0c, 0x0c, 0x3f, 0x1e, 0x0c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x36, 0x66, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x1e, 0x33, 0x33, 0x33, 0x30, 0xfc, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0x0c, 0x3f, 0x1e, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x00, 0xf0, 0xe0, 0xb0, 0x18, 0x0c, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x98, 0xb0, 0xff, 0xb0, 0x98, 0x19, 0x0d, 0xff, 0x0d, 0x19, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x1e, 0x1c, 0x16, 0x03, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x78, 0x38, 0x68, 0xc0, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x1c, 0x1e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1e, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x06, 0xff, 0x06, 0x0c, 0x30, 0x60, 0xff, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x2e, 0x3f, 0x24, 0x24, 0x24, 0x24, 0xfc, 0x74, 0x24, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x60, 0xff, 0x60, 0x30, 0x0c, 0x06, 0xff, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x7e, 0xff, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0xff, 0x7e, 0x24, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xff, 0x00, 0xff, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0xff, 0x00, 0xff, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x7f, 0xc4, 0x7f, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x7e, 0xcb, 0x7e, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xfe, 0x23, 0xfe, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7f, 0xc0, 0x7f, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x7c, 0xee, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0x03, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0xee, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x7e, 0xc3, 0x7e, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x7c, 0xee, 0x6c, 0x6c, 0x6c, 0x6c, 0xee, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xf0, 0xe0, 0xb0, 0xd8, 0xec, 0xb6, 0x1b, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0f, 0x07, 0x0d, 0x1b, 0x37, 0x6d, 0xd8, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x20, 0x30, 0xd8, 0x6d, 0x37, 0x1b, 0x0d, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x0c, 0x1b, 0xb6, 0xec, 0xd8, 0xb0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x3f, 0x60, 0xff, 0x60, 0x3f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0xfc, 0x06, 0xff, 0x06, 0xfc, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x6a, 0xff, 0x65, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xa6, 0xff, 0x56, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x3c, 0x18, 0x3c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x3c, 0x18, 0x3c, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xd5, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0x66, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x06, 0xab, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xb0, 0xff, 0xb0, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x0d, 0xff, 0x0d, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x3f, 0x41, 0x81, 0x41, 0x3f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0xc6, 0x44, 0x44, 0x44, 0x44, 0x44, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0xfc, 0x82, 0x81, 0x82, 0xfc, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0x44, 0x44, 0x44, 0x44, 0x44, 0xc6, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0xc6, 0x44, 0x44, 0x7c, 0x00, 0x7c, 0x44, 0x7c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0xc6, 0x44, 0x44, 0x44, 0xc6, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x7c, 0xc6, 0x44, 0x44, 0x44, 0xc6, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x54, 0xd6, 0x54, 0x54, 0x54, 0xd6, 0x92, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x28, 0x54, 0xee, 0x44, 0xc6, 0x44, 0x44, 0x44, 0x44, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x28, 0x54, 0xee, 0x44, 0xc6, 0x44, 0x44, 0xc6, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xe8, 0xbc, 0x82, 0x81, 0x82, 0xbc, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x80, 0xbc, 0xb8, 0xac, 0x86, 0x83, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x01, 0x81, 0xc1, 0x61, 0x35, 0x1d, 0x3d, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0xc6, 0x44, 0x44, 0x44, 0xc6, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0xfe, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x60, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x06, 0x06, 0x3e, 0x66, 0xc6, 0xc6, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x7e, 0x06, 0x06, 0x06, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0xfe, 0x16, 0x16, 0x16, 0x7e, 0x16, 0x26, 0x26, 0x26, 0xfe, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x3e, 0x66, 0xcf, 0xdb, 0xdb, 0xf3, 0x66, 0x7c, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x3e, 0x60, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, 0x60, 0x3e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x3e, 0x64, 0xc8, 0xc8, 0xfe, 0xc8, 0xd0, 0x70, 0x3e, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x3e, 0x60, 0xc0, 0xfe, 0xc0, 0x60, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xf8, 0x0c, 0x06, 0x06, 0xfe, 0x06, 0x06, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0xf8, 0x1c, 0x16, 0x26, 0xfe, 0x26, 0x26, 0x4c, 0xf8, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xf8, 0x0c, 0x06, 0xfe, 0x06, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xe7, 0x00, 0x00}, |
{0x00, 0x00, 0xe7, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xc1, 0x60, 0x30, 0x18, 0x0c, 0x0c, 0x18, 0x30, 0x60, 0xc1, 0xff, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00}, |
{0x00, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x7e, 0x18, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x06, 0x06, 0x06, 0x0c, 0xcc, 0x6c, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe3, 0x33, 0x66, 0x36, 0xe6, 0x0c, 0xcc, 0x6c, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x33, 0x73, 0xb6, 0xf6, 0x36, 0x0c, 0xcc, 0x6c, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdb, 0xdb, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x16, 0x0c, 0x1c, 0x34, 0x62, 0xff, 0x02, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x38, 0xe8, 0x38, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x1a, 0x1c, 0x38, 0x58, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6e, 0x7c, 0xec, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x1a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x58, 0x30, 0x00, 0x00}, |
{0x33, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00}, |
{0x2a, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0xa8, 0x00, 0x00}, |
{0x0c, 0x1a, 0x18, 0x18, 0x3c, 0x5a, 0x99, 0x99, 0x5a, 0x3c, 0x18, 0x18, 0x58, 0x30, 0x00, 0x00}, |
{0x33, 0x66, 0x66, 0x66, 0x7e, 0xe7, 0xe7, 0xe7, 0xe7, 0x7e, 0x66, 0x66, 0x66, 0xcc, 0x00, 0x00}, |
{0x2a, 0x54, 0x54, 0x54, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x54, 0x54, 0x54, 0xa8, 0x00, 0x00}, |
{0x18, 0x34, 0x30, 0x30, 0x38, 0x35, 0x33, 0x37, 0x30, 0x30, 0x30, 0x30, 0xb0, 0x60, 0x00, 0x00}, |
{0x0c, 0x1a, 0x18, 0x18, 0x3c, 0x5a, 0xfa, 0x5a, 0x5a, 0x3c, 0x18, 0x18, 0x58, 0x30, 0x00, 0x00}, |
{0x0c, 0x1a, 0x18, 0x18, 0x3c, 0x5a, 0x5f, 0x5a, 0x5a, 0x3c, 0x18, 0x18, 0x58, 0x30, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0xfc, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x7e, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x76, 0xdc, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xdb, 0xdb, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0xdb, 0xdb, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x1c, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x10, 0x76, 0xdc, 0x10, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x76, 0xdc, 0x10, 0xfe, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x08, 0xfe, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x08, 0x76, 0xdc, 0x10, 0xfe, 0x20, 0xfe, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x76, 0xdc, 0x10, 0x76, 0xdc, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x7c, 0x00, 0x7c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x00, 0x00, 0x66, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0x60, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x06, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc0, 0xdf, 0x00, 0x00, 0xdf, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0xfb, 0x00, 0x00, 0xfb, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x28, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x10, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x44, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x44, 0x28, 0x10, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x10, 0x7c, 0x28, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x10, 0x28, 0x44, 0x7c, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x26, 0x7c, 0xb4, 0x6c, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x68, 0x54, 0x54, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x08, 0x10, 0x00, 0x10, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x08, 0x7e, 0x08, 0x10, 0x7e, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x08, 0xfe, 0x08, 0x10, 0xfe, 0x10, 0x20, 0xfe, 0x20, 0x40, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x08, 0xfe, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x08, 0xfe, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x1b, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 0x1b, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x66, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x66, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0xce, 0x7c, 0x10, 0x7c, 0xe6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x04, 0x0e, 0x38, 0xe8, 0x38, 0x0e, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0xe0, 0x38, 0x2e, 0x38, 0xe0, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x04, 0x0e, 0x38, 0xe8, 0x38, 0x0e, 0x10, 0xfe, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0xe0, 0x38, 0x2e, 0x38, 0xe0, 0x40, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x04, 0x0e, 0x38, 0xe8, 0x38, 0x0e, 0x10, 0x76, 0xdc, 0x20, 0x20, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0xe0, 0x38, 0x2e, 0x38, 0xe0, 0x40, 0x76, 0xdc, 0x80, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x0e, 0x38, 0xe8, 0x38, 0x1e, 0xf0, 0x38, 0x2e, 0x38, 0xe0, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0xe8, 0x38, 0x0e, 0x38, 0xf0, 0x1e, 0x38, 0xe0, 0x38, 0x2e, 0x20, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x02, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x80, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x02, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0xf2, 0x1c, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x9e, 0x70, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x02, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x02, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x80, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x06, 0x0c, 0x38, 0xe8, 0x38, 0x1c, 0x16, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0xd0, 0x70, 0x38, 0x2e, 0x38, 0x60, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0xc0, 0xc0, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x7e, 0xc8, 0xc8, 0xd0, 0xd0, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0xfc, 0x16, 0x16, 0x26, 0x26, 0xfc, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0xc0, 0xc0, 0x7e, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0xfc, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x7e, 0xc8, 0xc8, 0xd0, 0xd0, 0x7e, 0x20, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0xfc, 0x16, 0x16, 0x26, 0x26, 0xfc, 0x40, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0xc0, 0xc0, 0x7e, 0x08, 0xfe, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfc, 0x06, 0x06, 0x06, 0x06, 0xfc, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0x92, 0xa2, 0xfa, 0xa2, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x92, 0xba, 0xba, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x92, 0xba, 0x92, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x54, 0x92, 0xfe, 0x92, 0x54, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0xfe, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0xaa, 0x92, 0xaa, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x8a, 0x92, 0xa2, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x92, 0xba, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x92, 0xaa, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x54, 0xd6, 0xba, 0xd6, 0x54, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0xba, 0x82, 0xba, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0xba, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x92, 0x92, 0xfe, 0x92, 0x92, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0xfe, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xaa, 0x92, 0xaa, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x92, 0xba, 0x92, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0xff, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x7e, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x7e, 0x60, 0x7e, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xd8, 0xdf, 0xd8, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xa8, 0xa8, 0xa8, 0xa8, 0xaf, 0xa8, 0xa8, 0xa8, 0xa8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd8, 0xd8, 0xdf, 0xd8, 0xdf, 0xd8, 0xd8, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc2, 0xc4, 0xc4, 0xff, 0xc8, 0xc8, 0xd0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xc4, 0xc4, 0xff, 0xc8, 0xff, 0xd0, 0xd0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd9, 0xda, 0xda, 0xdf, 0xda, 0xda, 0xdc, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xd8, 0xd9, 0xda, 0xdf, 0xda, 0xdf, 0xda, 0xdc, 0xd8, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x0c, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x60, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x06, 0x1e, 0x76, 0xc6, 0x76, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc0, 0xf0, 0xdc, 0xc6, 0xdc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x1e, 0x76, 0xc6, 0x76, 0x1e, 0x06, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xf0, 0xdc, 0xc6, 0xdc, 0xf0, 0xc0, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xbf, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfd, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0xc6, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xf0, 0xc8, 0xc4, 0xc4, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0b, 0x13, 0x23, 0x43, 0x83, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x92, 0x44, 0x28, 0x92, 0x28, 0x44, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0xc6, 0xaa, 0x92, 0xaa, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0xc4, 0xa8, 0x90, 0xa8, 0xc4, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x82, 0x46, 0x2a, 0x12, 0x2a, 0x46, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x28, 0x44, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x28, 0x44, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x3e, 0x60, 0xce, 0xd8, 0xd8, 0xce, 0x60, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xf8, 0x0c, 0xe6, 0x36, 0x36, 0xe6, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x44, 0x92, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x10, 0x38, 0x54, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x64, 0xce, 0x64, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x4c, 0xe6, 0x4c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x15, 0x2a, 0x54, 0xa8, 0x54, 0x2a, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xa8, 0x54, 0x2a, 0x15, 0x2a, 0x54, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0xfe, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0x00}, |
{0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0xfe, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x02, 0x06, 0x1c, 0xf2, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xc0, 0x70, 0x9e, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0a, 0x0e, 0x1c, 0xf0, 0x1c, 0x16, 0xf2, 0x1c, 0x26, 0x22, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x88, 0xc8, 0x70, 0x1e, 0x70, 0xd0, 0x9e, 0x70, 0xe0, 0xa0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0xfe, 0xc8, 0xc8, 0xd0, 0xd0, 0xfe, 0x20, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0xfe, 0x16, 0x16, 0x26, 0x26, 0xfe, 0x40, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x08, 0xfe, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0xfe, 0x10, 0xfe, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 0xe0, 0x38, 0x0e, 0x10, 0x76, 0xdc, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xe0, 0x38, 0x0e, 0x38, 0xe0, 0x10, 0x76, 0xdc, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x02, 0x06, 0x1c, 0xf0, 0x1c, 0x06, 0x02, 0x10, 0x76, 0xdc, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x80, 0xc0, 0x70, 0x1e, 0x70, 0xc0, 0x80, 0x10, 0x76, 0xdc, 0x10, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x0e, 0x1e, 0x76, 0xd6, 0x76, 0x1e, 0x26, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0xc8, 0xf0, 0xdc, 0xd6, 0xdc, 0xf0, 0xe0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x0e, 0x1e, 0x76, 0xd6, 0x76, 0x1e, 0x26, 0x20, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0xc8, 0xf0, 0xdc, 0xd6, 0xdc, 0xf0, 0xe0, 0x20, 0xfe, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x3d, 0x66, 0xc7, 0xcb, 0xd3, 0xe3, 0x66, 0xbc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x42, 0xa5, 0x7e, 0x24, 0x24, 0x7e, 0xa5, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x38, 0x54, 0x8a, 0xf6, 0x82, 0x54, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0xfe, 0xfe, 0x44, 0x44, 0x28, 0x10, 0x28, 0x44, 0x44, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x00, 0x00}, |
{0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0x00, 0x00}, |
{0x00, 0x03, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, |
{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, |
{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x03, 0x00, 0x00}, |
{0x00, 0xc0, 0x60, 0x30, 0x30, 0x18, 0x18, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, |
{0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, |
{0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x18, 0x18, 0x30, 0x30, 0x60, 0xc0, 0x00, 0x00}, |
{0x00, 0x3f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, |
{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, |
{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3f, 0x00, 0x00}, |
{0x00, 0xfc, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, |
{0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c}, |
{0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xfc, 0x00, 0x00}, |
{0x00, 0x07, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xe0, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x07, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0xe0, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x07, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xe0, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x07, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xe0}, |
{0xe0, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x07}, |
{0x00, 0x00, 0xff, 0xc1, 0xc0, 0x60, 0x60, 0x60, 0x60, 0x30, 0x30, 0x30, 0x30, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x30, 0x30, 0x30, 0x30, 0x60, 0x60, 0x60, 0x60, 0xc0, 0xc1, 0xff, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xff, 0x00, 0xff, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0x78, 0x78, 0x38, 0x38, 0x18, 0x18, 0x00, 0x00}, |
{0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}, |
{0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03}, |
{0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x07, 0x05, 0x05, 0x05, 0x05, 0x25, 0x79, 0xc2, 0x7c, 0x20, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd8, 0xd8, 0xf8, 0xd8, 0xd8, 0x0f, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xf0, 0x0f, 0x0c, 0x0e, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd8, 0xd8, 0xf8, 0x70, 0x20, 0x0f, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xf0, 0xc0, 0xe0, 0xc0, 0xc0, 0x0f, 0x0c, 0x0e, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0xc0, 0xc0, 0xc0, 0x70, 0x1e, 0x1b, 0x1e, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x98, 0xd8, 0xf8, 0xd8, 0xd8, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7c, 0xfe, 0xc6, 0xc6, 0x60, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1f, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0xfc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xfc, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xfc, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xfc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xfc, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0x1f, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0xff, 0xff, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0e, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x0c, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80}, |
{0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01}, |
{0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x18, 0x18, 0x24, 0x24, 0x42, 0x42, 0x81, 0x81}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, |
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe}, |
{0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc}, |
{0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8}, |
{0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0}, |
{0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0}, |
{0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}, |
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80}, |
{0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f}, |
{0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44}, |
{0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa}, |
{0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77}, |
{0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, |
{0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0xba, 0xba, 0xba, 0xba, 0xba, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0xfe, 0x82, 0xfe, 0x82, 0xfe, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xaa, 0xfe, 0xaa, 0xfe, 0xaa, 0xfe, 0xaa, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x8a, 0xc6, 0xa2, 0x92, 0x8a, 0xc6, 0xa2, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xa2, 0xc6, 0x8a, 0x92, 0xa2, 0xc6, 0x8a, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0xaa, 0xc6, 0xaa, 0x92, 0xaa, 0xc6, 0xaa, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x44, 0x44, 0x44, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x42, 0x84, 0x84, 0xfc, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x80, 0xc0, 0xa0, 0x90, 0x88, 0x84, 0x88, 0x90, 0xa0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x70, 0x78, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x70, 0x48, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x98, 0x86, 0x98, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0x7e, 0x3e, 0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x06, 0x0a, 0x12, 0x22, 0x42, 0x22, 0x12, 0x0a, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x38, 0x78, 0x38, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x38, 0x48, 0x38, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x32, 0xc2, 0x32, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0x44, 0x82, 0x82, 0x44, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x44, 0x54, 0xba, 0xba, 0x54, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x99, 0xbd, 0xbd, 0xbd, 0xbd, 0x99, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x28, 0x28, 0x44, 0x82, 0x82, 0x44, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x14, 0x40, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x02, 0x28, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x99, 0xa5, 0xa5, 0xa5, 0xa5, 0x99, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x72, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0x72, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x4e, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x4e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x81, 0xff, 0xff, 0xff, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x7e, 0xff, 0xff, 0xff, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x4e, 0x8f, 0x8f, 0x8f, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x4e, 0x8f, 0x8f, 0x8f, 0xff, 0xff, 0xff, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x70, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x70, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, |
{0xff, 0xff, 0xc3, 0xbd, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0xbd, 0xc3, 0xff, 0xff, 0xff, 0xff}, |
{0xff, 0xff, 0xc3, 0xbd, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0xbd, 0xc3, 0xff, 0xff, 0xff, 0xff}, |
{0x00, 0x00, 0x30, 0x40, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0c, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x1f, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f, 0xff, 0xff}, |
{0x80, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0xfe, 0xff, 0xff}, |
{0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xfc, 0xf8, 0xf8, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80}, |
{0xff, 0xff, 0x7f, 0x7f, 0x3f, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01, 0x01}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0xff, 0xfd, 0xf9, 0xf1, 0xf1, 0xe1, 0xc1, 0x81, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x81, 0x83, 0x87, 0x8f, 0x8f, 0x9f, 0xbf, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xff, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0x28, 0x44, 0x44, 0x92, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x74, 0x74, 0xf2, 0xf2, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0x38, 0x5c, 0x5c, 0x9e, 0x9e, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x92, 0x92, 0x92, 0xf2, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0xf2, 0x92, 0x92, 0x92, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0x9e, 0x92, 0x92, 0x92, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xfe, 0x92, 0x92, 0x92, 0x9e, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x4a, 0x89, 0x89, 0x89, 0xf9, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0xf9, 0x89, 0x89, 0x89, 0x4a, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x81, 0x9f, 0x91, 0x91, 0x91, 0x52, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x52, 0x91, 0x91, 0x91, 0x9f, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x54, 0x38, 0xfe, 0x38, 0x54, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x30, 0x7c, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x7c, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x38, 0xfe, 0x7c, 0x38, 0x6c, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x28, 0xee, 0x44, 0x54, 0x6c, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x34, 0x1c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xc6, 0xcc, 0xd8, 0xf0, 0xd8, 0xcd, 0xc7, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x92, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0xa5, 0xa5, 0x42, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x42, 0xa5, 0xa5, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x78, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x36, 0x36, 0x1c, 0x18, 0x30, 0x70, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x86, 0x8a, 0xba, 0x92, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0xfe, 0x82, 0xee, 0xba, 0xba, 0xee, 0x82, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x82, 0xc6, 0x6c, 0x7c, 0x38, 0x7c, 0x6c, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x7c, 0x82, 0xaa, 0x82, 0x44, 0x7c, 0x44, 0x38, 0x00, 0x44, 0xc6, 0x38, 0xc6, 0x44, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x44, 0xee, 0xfe, 0x92, 0xba, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x7e, 0x18, 0x18, 0xff, 0x18, 0x1e, 0x78, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x7e, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x38, 0x10, 0x10, 0x92, 0xfe, 0x92, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x72, 0xe0, 0xc4, 0xdf, 0xce, 0xca, 0xe0, 0x72, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x54, 0x28, 0x54, 0xaa, 0xaa, 0xaa, 0xaa, 0x54, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x5a, 0x99, 0x99, 0x99, 0xbd, 0xff, 0xdb, 0x5a, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x42, 0x81, 0x85, 0xb1, 0xf9, 0xff, 0xdf, 0x7e, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0xee, 0xee, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0x81, 0x99, 0xa5, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xa5, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xdb, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x54, 0x28, 0xc6, 0x28, 0x54, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x78, 0x14, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x14, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x28, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x28, 0x1e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x06, 0x0e, 0x1a, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x03, 0x03, 0x7b, 0xcf, 0xcf, 0xcf, 0x0f, 0x1b, 0x33, 0xff, 0x03, 0x03, 0x03, 0x00, 0x00}, |
{0x00, 0x00, 0x60, 0xf0, 0x60, 0x6e, 0x73, 0x63, 0x63, 0x66, 0x66, 0x63, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xd6, 0x54, 0x54, 0x7c, 0x54, 0x54, 0xd6, 0x38, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x3c, 0xdb, 0xdb, 0xdb, 0xdb, 0x7e, 0x3c, 0x18, 0x3c, 0x18, 0x18, 0x00, 0x00}, |
{0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0xf8, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x42, 0xa5, 0xa5, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0xc3, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00}, |
{0x00, 0x00, 0xc3, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7e, 0xc3, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7e, 0xdb, 0xd8, 0x70, 0x00, 0x00, 0x0e, 0x1b, 0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1e, 0x33, 0x33, 0x33, 0x33, 0x1b, 0x7b, 0xdb, 0xdb, 0x73, 0x03, 0x01, 0x00, 0x00}, |
{0x00, 0x00, 0x94, 0x7c, 0x55, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x06, 0x0b, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x24, 0xe7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x94, 0x7c, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x04, 0x03, 0x00, 0x00}, |
{0x00, 0x00, 0x1f, 0x07, 0x8f, 0xdb, 0x73, 0x70, 0xd8, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x90, 0x50, 0x70, 0x68, 0x48, 0x48, 0x4e, 0x49, 0x09, 0x0e, 0x10, 0x20, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x2a, 0x7e, 0xaa, 0x00, 0x00, 0x2a, 0x7e, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc3, 0x66, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0x66, 0xc3, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x82, 0x82, 0x82, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x82, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x81, 0x81, 0x66, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x18, 0x24, 0x3c, 0xe7, 0xa5, 0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x38, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x30, 0x3c, 0x3e, 0x32, 0x30, 0x30, 0x30, 0x70, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x7f, 0x6f, 0x63, 0x63, 0x63, 0x63, 0xe3, 0xe7, 0xc7, 0x06, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x63, 0x63, 0xe7, 0xe7, 0xc6, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0xde, 0xe6, 0xc4, 0xd8, 0xe0, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x40, 0x40, 0x44, 0x5c, 0x74, 0x44, 0x44, 0x5c, 0x74, 0x44, 0x04, 0x04, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x04, 0x46, 0x5c, 0x74, 0xc4, 0x46, 0x5c, 0x74, 0xc4, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x3b, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3c, 0x6e, 0x66, 0x60, 0xfe, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x3e, 0x6e, 0x66, 0x66, 0xfe, 0x66, 0x66, 0x66, 0x66, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6e, 0xdb, 0xdb, 0xd8, 0xff, 0xdb, 0xdb, 0xdb, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x6f, 0xdb, 0xdb, 0xdb, 0xff, 0xdb, 0xdb, 0xdb, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x38, 0x6c, 0x6c, 0x6f, 0x6c, 0x6c, 0x6c, 0x6c, 0x6d, 0xf6, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x29, 0x5e, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x29, 0x5e, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x89, 0x86, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x0a, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x12, 0x0c, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0a, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0a, 0x00, 0x0a, 0x00, 0x06, 0x49, 0x89, 0x86, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x0a, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x14, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x12, 0x0c, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x88, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x88, 0x80, 0x88, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x94, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x80, 0x94, 0x80, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x88, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x94, 0x80, 0x88, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x0a, 0x00, 0x04, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x14, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x94, 0x80, 0x94, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x94, 0x80, 0x94, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x28, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x28, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x28, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x28, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x38, 0x28, 0x70, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x38, 0x28, 0x70, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x00, 0x14, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x14, 0x00, 0x00, 0x04, 0x07, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x00, 0x00, 0x04, 0x07, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x01, 0x02, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x01, 0x02, 0x04, 0x08, 0x48, 0x84, 0x82, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x18, 0x20, 0x10, 0x08, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x18, 0x20, 0x20, 0x10, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x48, 0x84, 0x82, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x46, 0x18, 0x20, 0x10, 0x08, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x46, 0x18, 0x20, 0x20, 0x10, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00}, |
{0x04, 0x09, 0x12, 0x04, 0x08, 0x48, 0x84, 0x82, 0x7d, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x46, 0x18, 0x20, 0x10, 0x08, 0x08, 0xf0, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x46, 0x18, 0x20, 0x20, 0x10, 0x08, 0xf7, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0xa4, 0x09, 0x12, 0x04, 0x08, 0x44, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xa4, 0x09, 0x12, 0x04, 0x08, 0x48, 0x84, 0x82, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xa2, 0x0c, 0x13, 0x0c, 0x10, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xa2, 0x0c, 0x13, 0x0c, 0x10, 0x10, 0x08, 0x04, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x41, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x00, 0x00, 0x01, 0x41, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x1c, 0x14, 0x38, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x38, 0x40, 0x38, 0x40, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x70, 0x80, 0x70, 0x80, 0x10, 0x68, 0x88, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf0, 0x10, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf7, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0x3d, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0x3d, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x38, 0x4c, 0x52, 0x32, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x60, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x3f, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x70, 0x80, 0x70, 0x80, 0x08, 0x14, 0x60, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x1c, 0x20, 0x1c, 0x20, 0x00, 0x00, 0x07, 0x18, 0x20, 0x3f, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x29, 0x01, 0x19, 0x21, 0x19, 0xa1, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x00, 0x2a, 0x02, 0x32, 0x42, 0x32, 0xc6, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0x00, 0xa3, 0x0c, 0x10, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x40, 0x00, 0xa3, 0x0c, 0x10, 0x10, 0x08, 0x04, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x18, 0x10, 0x20, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x18, 0x10, 0x20, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x08, 0x08, 0x08, 0x08, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x23, 0x54, 0x33, 0x24, 0x40, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x14, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x3c, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x3c, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x14, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x10, 0x00, 0x10}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x10, 0x00, 0x10}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x20, 0x20, 0x20, 0x20, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x10, 0x10, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x10, 0x10, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x98, 0x60, 0xc2, 0x12, 0x92, 0x9c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x92, 0x9c, 0x60, 0x0e, 0x70, 0x0e, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x60, 0x04, 0x54, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x10, 0x60, 0x04, 0x54, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x04, 0x54, 0x58, 0x20, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x04, 0x54, 0x58, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x00, 0x00}, |
{0x0e, 0xf0, 0x02, 0x92, 0x9c, 0x60, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x18, 0x60, 0x02, 0x92, 0x9c, 0x60, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x12, 0x9c, 0x60, 0x0e, 0x70, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x10, 0x28, 0x50, 0x28, 0x08, 0x08, 0x08, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x14, 0x28, 0x14, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x08, 0x10, 0x54, 0x38, 0x54, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x10, 0x08, 0x2a, 0x1c, 0x2a, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x2a, 0x14, 0x00, 0x21, 0x69, 0xa9, 0x69, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x08, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x20, 0x10, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x08, 0x08, 0x04, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x7c, 0x28, 0x7c, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x10, 0x2a, 0x24, 0x1a, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, 0x38, 0x38, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x20, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x54, 0x30, 0x18, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x08, 0x08, 0x10, 0x10, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x54, 0x58, 0x40, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x30, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x06, 0x18, 0x60, 0x06, 0x18, 0x60, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x12, 0xca, 0x2c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0c, 0x30, 0x00, 0x00}, |
{0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x06, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x08, 0x14, 0x0c, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x14, 0x18, 0x60, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x06, 0x18, 0x60, 0x00, 0x00}, |
{0x0a, 0x2a, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x12, 0x92, 0x9c, 0x60, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x20, 0x1e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x02, 0x3c, 0x40, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x01, 0x3e, 0x40, 0x08, 0x08, 0x08, 0x08, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x18, 0x20, 0x1c, 0x20, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x0c, 0x10, 0x0e, 0x10, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x0c, 0x10, 0x0e, 0x10, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x0c, 0x10, 0x0e, 0x10, 0x00, 0x00}, |
{0x00, 0x30, 0x40, 0x38, 0x40, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x30, 0x40, 0x38, 0x40, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x1c, 0x20, 0x1c, 0x20, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x28, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x50, 0x00, 0x10, 0x10, 0x68, 0x88, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x14, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x14, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x14, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x40, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x40, 0x80, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x88, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x80, 0x88, 0x80, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x80, 0x80, 0x80, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x20, 0x00, 0x00, 0x70, 0x8f, 0x30, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x00, 0x00, 0x70, 0x8f, 0x32, 0x41, 0x80, 0x80, 0x80, 0x40, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x00, 0x38, 0x47, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x00, 0x70, 0x8f, 0x32, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x08, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x08, 0x08, 0x04, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x07, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x07, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x14, 0x00, 0x01, 0x15, 0x88, 0x84, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x01, 0x15, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x14, 0x00, 0x00, 0x00, 0x2a, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x29, 0x31, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x29, 0x31, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x31, 0x9e, 0x88, 0x88, 0x70, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x29, 0x31, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x29, 0x31, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0x22, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x20, 0x20, 0x20, 0x2c, 0x32, 0x22, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0xa2, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0x22, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x24, 0x20, 0x20, 0x2c, 0x32, 0x22, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x1c, 0x22, 0x41, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x1c, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x40, 0x00, 0x00, 0x70, 0x80, 0x8c, 0x70, 0x40, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x08, 0x00, 0x00, 0x1e, 0x22, 0x1c, 0x22, 0x41, 0x80, 0x80, 0x80, 0x41, 0x3e, 0x00, 0x00}, |
{0x00, 0x00, 0x10, 0x00, 0x00, 0x0e, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x1e, 0x22, 0x1c, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x49, 0x85, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x04, 0x00, 0x06, 0x49, 0x89, 0x86, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x0c, 0x12, 0x0a, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x0c, 0x12, 0x12, 0x0c, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x09, 0x47, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x0a, 0x00, 0x00, 0x06, 0x09, 0x49, 0x87, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x0a, 0x06, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x14, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x0c, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x19, 0x21, 0x19, 0x21, 0x01, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x32, 0x42, 0x32, 0x42, 0x02, 0x86, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x18, 0x20, 0x10, 0x08, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x06, 0x18, 0x20, 0x20, 0x10, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x42, 0x82, 0x82, 0x84, 0x78, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x12, 0x3c, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x3c, 0x4b, 0x4a, 0x44, 0x40, 0x40, 0x40, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x32, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x32, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x08, 0x00, 0x00, 0x41, 0x81, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x41, 0x81, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x10, 0x10, 0x68, 0x88, 0x74, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x40, 0x30, 0x4e, 0x49, 0x39, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x24, 0x28, 0xf3, 0x24, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0e, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x0f, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x88, 0x86, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x24, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x88, 0x87, 0x81, 0x7e, 0x00, 0x24, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0xf8, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf7, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00}, |
{0x68, 0x90, 0x02, 0x22, 0x12, 0x0a, 0x04, 0x0c, 0x12, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x68, 0x90, 0x02, 0x32, 0x12, 0x0a, 0x0a, 0x0e, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x60, 0x80, 0x72, 0xa2, 0x12, 0x0a, 0x04, 0x0c, 0x12, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x30, 0x40, 0x3a, 0x52, 0x12, 0x0a, 0x0a, 0x0e, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x42, 0x22, 0x12, 0x0a, 0x04, 0x0c, 0x12, 0x3c, 0x00, 0x18, 0x20, 0x1c, 0x20, 0x00}, |
{0x00, 0x00, 0x22, 0x12, 0x12, 0x0a, 0x0a, 0x0e, 0x3d, 0x00, 0x00, 0x18, 0x20, 0x1c, 0x20, 0x00}, |
{0x00, 0x00, 0x42, 0x22, 0x12, 0x0a, 0x04, 0x0c, 0x12, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0x00, 0x00, 0x22, 0x12, 0x12, 0x0a, 0x0a, 0x0e, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, |
{0xf1, 0x35, 0x55, 0x8a, 0xe0, 0x06, 0x95, 0xd6, 0xb5, 0x97, 0x00, 0xee, 0x8a, 0xee, 0x28, 0xe8}, |
{0x00, 0x38, 0x7c, 0x7c, 0xc6, 0x92, 0xf2, 0xe6, 0xfe, 0xe6, 0x7c, 0x7c, 0x38, 0x00, 0x00, 0x00}, |
/* Special glyph for unknown character */ |
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00} |
/* 0 0x00 '^@' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 1 0x01 '^A' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x81, /* 10000001 */ |
0xa5, /* 10100101 */ |
0x81, /* 10000001 */ |
0x81, /* 10000001 */ |
0xbd, /* 10111101 */ |
0x99, /* 10011001 */ |
0x81, /* 10000001 */ |
0x81, /* 10000001 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 2 0x02 '^B' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xff, /* 11111111 */ |
0xdb, /* 11011011 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xc3, /* 11000011 */ |
0xe7, /* 11100111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 3 0x03 '^C' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 4 0x04 '^D' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 5 0x05 '^E' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0xe7, /* 11100111 */ |
0xe7, /* 11100111 */ |
0xe7, /* 11100111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 6 0x06 '^F' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 7 0x07 '^G' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 8 0x08 '^H' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xe7, /* 11100111 */ |
0xc3, /* 11000011 */ |
0xc3, /* 11000011 */ |
0xe7, /* 11100111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 9 0x09 '^I' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x42, /* 01000010 */ |
0x42, /* 01000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 10 0x0a '^J' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xc3, /* 11000011 */ |
0x99, /* 10011001 */ |
0xbd, /* 10111101 */ |
0xbd, /* 10111101 */ |
0x99, /* 10011001 */ |
0xc3, /* 11000011 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 11 0x0b '^K' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x0e, /* 00001110 */ |
0x1a, /* 00011010 */ |
0x32, /* 00110010 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 12 0x0c '^L' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 13 0x0d '^M' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x33, /* 00110011 */ |
0x3f, /* 00111111 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x70, /* 01110000 */ |
0xf0, /* 11110000 */ |
0xe0, /* 11100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 14 0x0e '^N' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7f, /* 01111111 */ |
0x63, /* 01100011 */ |
0x7f, /* 01111111 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x63, /* 01100011 */ |
0x67, /* 01100111 */ |
0xe7, /* 11100111 */ |
0xe6, /* 11100110 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 15 0x0f '^O' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xdb, /* 11011011 */ |
0x3c, /* 00111100 */ |
0xe7, /* 11100111 */ |
0x3c, /* 00111100 */ |
0xdb, /* 11011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 16 0x10 '^P' */ |
0x00, /* 00000000 */ |
0x80, /* 10000000 */ |
0xc0, /* 11000000 */ |
0xe0, /* 11100000 */ |
0xf0, /* 11110000 */ |
0xf8, /* 11111000 */ |
0xfe, /* 11111110 */ |
0xf8, /* 11111000 */ |
0xf0, /* 11110000 */ |
0xe0, /* 11100000 */ |
0xc0, /* 11000000 */ |
0x80, /* 10000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 17 0x11 '^Q' */ |
0x00, /* 00000000 */ |
0x02, /* 00000010 */ |
0x06, /* 00000110 */ |
0x0e, /* 00001110 */ |
0x1e, /* 00011110 */ |
0x3e, /* 00111110 */ |
0xfe, /* 11111110 */ |
0x3e, /* 00111110 */ |
0x1e, /* 00011110 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x02, /* 00000010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 18 0x12 '^R' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 19 0x13 '^S' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 20 0x14 '^T' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7f, /* 01111111 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0x7b, /* 01111011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 21 0x15 '^U' */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 22 0x16 '^V' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 23 0x17 '^W' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 24 0x18 '^X' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 25 0x19 '^Y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 26 0x1a '^Z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0xfe, /* 11111110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 27 0x1b '^[' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xfe, /* 11111110 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 28 0x1c '^\' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 29 0x1d '^]' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x28, /* 00101000 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x28, /* 00101000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 30 0x1e '^^' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0x7c, /* 01111100 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 31 0x1f '^_' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0x7c, /* 01111100 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 32 0x20 ' ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 33 0x21 '!' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 34 0x22 '"' */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x24, /* 00100100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 35 0x23 '#' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 36 0x24 '$' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0x7c, /* 01111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x86, /* 10000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 37 0x25 '%' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc2, /* 11000010 */ |
0xc6, /* 11000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0x86, /* 10000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 38 0x26 '&' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 39 0x27 ''' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 40 0x28 '(' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 41 0x29 ')' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 42 0x2a '*' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0xff, /* 11111111 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 43 0x2b '+' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 44 0x2c ',' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 45 0x2d '-' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 46 0x2e '.' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 47 0x2f '/' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x02, /* 00000010 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x80, /* 10000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 48 0x30 '0' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 49 0x31 '1' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x38, /* 00111000 */ |
0x78, /* 01111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 50 0x32 '2' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 51 0x33 '3' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x3c, /* 00111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 52 0x34 '4' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x1c, /* 00011100 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xfe, /* 11111110 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x1e, /* 00011110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 53 0x35 '5' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfc, /* 11111100 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 54 0x36 '6' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xfc, /* 11111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 55 0x37 '7' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 56 0x38 '8' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 57 0x39 '9' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 58 0x3a ':' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 59 0x3b ';' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 60 0x3c '<' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 61 0x3d '=' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 62 0x3e '>' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 63 0x3f '?' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 64 0x40 '@' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xde, /* 11011110 */ |
0xde, /* 11011110 */ |
0xde, /* 11011110 */ |
0xdc, /* 11011100 */ |
0xc0, /* 11000000 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 65 0x41 'A' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 66 0x42 'B' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xfc, /* 11111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 67 0x43 'C' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc2, /* 11000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 68 0x44 'D' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 69 0x45 'E' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x60, /* 01100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 70 0x46 'F' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 71 0x47 'G' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xde, /* 11011110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x66, /* 01100110 */ |
0x3a, /* 00111010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 72 0x48 'H' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 73 0x49 'I' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 74 0x4a 'J' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 75 0x4b 'K' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe6, /* 11100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x78, /* 01111000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 76 0x4c 'L' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf0, /* 11110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 77 0x4d 'M' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xee, /* 11101110 */ |
0xfe, /* 11111110 */ |
0xfe, /* 11111110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 78 0x4e 'N' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xe6, /* 11100110 */ |
0xf6, /* 11110110 */ |
0xfe, /* 11111110 */ |
0xde, /* 11011110 */ |
0xce, /* 11001110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 79 0x4f 'O' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 80 0x50 'P' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 81 0x51 'Q' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xde, /* 11011110 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0x0e, /* 00001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 82 0x52 'R' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfc, /* 11111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 83 0x53 'S' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 84 0x54 'T' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x5a, /* 01011010 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 85 0x55 'U' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 86 0x56 'V' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 87 0x57 'W' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xfe, /* 11111110 */ |
0xee, /* 11101110 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 88 0x58 'X' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x7c, /* 01111100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x7c, /* 01111100 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 89 0x59 'Y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 90 0x5a 'Z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x86, /* 10000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc2, /* 11000010 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 91 0x5b '[' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 92 0x5c '\' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x80, /* 10000000 */ |
0xc0, /* 11000000 */ |
0xe0, /* 11100000 */ |
0x70, /* 01110000 */ |
0x38, /* 00111000 */ |
0x1c, /* 00011100 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x02, /* 00000010 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 93 0x5d ']' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 94 0x5e '^' */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 95 0x5f '_' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 96 0x60 '`' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 97 0x61 'a' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 98 0x62 'b' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 99 0x63 'c' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 100 0x64 'd' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 101 0x65 'e' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 102 0x66 'f' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x36, /* 00110110 */ |
0x32, /* 00110010 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 103 0x67 'g' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0xcc, /* 11001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
/* 104 0x68 'h' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x6c, /* 01101100 */ |
0x76, /* 01110110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 105 0x69 'i' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 106 0x6a 'j' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
/* 107 0x6b 'k' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xe0, /* 11100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x78, /* 01111000 */ |
0x78, /* 01111000 */ |
0x6c, /* 01101100 */ |
0x66, /* 01100110 */ |
0xe6, /* 11100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 108 0x6c 'l' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 109 0x6d 'm' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xec, /* 11101100 */ |
0xfe, /* 11111110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 110 0x6e 'n' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 111 0x6f 'o' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 112 0x70 'p' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
/* 113 0x71 'q' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x7c, /* 01111100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x1e, /* 00011110 */ |
0x00, /* 00000000 */ |
/* 114 0x72 'r' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x76, /* 01110110 */ |
0x66, /* 01100110 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 115 0x73 's' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x38, /* 00111000 */ |
0x0c, /* 00001100 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 116 0x74 't' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0xfc, /* 11111100 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x36, /* 00110110 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 117 0x75 'u' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 118 0x76 'v' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 119 0x77 'w' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xd6, /* 11010110 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 120 0x78 'x' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 121 0x79 'y' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
/* 122 0x7a 'z' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xcc, /* 11001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 123 0x7b '{' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x0e, /* 00001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 124 0x7c '|' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 125 0x7d '}' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x70, /* 01110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x0e, /* 00001110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 126 0x7e '~' */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 127 0x7f '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 128 0x80 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0xc2, /* 11000010 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc2, /* 11000010 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 129 0x81 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 130 0x82 '' */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 131 0x83 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 132 0x84 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 133 0x85 ' ' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 134 0x86 '' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 135 0x87 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 136 0x88 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 137 0x89 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 138 0x8a '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 139 0x8b '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 140 0x8c '' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 141 0x8d '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 142 0x8e '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 143 0x8f '' */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 144 0x90 '' */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x66, /* 01100110 */ |
0x62, /* 01100010 */ |
0x68, /* 01101000 */ |
0x78, /* 01111000 */ |
0x68, /* 01101000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 145 0x91 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xec, /* 11101100 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x7e, /* 01111110 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x6e, /* 01101110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 146 0x92 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3e, /* 00111110 */ |
0x6c, /* 01101100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xfe, /* 11111110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xce, /* 11001110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 147 0x93 '' */ |
0x00, /* 00000000 */ |
0x10, /* 00010000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 148 0x94 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 149 0x95 '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 150 0x96 '' */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 151 0x97 '' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 152 0x98 '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7e, /* 01111110 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x78, /* 01111000 */ |
0x00, /* 00000000 */ |
/* 153 0x99 '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 154 0x9a '' */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 155 0x9b '' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 156 0x9c '' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x64, /* 01100100 */ |
0x60, /* 01100000 */ |
0xf0, /* 11110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xe6, /* 11100110 */ |
0xfc, /* 11111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 157 0x9d '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 158 0x9e '' */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xf8, /* 11111000 */ |
0xc4, /* 11000100 */ |
0xcc, /* 11001100 */ |
0xde, /* 11011110 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 159 0x9f '' */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x1b, /* 00011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 160 0xa0 ' ' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0x0c, /* 00001100 */ |
0x7c, /* 01111100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 161 0xa1 '¡' */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 162 0xa2 '¢' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 163 0xa3 '£' */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x00, /* 00000000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 164 0xa4 '¤' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0xdc, /* 11011100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 165 0xa5 '¥' */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0xc6, /* 11000110 */ |
0xe6, /* 11100110 */ |
0xf6, /* 11110110 */ |
0xfe, /* 11111110 */ |
0xde, /* 11011110 */ |
0xce, /* 11001110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 166 0xa6 '¦' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x3e, /* 00111110 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 167 0xa7 '§' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 168 0xa8 '¨' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x7c, /* 01111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 169 0xa9 '©' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 170 0xaa 'ª' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 171 0xab '«' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0xe0, /* 11100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xdc, /* 11011100 */ |
0x86, /* 10000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x3e, /* 00111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 172 0xac '¬' */ |
0x00, /* 00000000 */ |
0x60, /* 01100000 */ |
0xe0, /* 11100000 */ |
0x62, /* 01100010 */ |
0x66, /* 01100110 */ |
0x6c, /* 01101100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x66, /* 01100110 */ |
0xce, /* 11001110 */ |
0x9a, /* 10011010 */ |
0x3f, /* 00111111 */ |
0x06, /* 00000110 */ |
0x06, /* 00000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 173 0xad '' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 174 0xae '®' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x36, /* 00110110 */ |
0x6c, /* 01101100 */ |
0xd8, /* 11011000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 175 0xaf '¯' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xd8, /* 11011000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x6c, /* 01101100 */ |
0xd8, /* 11011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 176 0xb0 '°' */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
0x11, /* 00010001 */ |
0x44, /* 01000100 */ |
/* 177 0xb1 '±' */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
0x55, /* 01010101 */ |
0xaa, /* 10101010 */ |
/* 178 0xb2 '²' */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
0xdd, /* 11011101 */ |
0x77, /* 01110111 */ |
/* 179 0xb3 '³' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 180 0xb4 '´' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 181 0xb5 'µ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 182 0xb6 '¶' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 183 0xb7 '·' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 184 0xb8 '¸' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 185 0xb9 '¹' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x06, /* 00000110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 186 0xba 'º' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 187 0xbb '»' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x06, /* 00000110 */ |
0xf6, /* 11110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 188 0xbc '¼' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf6, /* 11110110 */ |
0x06, /* 00000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 189 0xbd '½' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 190 0xbe '¾' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 191 0xbf '¿' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xf8, /* 11111000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 192 0xc0 'À' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 193 0xc1 'Á' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 194 0xc2 'Â' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 195 0xc3 'Ã' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 196 0xc4 'Ä' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 197 0xc5 'Å' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 198 0xc6 'Æ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 199 0xc7 'Ç' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 200 0xc8 'È' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x30, /* 00110000 */ |
0x3f, /* 00111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 201 0xc9 'É' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x30, /* 00110000 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 202 0xca 'Ê' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf7, /* 11110111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 203 0xcb 'Ë' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xf7, /* 11110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 204 0xcc 'Ì' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x37, /* 00110111 */ |
0x30, /* 00110000 */ |
0x37, /* 00110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 205 0xcd 'Í' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 206 0xce 'Î' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xf7, /* 11110111 */ |
0x00, /* 00000000 */ |
0xf7, /* 11110111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 207 0xcf 'Ï' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 208 0xd0 'Ð' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 209 0xd1 'Ñ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 210 0xd2 'Ò' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 211 0xd3 'Ó' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x3f, /* 00111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 212 0xd4 'Ô' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 213 0xd5 'Õ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 214 0xd6 'Ö' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x3f, /* 00111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 215 0xd7 '×' */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0xff, /* 11111111 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
/* 216 0xd8 'Ø' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0xff, /* 11111111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 217 0xd9 'Ù' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xf8, /* 11111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 218 0xda 'Ú' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1f, /* 00011111 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 219 0xdb 'Û' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 220 0xdc 'Ü' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
/* 221 0xdd 'Ý' */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
0xf0, /* 11110000 */ |
/* 222 0xde 'Þ' */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
0x0f, /* 00001111 */ |
/* 223 0xdf 'ß' */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0xff, /* 11111111 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 224 0xe0 'à' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xdc, /* 11011100 */ |
0x76, /* 01110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 225 0xe1 'á' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x78, /* 01111000 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xcc, /* 11001100 */ |
0xd8, /* 11011000 */ |
0xcc, /* 11001100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xcc, /* 11001100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 226 0xe2 'â' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 227 0xe3 'ã' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 228 0xe4 'ä' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 229 0xe5 'å' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 230 0xe6 'æ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
/* 231 0xe7 'ç' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 232 0xe8 'è' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 233 0xe9 'é' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xfe, /* 11111110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 234 0xea 'ê' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0xee, /* 11101110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 235 0xeb 'ë' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1e, /* 00011110 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x3e, /* 00111110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x66, /* 01100110 */ |
0x3c, /* 00111100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 236 0xec 'ì' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 237 0xed 'í' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x03, /* 00000011 */ |
0x06, /* 00000110 */ |
0x7e, /* 01111110 */ |
0xdb, /* 11011011 */ |
0xdb, /* 11011011 */ |
0xf3, /* 11110011 */ |
0x7e, /* 01111110 */ |
0x60, /* 01100000 */ |
0xc0, /* 11000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 238 0xee 'î' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x1c, /* 00011100 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x7c, /* 01111100 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 239 0xef 'ï' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7c, /* 01111100 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0xc6, /* 11000110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 240 0xf0 'ð' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0xfe, /* 11111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 241 0xf1 'ñ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x7e, /* 01111110 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 242 0xf2 'ò' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x06, /* 00000110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 243 0xf3 'ó' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x30, /* 00110000 */ |
0x60, /* 01100000 */ |
0x30, /* 00110000 */ |
0x18, /* 00011000 */ |
0x0c, /* 00001100 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 244 0xf4 'ô' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x0e, /* 00001110 */ |
0x1b, /* 00011011 */ |
0x1b, /* 00011011 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
/* 245 0xf5 'õ' */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0xd8, /* 11011000 */ |
0x70, /* 01110000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 246 0xf6 'ö' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 247 0xf7 '÷' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x76, /* 01110110 */ |
0xdc, /* 11011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 248 0xf8 'ø' */ |
0x00, /* 00000000 */ |
0x38, /* 00111000 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x38, /* 00111000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 249 0xf9 'ù' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 250 0xfa 'ú' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x18, /* 00011000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 251 0xfb 'û' */ |
0x00, /* 00000000 */ |
0x0f, /* 00001111 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0x0c, /* 00001100 */ |
0xec, /* 11101100 */ |
0x6c, /* 01101100 */ |
0x6c, /* 01101100 */ |
0x3c, /* 00111100 */ |
0x1c, /* 00011100 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 252 0xfc 'ü' */ |
0x00, /* 00000000 */ |
0x6c, /* 01101100 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x36, /* 00110110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 253 0xfd 'ý' */ |
0x00, /* 00000000 */ |
0x3c, /* 00111100 */ |
0x66, /* 01100110 */ |
0x0c, /* 00001100 */ |
0x18, /* 00011000 */ |
0x32, /* 00110010 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 254 0xfe 'þ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x7e, /* 01111110 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
/* 255 0xff 'ÿ' */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
0x00, /* 00000000 */ |
}; |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/layout/cz.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/layout/us_dvorak.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/layout/us_qwerty.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/ctl/pl050.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/ctl/pc.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/ctl/stty.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/ctl/sun.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/ctl/gxe_fb.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/msim.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/sun.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/i8042.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/ski.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/z8530.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/sgcn.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/dummy.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/i8042.h |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/pl050.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/gxemul.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/port/ns16550.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/Makefile |
---|
31,11 → 31,11 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
include ../../../Makefile.config |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -Iinclude -I../libadt/include |
CFLAGS += -Iinclude |
LIBS = $(LIBC_PREFIX)/libc.a |
## Sources |
44,137 → 44,66 |
OUTPUT = kbd |
GENERIC_SOURCES = \ |
generic/kbd.c \ |
genarch/gsp.c \ |
genarch/stroke.c \ |
generic/keybuffer.c |
generic/key_buffer.c |
ARCH_SOURCES = |
GENARCH_SOURCES = \ |
layout/cz.c \ |
layout/us_qwerty.c \ |
layout/us_dvorak.c |
ARCH_SOURCES = \ |
arch/$(ARCH)/src/kbd.c |
ifeq ($(UARCH), amd64) |
GENARCH_SOURCES += \ |
port/i8042.c \ |
ctl/pc.c |
ifeq ($(ARCH), ia32) |
ARCH_SOURCES += \ |
arch/$(ARCH)/src/mouse.c \ |
arch/$(ARCH)/src/scanc.c |
GENARCH_SOURCES = \ |
genarch/src/kbd.c |
CFLAGS += -DMOUSE_ENABLED |
endif |
ifeq ($(UARCH), arm32) |
ifeq ($(MACHINE), testarm) |
GENARCH_SOURCES += \ |
port/gxemul.c |
ifeq ($(CONFIG_FB), y) |
GENARCH_SOURCES += \ |
ctl/gxe_fb.c |
else |
GENARCH_SOURCES += \ |
ctl/stty.c |
endif |
ifeq ($(ARCH), amd64) |
ARCH_SOURCES += \ |
arch/$(ARCH)/src/mouse.c \ |
arch/$(ARCH)/src/scanc.c |
GENARCH_SOURCES = \ |
genarch/src/kbd.c |
CFLAGS += -DMOUSE_ENABLED |
endif |
ifeq ($(MACHINE), integratorcp) |
GENARCH_SOURCES += \ |
port/pl050.c \ |
ctl/pl050.c |
ifeq ($(ARCH), sparc64) |
ARCH_SOURCES += \ |
arch/$(ARCH)/src/scanc.c |
GENARCH_SOURCES = \ |
genarch/src/kbd.c |
endif |
ifeq ($(ARCH), arm32) |
ARCH_SOURCES += \ |
arch/$(ARCH)/src/kbd_gxemul.c |
endif |
ifeq ($(UARCH), ia32) |
GENARCH_SOURCES += \ |
port/i8042.c \ |
ctl/pc.c |
endif |
ifeq ($(MACHINE), i460GX) |
GENARCH_SOURCES += \ |
port/i8042.c \ |
ctl/pc.c |
endif |
ifeq ($(MACHINE), ski) |
GENARCH_SOURCES += \ |
port/ski.c \ |
ctl/stty.c |
endif |
ifeq ($(MACHINE), msim) |
GENARCH_SOURCES += \ |
port/msim.c \ |
ctl/stty.c |
endif |
ifeq ($(MACHINE), lgxemul) |
GENARCH_SOURCES += \ |
port/gxemul.c |
ifeq ($(CONFIG_FB), y) |
GENARCH_SOURCES += \ |
ctl/gxe_fb.c |
else |
GENARCH_SOURCES += \ |
ctl/stty.c |
endif |
endif |
ifeq ($(MACHINE), bgxemul) |
GENARCH_SOURCES += \ |
port/gxemul.c |
ifeq ($(CONFIG_FB), y) |
GENARCH_SOURCES += \ |
ctl/gxe_fb.c |
else |
GENARCH_SOURCES += \ |
ctl/stty.c |
endif |
endif |
ifeq ($(UARCH), ppc32) |
GENARCH_SOURCES += \ |
port/dummy.c \ |
ctl/stty.c |
endif |
ifeq ($(UARCH), sparc64) |
ifeq ($(MACHINE),serengeti) |
GENARCH_SOURCES += \ |
port/sgcn.c \ |
ctl/stty.c |
else |
GENARCH_SOURCES += \ |
port/sun.c \ |
port/z8530.c \ |
port/ns16550.c \ |
ctl/sun.c |
endif |
endif |
GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) |
OBJECTS := $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(GENARCH_OBJECTS) |
.PHONY: all clean depend disasm links |
all: $(OUTPUT) $(OUTPUT).disasm |
all: links $(OUTPUT) $(OUTPUT).disasm |
-include Makefile.depend |
links: |
ln -sfn ../arch/$(ARCH)/include include/arch |
ln -sfn ../genarch/include include/genarch |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend include/arch include/genarch |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(OUTPUT): $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(GENARCH_OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(GENERIC_OBJECTS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/srv/kbd/generic/keybuffer.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/generic/kbd.c |
---|
28,139 → 28,57 |
/** |
* @addtogroup kbdgen generic |
* @brief HelenOS generic uspace keyboard handler. |
* @ingroup kbd |
* @brief HelenOS generic uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
*/ |
/** @file |
*/ |
#include <ipc/ipc.h> |
#include <ipc/services.h> |
#include <sysinfo.h> |
#include <stdio.h> |
#include <unistd.h> |
#include <stdlib.h> |
#include <stdio.h> |
#include <ipc/ns.h> |
#include <async.h> |
#include <errno.h> |
#include <adt/fifo.h> |
#include <io/console.h> |
#include <io/keycode.h> |
#include <arch/kbd.h> |
#include <kbd.h> |
#include <keybuffer.h> |
#include <kbd_port.h> |
#include <kbd_ctl.h> |
#include <layout.h> |
#include <libadt/fifo.h> |
#include <key_buffer.h> |
#include <async.h> |
#include <keys.h> |
#define NAME "kbd" |
int cons_connected = 0; |
int phone2cons = -1; |
keybuffer_t keybuffer; |
keybuffer_t keybuffer; |
/** Currently active modifiers. */ |
static unsigned mods = KM_NUM_LOCK; |
/** Currently pressed lock keys. We track these to tackle autorepeat. */ |
static unsigned lock_keys; |
int cir_service = 0; |
int cir_phone = -1; |
#define NUM_LAYOUTS 3 |
static layout_op_t *layout[NUM_LAYOUTS] = { |
&us_qwerty_op, |
&us_dvorak_op, |
&cz_op |
}; |
static int active_layout = 0; |
void kbd_push_scancode(int scancode) |
static void irq_handler(ipc_callid_t iid, ipc_call_t *call) |
{ |
/* printf("scancode: 0x%x\n", scancode);*/ |
kbd_ctl_parse_scancode(scancode); |
} |
int chr; |
void kbd_push_ev(int type, unsigned int key) |
{ |
console_event_t ev; |
unsigned mod_mask; |
#ifdef MOUSE_ENABLED |
if (mouse_arch_process(phone2cons, call)) |
return; |
#endif |
kbd_arch_process(&keybuffer, call); |
switch (key) { |
case KC_LCTRL: mod_mask = KM_LCTRL; break; |
case KC_RCTRL: mod_mask = KM_RCTRL; break; |
case KC_LSHIFT: mod_mask = KM_LSHIFT; break; |
case KC_RSHIFT: mod_mask = KM_RSHIFT; break; |
case KC_LALT: mod_mask = KM_LALT; break; |
case KC_RALT: mod_mask = KM_RALT; break; |
default: mod_mask = 0; break; |
} |
if (cons_connected && phone2cons != -1) { |
/* |
* recode to ASCII - one interrupt can produce more than one |
* code so result is stored in fifo |
*/ |
while (!keybuffer_empty(&keybuffer)) { |
if (!keybuffer_pop(&keybuffer, (int *)&chr)) |
break; |
if (mod_mask != 0) { |
if (type == KEY_PRESS) |
mods = mods | mod_mask; |
else |
mods = mods & ~mod_mask; |
} |
switch (key) { |
case KC_CAPS_LOCK: mod_mask = KM_CAPS_LOCK; break; |
case KC_NUM_LOCK: mod_mask = KM_NUM_LOCK; break; |
case KC_SCROLL_LOCK: mod_mask = KM_SCROLL_LOCK; break; |
default: mod_mask = 0; break; |
} |
if (mod_mask != 0) { |
if (type == KEY_PRESS) { |
/* |
* Only change lock state on transition from released |
* to pressed. This prevents autorepeat from messing |
* up the lock state. |
*/ |
mods = mods ^ (mod_mask & ~lock_keys); |
lock_keys = lock_keys | mod_mask; |
} else { |
lock_keys = lock_keys & ~mod_mask; |
async_msg_1(phone2cons, KBD_PUSHCHAR, chr); |
} |
} |
/* |
printf("type: %d\n", type); |
printf("mods: 0x%x\n", mods); |
printf("keycode: %u\n", key); |
*/ |
if (type == KEY_PRESS && (mods & KM_LCTRL) && |
key == KC_F1) { |
active_layout = 0; |
layout[active_layout]->reset(); |
return; |
} |
if (type == KEY_PRESS && (mods & KM_LCTRL) && |
key == KC_F2) { |
active_layout = 1; |
layout[active_layout]->reset(); |
return; |
} |
if (type == KEY_PRESS && (mods & KM_LCTRL) && |
key == KC_F3) { |
active_layout = 2; |
layout[active_layout]->reset(); |
return; |
} |
ev.type = type; |
ev.key = key; |
ev.mods = mods; |
ev.c = layout[active_layout]->parse_ev(&ev); |
async_msg_4(phone2cons, KBD_EVENT, ev.type, ev.key, ev.mods, ev.c); |
} |
static void console_connection(ipc_callid_t iid, ipc_call_t *icall) |
193,14 → 111,6 |
phone2cons = IPC_GET_ARG5(call); |
retval = 0; |
break; |
case KBD_YIELD: |
kbd_port_yield(); |
retval = 0; |
break; |
case KBD_RECLAIM: |
kbd_port_reclaim(); |
retval = 0; |
break; |
default: |
retval = EINVAL; |
} |
215,35 → 125,16 |
ipcarg_t phonead; |
if (sysinfo_value("kbd.cir.fhc") == 1) |
cir_service = SERVICE_FHC; |
else if (sysinfo_value("kbd.cir.obio") == 1) |
cir_service = SERVICE_OBIO; |
if (cir_service) { |
while (cir_phone < 0) { |
cir_phone = ipc_connect_me_to_blocking(PHONE_NS, cir_service, |
0, 0); |
} |
} |
/* Initialize port driver. */ |
if (kbd_port_init() != 0) |
/* Initialize arch dependent parts */ |
if (kbd_arch_init()) |
return -1; |
/* Initialize controller driver. */ |
if (kbd_ctl_init() != 0) |
return -1; |
/* Initialize (reset) layout. */ |
layout[active_layout]->reset(); |
/* Initialize key buffer */ |
keybuffer_init(&keybuffer); |
async_set_client_connection(console_connection); |
/* Register service at nameserver. */ |
async_set_interrupt_received(irq_handler); |
/* Register service at nameserver */ |
if (ipc_connect_to_me(PHONE_NS, SERVICE_KEYBOARD, 0, 0, &phonead) != 0) |
return -1; |
250,7 → 141,7 |
printf(NAME ": Accepting connections\n"); |
async_manager(); |
/* Not reached. */ |
/* Never reached */ |
return 0; |
} |
/branches/arm/uspace/srv/kbd/generic/key_buffer.c |
---|
0,0 → 1,113 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdgen |
* @brief HelenOS generic uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#include <key_buffer.h> |
#include <futex.h> |
atomic_t keybuffer_futex = FUTEX_INITIALIZER; |
/** Clear key buffer. |
*/ |
void keybuffer_free(keybuffer_t *keybuffer) |
{ |
futex_down(&keybuffer_futex); |
keybuffer->head = 0; |
keybuffer->tail = 0; |
keybuffer->items = 0; |
futex_up(&keybuffer_futex); |
} |
/** Key buffer initialization. |
* |
*/ |
void keybuffer_init(keybuffer_t *keybuffer) |
{ |
keybuffer_free(keybuffer); |
} |
/** Get free space in buffer. |
* This function is useful for processing some scancodes that are translated |
* to more than one character. |
* @return empty buffer space |
*/ |
int keybuffer_available(keybuffer_t *keybuffer) |
{ |
return KEYBUFFER_SIZE - keybuffer->items; |
} |
/** |
* @return nonzero, if buffer is not empty. |
*/ |
int keybuffer_empty(keybuffer_t *keybuffer) |
{ |
return (keybuffer->items == 0); |
} |
/** Push key to key buffer. |
* If buffer is full, character is ignored. |
* @param key code of stored key |
*/ |
void keybuffer_push(keybuffer_t *keybuffer, int key) |
{ |
futex_down(&keybuffer_futex); |
if (keybuffer->items < KEYBUFFER_SIZE) { |
keybuffer->fifo[keybuffer->tail] = key; |
keybuffer->tail = (keybuffer->tail + 1) % KEYBUFFER_SIZE; |
keybuffer->items++; |
} |
futex_up(&keybuffer_futex); |
} |
/** Pop character from buffer. |
* @param c pointer to space where to store character from buffer. |
* @return zero on empty buffer, nonzero else |
*/ |
int keybuffer_pop(keybuffer_t *keybuffer, int *c) |
{ |
futex_down(&keybuffer_futex); |
if (keybuffer->items > 0) { |
keybuffer->items--; |
*c = (keybuffer->fifo[keybuffer->head]) ; |
keybuffer->head = (keybuffer->head + 1) % KEYBUFFER_SIZE; |
futex_up(&keybuffer_futex); |
return 1; |
} |
futex_up(&keybuffer_futex); |
return 0; |
} |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ia32/src/mouse.c |
---|
0,0 → 1,117 |
/* |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <ipc/ipc.h> |
#include <async.h> |
#include <kbd.h> |
#include <keys.h> |
#define i8042_MOUSE_DATA 0x20 |
#define BUFSIZE 3 |
typedef struct { |
union { |
unsigned char data[BUFSIZE]; |
struct { |
unsigned leftbtn : 1; |
unsigned rightbtn : 1; |
unsigned middlebtn : 1; |
unsigned isone : 1; /* Always one */ |
unsigned xsign : 1; |
unsigned ysign : 1; |
unsigned xovfl : 1; |
unsigned yovfl : 1; |
unsigned char x; |
unsigned char y; |
} val; |
}u; |
}ps2packet_t; |
static ps2packet_t buf; |
static int bufpos = 0; |
static int leftbtn = 0; |
static int rightbtn = 0; |
static int middlebtn = 0; |
/** Convert 9-bit 2-complement signed number to integer */ |
static int bit9toint(int sign, unsigned char data) |
{ |
int tmp; |
if (!sign) |
return data; |
tmp = ((unsigned char)~data) + 1; |
return -tmp; |
} |
/** Process mouse data |
* |
* @return True if mouse command was recognized and processed |
*/ |
int mouse_arch_process(int phoneid, ipc_call_t *call) |
{ |
int status = IPC_GET_ARG1(*call); |
int data = IPC_GET_ARG2(*call); |
int x,y; |
if (!(status & i8042_MOUSE_DATA)) |
return 0; |
/* Check that we have not lost synchronization */ |
if (bufpos == 0 && !(data & 0x8)) |
return 1; /* Synchro lost, ignore byte */ |
buf.u.data[bufpos++] = data; |
if (bufpos == BUFSIZE) { |
bufpos = 0; |
if (phoneid != -1) { |
if (buf.u.val.leftbtn ^ leftbtn) { |
leftbtn = buf.u.val.leftbtn; |
async_msg_1(phoneid, KBD_MS_LEFT, leftbtn); |
} |
if (buf.u.val.rightbtn & rightbtn) { |
rightbtn = buf.u.val.middlebtn; |
async_msg_1(phoneid, KBD_MS_RIGHT, rightbtn); |
} |
if (buf.u.val.rightbtn & rightbtn) { |
middlebtn = buf.u.val.middlebtn; |
async_msg_1(phoneid, KBD_MS_MIDDLE, middlebtn); |
} |
x = bit9toint(buf.u.val.xsign, buf.u.val.x); |
y = bit9toint(buf.u.val.ysign, buf.u.val.y); |
if (x || y) |
async_msg_2(phoneid, KBD_MS_MOVE, (ipcarg_t)x, |
(ipcarg_t)(-y)); |
} |
} |
return 1; |
} |
/branches/arm/uspace/srv/kbd/arch/ia32/src/kbd.c |
---|
0,0 → 1,166 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdia32 ia32 |
* @brief HelenOS ia32 / amd64 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
* @ingroup kbdamd64 |
*/ |
#include <arch/kbd.h> |
#include <ipc/ipc.h> |
#include <unistd.h> |
#include <kbd.h> |
#include <keys.h> |
#include <genarch/kbd.h> |
#include <sysinfo.h> |
/* Interesting bits for status register */ |
#define i8042_OUTPUT_FULL 0x1 |
#define i8042_INPUT_FULL 0x2 |
#define i8042_MOUSE_DATA 0x20 |
/* Command constants */ |
#define i8042_CMD_KBD 0x60 |
#define i8042_CMD_MOUSE 0xd4 |
/* Keyboard cmd byte */ |
#define i8042_KBD_IE 0x1 |
#define i8042_MOUSE_IE 0x2 |
#define i8042_KBD_DISABLE 0x10 |
#define i8042_MOUSE_DISABLE 0x20 |
#define i8042_KBD_TRANSLATE 0x40 |
/* Mouse constants */ |
#define MOUSE_OUT_INIT 0xf4 |
#define MOUSE_ACK 0xfa |
#define KEY_RELEASE 0x80 |
static volatile int keyflags; /**< Tracking of multiple keypresses. */ |
static volatile int lockflags; /**< Tracking of multiple keys lockings. */ |
irq_cmd_t i8042_cmds[2] = { |
{ CMD_PORT_READ_1, (void *) 0x64, 0, 1 }, |
{ CMD_PORT_READ_1, (void *) 0x60, 0, 2 } |
}; |
irq_code_t i8042_kbd = { |
2, |
i8042_cmds |
}; |
static void wait_ready(void) { |
while (i8042_status_read() & i8042_INPUT_FULL) |
; |
} |
/** Register uspace irq handler |
* @return |
*/ |
int kbd_arch_init(void) |
{ |
int i; |
int mouseenabled = 0; |
iospace_enable(task_get_id(), (void *) i8042_DATA, 5); |
/* Disable kbd, enable mouse */ |
i8042_command_write(i8042_CMD_KBD); |
wait_ready(); |
i8042_command_write(i8042_CMD_KBD); |
wait_ready(); |
i8042_data_write(i8042_KBD_DISABLE); |
wait_ready(); |
/* Flush all current IO */ |
while (i8042_status_read() & i8042_OUTPUT_FULL) |
i8042_data_read(); |
/* Initialize mouse */ |
i8042_command_write(i8042_CMD_MOUSE); |
wait_ready(); |
i8042_data_write(MOUSE_OUT_INIT); |
wait_ready(); |
int mouseanswer = 0; |
for (i=0;i < 1000; i++) { |
int status = i8042_status_read(); |
if (status & i8042_OUTPUT_FULL) { |
int data = i8042_data_read(); |
if (status & i8042_MOUSE_DATA) { |
mouseanswer = data; |
break; |
} |
} |
usleep(1000); |
} |
if (mouseanswer == MOUSE_ACK) { |
/* enable mouse */ |
mouseenabled = 1; |
ipc_register_irq(sysinfo_value("mouse.inr"), sysinfo_value("mouse.devno"), 0, &i8042_kbd); |
} |
/* Enable kbd */ |
ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &i8042_kbd); |
int newcontrol = i8042_KBD_IE | i8042_KBD_TRANSLATE; |
if (mouseenabled) |
newcontrol |= i8042_MOUSE_IE; |
i8042_command_write(i8042_CMD_KBD); |
wait_ready(); |
i8042_data_write(newcontrol); |
wait_ready(); |
return 0; |
} |
/** Process keyboard & mouse events */ |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
int status = IPC_GET_ARG1(*call); |
if ((status & i8042_MOUSE_DATA)) |
return 0; |
int scan_code = IPC_GET_ARG2(*call); |
if (scan_code & KEY_RELEASE) |
key_released(keybuffer, scan_code ^ KEY_RELEASE); |
else |
key_pressed(keybuffer, scan_code); |
return 1; |
} |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ia32/src/scanc.c |
---|
0,0 → 1,202 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdia32 |
* @brief Scancodes for PC keyboards. |
* @{ |
*/ |
/** @file |
* @ingroup kbdamd64 |
*/ |
#include <genarch/scanc.h> |
/** Primary meaning of scancodes. */ |
int sc_primary_map[] = { |
SPECIAL, /* 0x00 */ |
SPECIAL, /* 0x01 - Esc */ |
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', |
'\b', /* 0x0e - Backspace */ |
'\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', |
SPECIAL, /* 0x1d - LCtrl */ |
'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', |
'`', |
SPECIAL, /* 0x2a - LShift */ |
'\\', |
'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', |
SPECIAL, /* 0x36 - RShift */ |
'*', |
SPECIAL, /* 0x38 - LAlt */ |
' ', |
SPECIAL, /* 0x3a - CapsLock */ |
(FUNCTION_KEYS | 1), /* 0x3b - F1 */ |
(FUNCTION_KEYS | 2), /* 0x3c - F2 */ |
(FUNCTION_KEYS | 3), /* 0x3d - F3 */ |
(FUNCTION_KEYS | 4), /* 0x3e - F4 */ |
(FUNCTION_KEYS | 5), /* 0x3f - F5 */ |
(FUNCTION_KEYS | 6), /* 0x40 - F6 */ |
(FUNCTION_KEYS | 7), /* 0x41 - F7 */ |
(FUNCTION_KEYS | 8), /* 0x42 - F8 */ |
(FUNCTION_KEYS | 9), /* 0x43 - F9 */ |
(FUNCTION_KEYS | 10), /* 0x44 - F10 */ |
SPECIAL, /* 0x45 - NumLock */ |
SPECIAL, /* 0x46 - ScrollLock */ |
'7', '8', '9', '-', |
'4', '5', '6', '+', |
'1', '2', '3', |
'0', '.', |
SPECIAL, /* 0x54 - Alt-SysRq */ |
SPECIAL, /* 0x55 - F11/F12/PF1/FN */ |
SPECIAL, /* 0x56 - unlabelled key next to LAlt */ |
(FUNCTION_KEYS | 11), /* 0x57 - F11 */ |
(FUNCTION_KEYS | 12), /* 0x58 - F12 */ |
SPECIAL, /* 0x59 */ |
SPECIAL, /* 0x5a */ |
SPECIAL, /* 0x5b */ |
SPECIAL, /* 0x5c */ |
SPECIAL, /* 0x5d */ |
SPECIAL, /* 0x5e */ |
SPECIAL, /* 0x5f */ |
SPECIAL, /* 0x60 */ |
SPECIAL, /* 0x61 */ |
SPECIAL, /* 0x62 */ |
SPECIAL, /* 0x63 */ |
SPECIAL, /* 0x64 */ |
SPECIAL, /* 0x65 */ |
SPECIAL, /* 0x66 */ |
SPECIAL, /* 0x67 */ |
SPECIAL, /* 0x68 */ |
SPECIAL, /* 0x69 */ |
SPECIAL, /* 0x6a */ |
SPECIAL, /* 0x6b */ |
SPECIAL, /* 0x6c */ |
SPECIAL, /* 0x6d */ |
SPECIAL, /* 0x6e */ |
SPECIAL, /* 0x6f */ |
SPECIAL, /* 0x70 */ |
SPECIAL, /* 0x71 */ |
SPECIAL, /* 0x72 */ |
SPECIAL, /* 0x73 */ |
SPECIAL, /* 0x74 */ |
SPECIAL, /* 0x75 */ |
SPECIAL, /* 0x76 */ |
SPECIAL, /* 0x77 */ |
SPECIAL, /* 0x78 */ |
SPECIAL, /* 0x79 */ |
SPECIAL, /* 0x7a */ |
SPECIAL, /* 0x7b */ |
SPECIAL, /* 0x7c */ |
SPECIAL, /* 0x7d */ |
SPECIAL, /* 0x7e */ |
SPECIAL, /* 0x7f */ |
}; |
/** Secondary meaning of scancodes. */ |
int sc_secondary_map[] = { |
SPECIAL, /* 0x00 */ |
0x1b, /* 0x01 - Esc */ |
'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', |
SPECIAL, /* 0x0e - Backspace */ |
'\t', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', '\n', |
SPECIAL, /* 0x1d - LCtrl */ |
'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', |
'~', |
SPECIAL, /* 0x2a - LShift */ |
'|', |
'Z', 'X', 'C', 'V', 'B', 'N', 'M', '<', '>', '?', |
SPECIAL, /* 0x36 - RShift */ |
'*', |
SPECIAL, /* 0x38 - LAlt */ |
' ', |
SPECIAL, /* 0x3a - CapsLock */ |
SPECIAL, /* 0x3b - F1 */ |
SPECIAL, /* 0x3c - F2 */ |
SPECIAL, /* 0x3d - F3 */ |
SPECIAL, /* 0x3e - F4 */ |
SPECIAL, /* 0x3f - F5 */ |
SPECIAL, /* 0x40 - F6 */ |
SPECIAL, /* 0x41 - F7 */ |
SPECIAL, /* 0x42 - F8 */ |
SPECIAL, /* 0x43 - F9 */ |
SPECIAL, /* 0x44 - F10 */ |
SPECIAL, /* 0x45 - NumLock */ |
SPECIAL, /* 0x46 - ScrollLock */ |
'7', '8', '9', '-', |
'4', '5', '6', '+', |
'1', '2', '3', |
'0', '.', |
SPECIAL, /* 0x54 - Alt-SysRq */ |
SPECIAL, /* 0x55 - F11/F12/PF1/FN */ |
SPECIAL, /* 0x56 - unlabelled key next to LAlt */ |
SPECIAL, /* 0x57 - F11 */ |
SPECIAL, /* 0x58 - F12 */ |
SPECIAL, /* 0x59 */ |
SPECIAL, /* 0x5a */ |
SPECIAL, /* 0x5b */ |
SPECIAL, /* 0x5c */ |
SPECIAL, /* 0x5d */ |
SPECIAL, /* 0x5e */ |
SPECIAL, /* 0x5f */ |
SPECIAL, /* 0x60 */ |
SPECIAL, /* 0x61 */ |
SPECIAL, /* 0x62 */ |
SPECIAL, /* 0x63 */ |
SPECIAL, /* 0x64 */ |
SPECIAL, /* 0x65 */ |
SPECIAL, /* 0x66 */ |
SPECIAL, /* 0x67 */ |
SPECIAL, /* 0x68 */ |
SPECIAL, /* 0x69 */ |
SPECIAL, /* 0x6a */ |
SPECIAL, /* 0x6b */ |
SPECIAL, /* 0x6c */ |
SPECIAL, /* 0x6d */ |
SPECIAL, /* 0x6e */ |
SPECIAL, /* 0x6f */ |
SPECIAL, /* 0x70 */ |
SPECIAL, /* 0x71 */ |
SPECIAL, /* 0x72 */ |
SPECIAL, /* 0x73 */ |
SPECIAL, /* 0x74 */ |
SPECIAL, /* 0x75 */ |
SPECIAL, /* 0x76 */ |
SPECIAL, /* 0x77 */ |
SPECIAL, /* 0x78 */ |
SPECIAL, /* 0x79 */ |
SPECIAL, /* 0x7a */ |
SPECIAL, /* 0x7b */ |
SPECIAL, /* 0x7c */ |
SPECIAL, /* 0x7d */ |
SPECIAL, /* 0x7e */ |
SPECIAL, /* 0x7f */ |
}; |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ia32/include/kbd.h |
---|
0,0 → 1,76 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdamd64 amd64 |
* @brief HelenOS ia32 / amd64 arch dependent parts of uspace keyboard and mouse handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
* @ingroup kbdia32 |
*/ |
#ifndef KBD_ia32_KBD_H_ |
#define KBD_ia32_KBD_H_ |
#include <ddi.h> |
#include <libarch/ddi.h> |
#define i8042_DATA 0x60 |
#define i8042_STATUS 0X64 |
typedef unsigned char u8; |
typedef short u16; |
static inline void i8042_data_write(u8 data) |
{ |
outb(i8042_DATA, data); |
} |
static inline u8 i8042_data_read(void) |
{ |
return inb(i8042_DATA); |
} |
static inline u8 i8042_status_read(void) |
{ |
return inb(i8042_STATUS); |
} |
static inline void i8042_command_write(u8 command) |
{ |
outb(i8042_STATUS, command); |
} |
#endif |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ia32/include/scanc.h |
---|
0,0 → 1,59 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdia32 |
* @{ |
*/ |
/** @file |
* @ingroup kbdamd64 |
*/ |
#ifndef KBD_ia32_SCANC_H_ |
#define KBD_ia32_SCANC_H_ |
/** Scancodes. */ |
#define SC_ESC 0x01 |
#define SC_BACKSPACE 0x0e |
#define SC_LSHIFT 0x2a |
#define SC_RSHIFT 0x36 |
#define SC_CAPSLOCK 0x3a |
#define SC_SPEC_ESCAPE 0xe0 |
#define SC_LEFTARR 0x4b |
#define SC_RIGHTARR 0x4d |
#define SC_UPARR 0x48 |
#define SC_DOWNARR 0x50 |
#define SC_DELETE 0x53 |
#define SC_HOME 0x47 |
#define SC_END 0x4f |
#endif |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/sparc64/src/kbd.c |
---|
0,0 → 1,117 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdsparc64 sparc64 |
* @brief HelenOS sparc64 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/kbd.h> |
#include <ipc/ipc.h> |
#include <sysinfo.h> |
#include <kbd.h> |
#include <keys.h> |
#include <stdio.h> |
#include <sys/types.h> |
#include <genarch/kbd.h> |
#define KBD_KEY_RELEASE 0x80 |
#define KBD_ALL_KEYS_UP 0x7f |
/** Top-half pseudocode for z8530. */ |
irq_cmd_t z8530_cmds[] = { |
{ |
CMD_MEM_READ_1, |
0, /**< Address. Will be patched in run-time. */ |
0, /**< Value. Not used. */ |
1 /**< Arg 1 will contain the result. */ |
} |
}; |
irq_code_t z8530_kbd = { |
1, |
z8530_cmds |
}; |
/** Top-half pseudocode for ns16550. */ |
irq_cmd_t ns16550_cmds[] = { |
{ |
CMD_MEM_READ_1, |
0, /**< Address. Will be patched in run-time. */ |
0, /**< Value. Not used. */ |
1 /**< Arg 1 will contain the result. */ |
} |
}; |
irq_code_t ns16550_kbd = { |
1, |
ns16550_cmds |
}; |
#define KBD_Z8530 1 |
#define KBD_NS16550 2 |
int kbd_arch_init(void) |
{ |
int type = sysinfo_value("kbd.type"); |
switch (type) { |
case KBD_Z8530: |
z8530_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual") + 6; |
ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &z8530_kbd); |
break; |
case KBD_NS16550: |
ns16550_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual"); |
ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &ns16550_kbd); |
break; |
default: |
break; |
} |
return 0; |
} |
/** Process keyboard events */ |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
int scan_code = IPC_GET_ARG1(*call); |
if (scan_code == KBD_ALL_KEYS_UP) |
return 1; |
if (scan_code & KBD_KEY_RELEASE) |
key_released(keybuffer, scan_code ^ KBD_KEY_RELEASE); |
else |
key_pressed(keybuffer, scan_code); |
return 1; |
} |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/sparc64/src/scanc.c |
---|
0,0 → 1,304 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Scan codes for Sun keyboards. |
*/ |
#include <genarch/scanc.h> |
/** Primary meaning of scancodes. */ |
int sc_primary_map[] = { |
[0x00] = SPECIAL, |
[0x01] = SPECIAL, |
[0x02] = SPECIAL, |
[0x03] = SPECIAL, |
[0x04] = SPECIAL, |
[0x05] = FUNCTION_KEYS + 1, /* F1 */ |
[0x06] = FUNCTION_KEYS + 2, /* F2 */ |
[0x07] = FUNCTION_KEYS + 10, /* F10 */ |
[0x08] = FUNCTION_KEYS + 3, /* F3 */ |
[0x09] = FUNCTION_KEYS + 11, /* F11 */ |
[0x0a] = FUNCTION_KEYS + 4, /* F4 */ |
[0x0b] = FUNCTION_KEYS + 12, /* F12 */ |
[0x0c] = FUNCTION_KEYS + 5, /* F5 */ |
[0x0d] = SPECIAL, /* RAlt */ |
[0x0e] = FUNCTION_KEYS + 6, /* F6 */ |
[0x0f] = SPECIAL, |
[0x10] = FUNCTION_KEYS + 7, /* F7 */ |
[0x11] = FUNCTION_KEYS + 8, /* F8 */ |
[0x12] = FUNCTION_KEYS + 9, /* F9 */ |
[0x13] = SPECIAL, /* LAlt */ |
[0x14] = SPECIAL, /* Up Arrow */ |
[0x15] = SPECIAL, /* Pause */ |
[0x16] = SPECIAL, |
[0x17] = SPECIAL, /* Scroll Lock */ |
[0x18] = SPECIAL, /* Left Arrow */ |
[0x19] = SPECIAL, |
[0x1a] = SPECIAL, |
[0x1b] = SPECIAL, /* Down Arrow */ |
[0x1c] = SPECIAL, /* Right Arrow */ |
[0x1d] = SPECIAL, /* Esc */ |
[0x1e] = '1', |
[0x1f] = '2', |
[0x20] = '3', |
[0x21] = '4', |
[0x22] = '5', |
[0x23] = '6', |
[0x24] = '7', |
[0x25] = '8', |
[0x26] = '9', |
[0x27] = '0', |
[0x28] = '-', |
[0x29] = '=', |
[0x2a] = '`', |
[0x2b] = '\b', /* Backspace */ |
[0x2c] = SPECIAL, /* Insert */ |
[0x2d] = SPECIAL, |
[0x2e] = '/', /* numeric keypad */ |
[0x2f] = '*', /* numeric keypad */ |
[0x30] = SPECIAL, |
[0x31] = SPECIAL, |
[0x32] = '.', /* numeric keypad */ |
[0x33] = SPECIAL, |
[0x34] = SPECIAL, /* Home */ |
[0x35] = '\t', /* Tab */ |
[0x36] = 'q', |
[0x37] = 'w', |
[0x38] = 'e', |
[0x39] = 'r', |
[0x3a] = 't', |
[0x3b] = 'y', |
[0x3c] = 'u', |
[0x3d] = 'i', |
[0x3e] = 'o', |
[0x3f] = 'p', |
[0x40] = '[', |
[0x41] = ']', |
[0x42] = SPECIAL, /* Del */ |
[0x43] = SPECIAL, |
[0x44] = '7', /* numeric keypad */ |
[0x45] = '8', /* numeric keypad */ |
[0x46] = '9', /* numeric keypad */ |
[0x47] = '-', /* numeric keypad */ |
[0x48] = SPECIAL, |
[0x49] = SPECIAL, |
[0x4a] = SPECIAL, /* End */ |
[0x4b] = SPECIAL, |
[0x4c] = SPECIAL, /* Control */ |
[0x4d] = 'a', |
[0x4e] = 's', |
[0x4f] = 'd', |
[0x50] = 'f', |
[0x51] = 'g', |
[0x52] = 'h', |
[0x53] = 'j', |
[0x54] = 'k', |
[0x55] = 'l', |
[0x56] = ';', |
[0x57] = '\'', |
[0x58] = '\\', |
[0x59] = '\n', /* Enter */ |
[0x5a] = '\n', /* Enter on numeric keypad */ |
[0x5b] = '4', /* numeric keypad */ |
[0x5c] = '5', /* numeric keypad */ |
[0x5d] = '6', /* numeric keypad */ |
[0x5e] = '0', /* numeric keypad */ |
[0x5f] = SPECIAL, |
[0x60] = SPECIAL, /* Page Up */ |
[0x61] = SPECIAL, |
[0x62] = SPECIAL, /* Num Lock */ |
[0x63] = SPECIAL, /* LShift */ |
[0x64] = 'z', |
[0x65] = 'x', |
[0x66] = 'c', |
[0x67] = 'v', |
[0x68] = 'b', |
[0x69] = 'n', |
[0x6a] = 'm', |
[0x6b] = ',', |
[0x6c] = '.', |
[0x6d] = '/', |
[0x6e] = SPECIAL, /* RShift */ |
[0x6f] = SPECIAL, |
[0x70] = '1', /* numeric keypad */ |
[0x71] = '2', /* numeric keypad */ |
[0x72] = '3', /* numeric keypad */ |
[0x73] = SPECIAL, |
[0x74] = SPECIAL, |
[0x75] = SPECIAL, |
[0x76] = SPECIAL, |
[0x77] = SPECIAL, /* Caps Lock */ |
[0x78] = SPECIAL, |
[0x79] = ' ', |
[0x7a] = SPECIAL, |
[0x7b] = SPECIAL, /* Page Down */ |
[0x7c] = SPECIAL, |
[0x7d] = '+', /* numeric key pad */ |
[0x7e] = SPECIAL, |
[0x7f] = SPECIAL |
}; |
/** Secondary meaning of scancodes. */ |
int sc_secondary_map[] = { |
[0x00] = SPECIAL, |
[0x01] = SPECIAL, |
[0x02] = SPECIAL, |
[0x03] = SPECIAL, |
[0x04] = SPECIAL, |
[0x05] = SPECIAL, /* F1 */ |
[0x06] = SPECIAL, /* F2 */ |
[0x07] = SPECIAL, /* F10 */ |
[0x08] = SPECIAL, /* F3 */ |
[0x09] = SPECIAL, /* F11 */ |
[0x0a] = SPECIAL, /* F4 */ |
[0x0b] = SPECIAL, /* F12 */ |
[0x0c] = SPECIAL, /* F5 */ |
[0x0d] = SPECIAL, /* RAlt */ |
[0x0e] = SPECIAL, /* F6 */ |
[0x0f] = SPECIAL, |
[0x10] = SPECIAL, /* F7 */ |
[0x11] = SPECIAL, /* F8 */ |
[0x12] = SPECIAL, /* F9 */ |
[0x13] = SPECIAL, /* LAlt */ |
[0x14] = SPECIAL, /* Up Arrow */ |
[0x15] = SPECIAL, /* Pause */ |
[0x16] = SPECIAL, |
[0x17] = SPECIAL, /* Scroll Lock */ |
[0x18] = SPECIAL, /* Left Arrow */ |
[0x19] = SPECIAL, |
[0x1a] = SPECIAL, |
[0x1b] = SPECIAL, /* Down Arrow */ |
[0x1c] = SPECIAL, /* Right Arrow */ |
[0x1d] = SPECIAL, /* Esc */ |
[0x1e] = '!', |
[0x1f] = '@', |
[0x20] = '#', |
[0x21] = '$', |
[0x22] = '%', |
[0x23] = '^', |
[0x24] = '&', |
[0x25] = '*', |
[0x26] = '(', |
[0x27] = ')', |
[0x28] = '_', |
[0x29] = '+', |
[0x2a] = '~', |
[0x2b] = SPECIAL, /* Backspace */ |
[0x2c] = SPECIAL, /* Insert */ |
[0x2d] = SPECIAL, |
[0x2e] = '/', /* numeric keypad */ |
[0x2f] = '*', /* numeric keypad */ |
[0x30] = SPECIAL, |
[0x31] = SPECIAL, |
[0x32] = '.', /* numeric keypad */ |
[0x33] = SPECIAL, |
[0x34] = SPECIAL, /* Home */ |
[0x35] = SPECIAL, /* Tab */ |
[0x36] = 'Q', |
[0x37] = 'W', |
[0x38] = 'E', |
[0x39] = 'R', |
[0x3a] = 'T', |
[0x3b] = 'Y', |
[0x3c] = 'U', |
[0x3d] = 'I', |
[0x3e] = 'O', |
[0x3f] = 'P', |
[0x40] = '{', |
[0x41] = '}', |
[0x42] = SPECIAL, /* Del */ |
[0x43] = SPECIAL, |
[0x44] = '7', /* numeric keypad */ |
[0x45] = '8', /* numeric keypad */ |
[0x46] = '9', /* numeric keypad */ |
[0x47] = '-', /* numeric keypad */ |
[0x48] = SPECIAL, |
[0x49] = SPECIAL, |
[0x4a] = SPECIAL, /* End */ |
[0x4b] = SPECIAL, |
[0x4c] = SPECIAL, /* Control */ |
[0x4d] = 'A', |
[0x4e] = 'S', |
[0x4f] = 'D', |
[0x50] = 'F', |
[0x51] = 'G', |
[0x52] = 'H', |
[0x53] = 'J', |
[0x54] = 'K', |
[0x55] = 'L', |
[0x56] = ':', |
[0x57] = '"', |
[0x58] = '|', |
[0x59] = SPECIAL, /* Enter */ |
[0x5a] = SPECIAL, /* Enter on numeric keypad */ |
[0x5b] = '4', /* numeric keypad */ |
[0x5c] = '5', /* numeric keypad */ |
[0x5d] = '6', /* numeric keypad */ |
[0x5e] = '0', /* numeric keypad */ |
[0x5f] = SPECIAL, |
[0x60] = SPECIAL, /* Page Up */ |
[0x61] = SPECIAL, |
[0x62] = SPECIAL, /* Num Lock */ |
[0x63] = SPECIAL, /* LShift */ |
[0x64] = 'Z', |
[0x65] = 'X', |
[0x66] = 'C', |
[0x67] = 'V', |
[0x68] = 'B', |
[0x69] = 'N', |
[0x6a] = 'M', |
[0x6b] = '<', |
[0x6c] = '>', |
[0x6d] = '?', |
[0x6e] = SPECIAL, /* RShift */ |
[0x6f] = SPECIAL, |
[0x70] = '1', /* numeric keypad */ |
[0x71] = '2', /* numeric keypad */ |
[0x72] = '3', /* numeric keypad */ |
[0x73] = SPECIAL, |
[0x74] = SPECIAL, |
[0x75] = SPECIAL, |
[0x76] = SPECIAL, |
[0x77] = SPECIAL, /* Caps Lock */ |
[0x78] = SPECIAL, |
[0x79] = ' ', |
[0x7a] = SPECIAL, |
[0x7b] = SPECIAL, /* Page Down */ |
[0x7c] = SPECIAL, |
[0x7d] = '+', /* numeric key pad */ |
[0x7e] = SPECIAL, |
[0x7f] = SPECIAL |
}; |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/sparc64/include/kbd.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdsparc64 sparc64 |
* @brief HelenOS sparc64 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KBD_sparc64_KBD_H_ |
#define KBD_sparc64_KBD_H_ |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/sparc64/include/scanc.h |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup genarch |
* @{ |
*/ |
/** |
* @file |
* @brief Scan codes for sun keyboards. |
*/ |
#ifndef KBD_SCANC_SUN_H_ |
#define KBD_SCANC_SUN_H_ |
#define SC_ESC 0x1d |
#define SC_BACKSPACE 0x2b |
#define SC_LSHIFT 0x63 |
#define SC_RSHIFT 0x6e |
#define SC_CAPSLOCK 0x77 |
#define SC_SPEC_ESCAPE 0xe0 /* ??? */ |
#define SC_LEFTARR 0x18 |
#define SC_RIGHTARR 0x1c |
#define SC_UPARR 0x14 |
#define SC_DOWNARR 0x1b |
#define SC_DELETE 0x42 |
#define SC_HOME 0x34 |
#define SC_END 0x4a |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/arm32/include/kbd.h |
---|
0,0 → 1,42 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdarm32 |
* @{ |
*/ |
/** @file |
* @brief Empty. |
*/ |
#ifndef KBD_arm32_KBD_H_ |
#define KBD_arm32_KBD_H_ |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/arm32/src/kbd.c |
---|
0,0 → 1,40 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdarm32 arm32 |
* @brief HelenOS arm32 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
* @brief Empty, required by generic Makefile. |
*/ |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/arm32/src/kbd_gxemul.c |
---|
0,0 → 1,424 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdarm32gxemul GXemul |
* @brief HelenOS arm32 GXEmul uspace keyboard handler. |
* @ingroup kbdarm32 |
* @{ |
*/ |
/** @file |
* @brief GXemul uspace keyboard handler. |
*/ |
#include <ipc/ipc.h> |
#include <sysinfo.h> |
#include <kbd.h> |
#include <keys.h> |
#include <bool.h> |
/* GXemul key codes in no-framebuffer mode. */ |
#define GXEMUL_KEY_F1 0x504f1bL |
#define GXEMUL_KEY_F2 0x514f1bL |
#define GXEMUL_KEY_F3 0x524f1bL |
#define GXEMUL_KEY_F4 0x534f1bL |
#define GXEMUL_KEY_F5 0x35315b1bL |
#define GXEMUL_KEY_F6 0x37315b1bL |
#define GXEMUL_KEY_F7 0x38315b1bL |
#define GXEMUL_KEY_F8 0x39315b1bL |
#define GXEMUL_KEY_F9 0x30325b1bL |
#define GXEMUL_KEY_F10 0x31325b1bL |
#define GXEMUL_KEY_F11 0x33325d1bL |
#define GXEMUL_KEY_F12 0x34325b1bL |
/** Start code of F5-F12 keys. */ |
#define GXEMUL_KEY_F5_F12_START_CODE 0x7e |
/* GXemul key codes in framebuffer mode. */ |
#define GXEMUL_FB_KEY_F1 0x504f5b1bL |
#define GXEMUL_FB_KEY_F2 0x514f5b1bL |
#define GXEMUL_FB_KEY_F3 0x524f5b1bL |
#define GXEMUL_FB_KEY_F4 0x534f5b1bL |
#define GXEMUL_FB_KEY_F5 0x35315b1bL |
#define GXEMUL_FB_KEY_F6 0x37315b1bL |
#define GXEMUL_FB_KEY_F7 0x38315b1bL |
#define GXEMUL_FB_KEY_F8 0x39315b1bL |
#define GXEMUL_FB_KEY_F9 0x38325b1bL |
#define GXEMUL_FB_KEY_F10 0x39325b1bL |
#define GXEMUL_FB_KEY_F11 0x33325b1bL |
#define GXEMUL_FB_KEY_F12 0x34325b1bL |
/** Function keys start code (F1=0x101) */ |
#define FUNCTION_KEYS 0x100 |
static irq_cmd_t gxemul_cmds[] = { |
{ |
CMD_MEM_READ_1, |
(void *) 0, |
0, |
2 |
} |
}; |
static irq_code_t gxemul_kbd = { |
1, |
gxemul_cmds |
}; |
/** Framebuffer switched on. */ |
static bool fb; |
/* |
// Please preserve this code (it can be used to determine scancodes) |
int to_hex(int v) |
{ |
return "0123456789ABCDEF"[v]; |
} |
*/ |
/** Process data sent when a key is pressed (in no-framebuffer mode). |
* |
* @param keybuffer Buffer of pressed key. |
* @param scan_code Scan code. |
* |
* @return Always 1. |
*/ |
static int gxemul_kbd_process_no_fb(keybuffer_t *keybuffer, int scan_code) |
{ |
// holds at most 4 latest scan codes |
static unsigned long buf = 0; |
// number of scan codes in #buf |
static int count = 0; |
/* |
// Preserve for detecting scan codes. |
keybuffer_push(keybuffer, to_hex((scan_code>>4)&0xf)); |
keybuffer_push(keybuffer, to_hex(scan_code&0xf)); |
keybuffer_push(keybuffer, 'X'); |
keybuffer_push(keybuffer, 'Y'); |
return 1; |
*/ |
if (scan_code == '\r') { |
scan_code = '\n'; |
} |
if (scan_code == GXEMUL_KEY_F5_F12_START_CODE) { |
switch (buf) { |
case GXEMUL_KEY_F5: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 5); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F6: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 6); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F7: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 7); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F8: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 8); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F9: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 9); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F10: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 10); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F11: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 11); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F12: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 12); |
buf = count = 0; |
return 1; |
default: |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) & 0xff); |
keybuffer_push(keybuffer, (buf >> 16) & 0xff); |
keybuffer_push(keybuffer, (buf >> 24) & 0xff); |
keybuffer_push(keybuffer, scan_code); |
buf = count = 0; |
return 1; |
} |
} |
// add to buffer |
buf |= ((unsigned long) scan_code) << (8 * (count++)); |
if ((buf & 0xff) != (GXEMUL_KEY_F1 & 0xff)) { |
keybuffer_push(keybuffer, buf); |
buf = count = 0; |
return 1; |
} |
if (count <= 1) { |
return 1; |
} |
if ((buf & 0xffff) != (GXEMUL_KEY_F1 & 0xffff) |
&& (buf & 0xffff) != (GXEMUL_KEY_F5 & 0xffff) ) { |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) &0xff); |
buf = count = 0; |
return 1; |
} |
if (count <= 2) { |
return 1; |
} |
switch (buf) { |
case GXEMUL_KEY_F1: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 1); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F2: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 2); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F3: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 3); |
buf = count = 0; |
return 1; |
case GXEMUL_KEY_F4: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 4); |
buf = count = 0; |
return 1; |
} |
if ((buf & 0xffffff) != (GXEMUL_KEY_F5 & 0xffffff) |
&& (buf & 0xffffff) != (GXEMUL_KEY_F9 & 0xffffff)) { |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) & 0xff); |
keybuffer_push(keybuffer, (buf >> 16) & 0xff); |
buf = count = 0; |
return 1; |
} |
if (count <= 3) { |
return 1; |
} |
switch (buf) { |
case GXEMUL_KEY_F5: |
case GXEMUL_KEY_F6: |
case GXEMUL_KEY_F7: |
case GXEMUL_KEY_F8: |
case GXEMUL_KEY_F9: |
case GXEMUL_KEY_F10: |
case GXEMUL_KEY_F11: |
case GXEMUL_KEY_F12: |
return 1; |
default: |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) & 0xff); |
keybuffer_push(keybuffer, (buf >> 16) & 0xff); |
keybuffer_push(keybuffer, (buf >> 24) & 0xff); |
buf = count = 0; |
return 1; |
} |
return 1; |
} |
/** Process data sent when a key is pressed (in framebuffer mode). |
* |
* @param keybuffer Buffer of pressed keys. |
* @param scan_code Scan code. |
* |
* @return Always 1. |
*/ |
static int gxemul_kbd_process_fb(keybuffer_t *keybuffer, int scan_code) |
{ |
// holds at most 4 latest scan codes |
static unsigned long buf = 0; |
// number of scan codes in #buf |
static int count = 0; |
/* |
// Please preserve this code (it can be used to determine scancodes) |
keybuffer_push(keybuffer, to_hex((scan_code>>4)&0xf)); |
keybuffer_push(keybuffer, to_hex(scan_code&0xf)); |
keybuffer_push(keybuffer, ' '); |
keybuffer_push(keybuffer, ' '); |
return 1; |
*/ |
if (scan_code == '\r') { |
scan_code = '\n'; |
} |
// add to buffer |
buf |= ((unsigned long) scan_code) << (8*(count++)); |
if ((buf & 0xff) != (GXEMUL_FB_KEY_F1 & 0xff)) { |
keybuffer_push(keybuffer, buf); |
buf = count = 0; |
return 1; |
} |
if (count <= 1) { |
return 1; |
} |
if ((buf & 0xffff) != (GXEMUL_FB_KEY_F1 & 0xffff)) { |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) &0xff); |
buf = count = 0; |
return 1; |
} |
if (count <= 2) { |
return 1; |
} |
if ((buf & 0xffffff) != (GXEMUL_FB_KEY_F1 & 0xffffff) |
&& (buf & 0xffffff) != (GXEMUL_FB_KEY_F5 & 0xffffff) |
&& (buf & 0xffffff) != (GXEMUL_FB_KEY_F9 & 0xffffff)) { |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) & 0xff); |
keybuffer_push(keybuffer, (buf >> 16) & 0xff); |
buf = count = 0; |
return 1; |
} |
if (count <= 3) { |
return 1; |
} |
switch (buf) { |
case GXEMUL_FB_KEY_F1: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 1 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F2: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 2 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F3: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 3 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F4: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 4 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F5: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 5 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F6: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 6 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F7: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 7 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F8: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 8 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F9: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 9 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F10: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 10 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F11: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 11 ); |
buf = count = 0; |
return 1; |
case GXEMUL_FB_KEY_F12: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 12 ); |
buf = count = 0; |
return 1; |
default: |
keybuffer_push(keybuffer, buf & 0xff ); |
keybuffer_push(keybuffer, (buf >> 8) & 0xff); |
keybuffer_push(keybuffer, (buf >> 16) & 0xff); |
keybuffer_push(keybuffer, (buf >> 24) & 0xff); |
buf = count = 0; |
return 1; |
} |
return 1; |
} |
/** Initializes keyboard handler. */ |
int kbd_arch_init(void) |
{ |
fb = (sysinfo_value("fb.kind") == 1); |
gxemul_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual"); |
ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &gxemul_kbd); |
return 0; |
} |
/** Process data sent when a key is pressed. |
* |
* @param keybuffer Buffer of pressed keys. |
* @param call IPC call. |
* |
* @return Always 1. |
*/ |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
int scan_code = IPC_GET_ARG2(*call); |
if (fb) { |
return gxemul_kbd_process_fb(keybuffer, scan_code); |
} else { |
return gxemul_kbd_process_no_fb(keybuffer, scan_code); |
} |
} |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ia64/include/kbd.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdia64 ia64 |
* @brief HelenOS ia64 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KBD_ia64_KBD_H_ |
#define KBD_ia64_KBD_H_ |
#endif |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ia64/src/kbd.c |
---|
0,0 → 1,164 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdia64 ia64 |
* @brief HelenOS ia64 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/kbd.h> |
#include <ipc/ipc.h> |
#include <sysinfo.h> |
#include <kbd.h> |
#include <keys.h> |
#define KEY_F1 0x504f1b |
#define KEY_F2 0x514f1b |
#define KEY_F3 0x524f1b |
#define KEY_F4 0x534f1b |
#define KEY_F5 0x7e35315b1b |
#define KEY_F6 0x7e37315b1b |
#define KEY_F7 0x7e38315b1b |
#define KEY_F8 0x7e39315b1b |
#define KEY_F9 0x7e30325b1b |
#define KEY_F10 0x7e31325b1b |
#define KEY_F11 0x7e33325b1b |
#define KEY_F12 0x7e34325b1b |
#define FUNCTION_KEYS 0x100 |
irq_cmd_t ski_cmds[1] = { |
{ CMD_IA64_GETCHAR, 0, 0, 2 } |
}; |
irq_code_t ski_kbd = { |
1, |
ski_cmds |
}; |
int kbd_arch_init(void) |
{ |
if (sysinfo_value("kbd")) { |
ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &ski_kbd); |
return 0; |
} |
return 1; |
} |
/* |
* Please preserve this code (it can be used to determine scancodes) |
* |
int to_hex(int v) |
{ |
return "0123456789ABCDEF"[v]; |
} |
*/ |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
static unsigned long long buf = 0; |
static int count = 0; |
static int esc_count = 0; |
int scan_code = IPC_GET_ARG2(*call); |
/* |
* Please preserve this code (it can be used to determine scancodes) |
*/ |
//keybuffer_push(keybuffer, to_hex((scan_code>>4)&0xf)); |
//keybuffer_push(keybuffer, to_hex(scan_code&0xf)); |
//keybuffer_push(keybuffer, ' '); |
//keybuffer_push(keybuffer, ' '); |
//*/ |
if (scan_code) { |
buf |= (unsigned long long) scan_code<<(8*(count++)); |
} else { |
if (buf == 0x1b) { |
esc_count++; |
if (esc_count == 3) { |
__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE); |
} |
} else { |
esc_count = 0; |
} |
if (!(buf & 0xff00)) { |
keybuffer_push(keybuffer, buf); |
} else { |
switch (buf) { |
case KEY_F1: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 1); |
break; |
case KEY_F2: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 2); |
break; |
case KEY_F3: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 3); |
break; |
case KEY_F4: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 4); |
break; |
case KEY_F5: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 5); |
break; |
case KEY_F6: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 6); |
break; |
case KEY_F7: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 7); |
break; |
case KEY_F8: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 8); |
break; |
case KEY_F9: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 9); |
break; |
case KEY_F10: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 10); |
break; |
case KEY_F11: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 11); |
break; |
case KEY_F12: |
keybuffer_push(keybuffer, FUNCTION_KEYS | 12); |
break; |
} |
} |
buf = count = 0; |
} |
return 1; |
} |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ppc32/include/kbd.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdppc32 ppc32 |
* @brief HelenOS ppc32 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KBD_ppc32_KBD_H_ |
#define KBD_ppc32_KBD_H_ |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ppc32/src/kbd.c |
---|
0,0 → 1,209 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdppc32 ppc32 |
* @brief HelenOS ppc32 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/kbd.h> |
#include <ipc/ipc.h> |
#include <sysinfo.h> |
#include <kbd.h> |
#include <keys.h> |
irq_cmd_t cuda_cmds[1] = { |
{ CMD_PPC32_GETCHAR, 0, 0, 2 } |
}; |
irq_code_t cuda_kbd = { |
1, |
cuda_cmds |
}; |
#define SPECIAL 255 |
#define FUNCTION_KEYS 0x100 |
static int lchars[0x80] = { |
'a', |
's', |
'd', |
'f', |
'h', |
'g', |
'z', |
'x', |
'c', |
'v', |
SPECIAL, |
'b', |
'q', |
'w', |
'e', |
'r', |
'y', |
't', |
'1', |
'2', |
'3', |
'4', |
'6', |
'5', |
'=', |
'9', |
'7', |
'-', |
'8', |
'0', |
']', |
'o', |
'u', |
'[', |
'i', |
'p', |
'\n', /* Enter */ |
'l', |
'j', |
'\'', |
'k', |
';', |
'\\', |
',', |
'/', |
'n', |
'm', |
'.', |
'\t', /* Tab */ |
' ', |
'`', |
'\b', /* Backspace */ |
SPECIAL, |
SPECIAL, /* Escape */ |
SPECIAL, /* Ctrl */ |
SPECIAL, /* Alt */ |
SPECIAL, /* Shift */ |
SPECIAL, /* Caps-Lock */ |
SPECIAL, /* RAlt */ |
SPECIAL, /* Left */ |
SPECIAL, /* Right */ |
SPECIAL, /* Down */ |
SPECIAL, /* Up */ |
SPECIAL, |
SPECIAL, |
'.', /* Keypad . */ |
SPECIAL, |
'*', /* Keypad * */ |
SPECIAL, |
'+', /* Keypad + */ |
SPECIAL, |
SPECIAL, /* NumLock */ |
SPECIAL, |
SPECIAL, |
SPECIAL, |
'/', /* Keypad / */ |
'\n', /* Keypad Enter */ |
SPECIAL, |
'-', /* Keypad - */ |
SPECIAL, |
SPECIAL, |
SPECIAL, |
'0', /* Keypad 0 */ |
'1', /* Keypad 1 */ |
'2', /* Keypad 2 */ |
'3', /* Keypad 3 */ |
'4', /* Keypad 4 */ |
'5', /* Keypad 5 */ |
'6', /* Keypad 6 */ |
'7', /* Keypad 7 */ |
SPECIAL, |
'8', /* Keypad 8 */ |
'9', /* Keypad 9 */ |
SPECIAL, |
SPECIAL, |
SPECIAL, |
(FUNCTION_KEYS | 5), /* F5 */ |
(FUNCTION_KEYS | 6), /* F6 */ |
(FUNCTION_KEYS | 7), /* F7 */ |
(FUNCTION_KEYS | 3), /* F3 */ |
(FUNCTION_KEYS | 8), /* F8 */ |
(FUNCTION_KEYS | 9), /* F9 */ |
SPECIAL, |
(FUNCTION_KEYS | 11), /* F11 */ |
SPECIAL, |
(FUNCTION_KEYS | 13), /* F13 */ |
SPECIAL, |
SPECIAL, /* ScrollLock */ |
SPECIAL, |
(FUNCTION_KEYS | 10), /* F10 */ |
SPECIAL, |
(FUNCTION_KEYS | 12), /* F12 */ |
SPECIAL, |
SPECIAL, /* Pause */ |
SPECIAL, /* Insert */ |
SPECIAL, /* Home */ |
SPECIAL, /* PageUp */ |
SPECIAL, /* Delete */ |
(FUNCTION_KEYS | 4), /* F4 */ |
SPECIAL, /* End */ |
(FUNCTION_KEYS | 2), /* F2 */ |
SPECIAL, /* PageDown */ |
(FUNCTION_KEYS | 1) /* F1 */ |
}; |
int kbd_arch_init(void) |
{ |
return ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &cuda_kbd); |
} |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
int param = IPC_GET_ARG2(*call); |
if (param != -1) { |
uint8_t scancode = (uint8_t) param; |
if ((scancode & 0x80) != 0x80) { |
int key = lchars[scancode & 0x7f]; |
if (key != SPECIAL) |
keybuffer_push(keybuffer, key); |
} |
} |
return 1; |
} |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ppc64/include/kbd.h |
---|
0,0 → 1,43 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdppc64 ppc64 |
* @brief HelenOS ppc64 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KBD_ppc64_KBD_H_ |
#define KBD_ppc64_KBD_H_ |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/ppc64/src/kbd.c |
---|
0,0 → 1,56 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdppc64 ppc64 |
* @brief HelenOS ppc64 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/kbd.h> |
#include <ipc/ipc.h> |
#include <sysinfo.h> |
#include <kbd.h> |
#include <keys.h> |
int kbd_arch_init(void) |
{ |
return 0; |
} |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
return 1; |
} |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/mips32/include/kbd.h |
---|
0,0 → 1,44 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdmips32 mips32 |
* @brief HelenOS mips32 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KBD_mips32_KBD_H_ |
#define KBD_mips32_KBD_H_ |
#endif |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/mips32/src/kbd.c |
---|
0,0 → 1,377 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdmips32 mips32 |
* @brief HelenOS mips32 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#include <arch/kbd.h> |
#include <ipc/ipc.h> |
#include <sysinfo.h> |
#include <kbd.h> |
#include <keys.h> |
#define MSIM_KEY_F1 0x504f1bL |
#define MSIM_KEY_F2 0x514f1bL |
#define MSIM_KEY_F3 0x524f1bL |
#define MSIM_KEY_F4 0x534f1bL |
#define MSIM_KEY_F5 0x35315b1bL |
#define MSIM_KEY_F6 0x37315b1bL |
#define MSIM_KEY_F7 0x38315b1bL |
#define MSIM_KEY_F8 0x39315b1bL |
#define MSIM_KEY_F9 0x30325b1bL |
#define MSIM_KEY_F10 0x31325b1bL |
#define MSIM_KEY_F11 0x33325b1bL |
#define MSIM_KEY_F12 0x34325b1bL |
#define GXEMUL_KEY_F1 0x504f5b1bL |
#define GXEMUL_KEY_F2 0x514f5b1bL |
#define GXEMUL_KEY_F3 0x524f5b1bL |
#define GXEMUL_KEY_F4 0x534f5b1bL |
#define GXEMUL_KEY_F5 0x35315b1bL |
#define GXEMUL_KEY_F6 0x37315b1bL |
#define GXEMUL_KEY_F7 0x38315b1bL |
#define GXEMUL_KEY_F8 0x39315b1bL |
#define GXEMUL_KEY_F9 0x38325b1bL |
#define GXEMUL_KEY_F10 0x39325b1bL |
#define GXEMUL_KEY_F11 0x33325b1bL |
#define GXEMUL_KEY_F12 0x34325b1bL |
#define FUNCTION_KEYS 0x100 |
irq_cmd_t msim_cmds[1] = { |
{ CMD_MEM_READ_1, (void *) 0, 0, 2 } |
}; |
irq_code_t msim_kbd = { |
1, |
msim_cmds |
}; |
static int msim,gxemul; |
static int fb_fb; |
int kbd_arch_init(void) |
{ |
fb_fb = (sysinfo_value("fb.kind") == 1); |
msim_cmds[0].addr = sysinfo_value("kbd.address.virtual"); |
ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &msim_kbd); |
return 0; |
} |
/* |
//* |
//* Please preserve this code (it can be used to determine scancodes) |
//* |
int to_hex(int v) |
{ |
return "0123456789ABCDEF"[v]; |
} |
*/ |
static int kbd_arch_process_no_fb(keybuffer_t *keybuffer, int scan_code) |
{ |
static unsigned long buf = 0; |
static int count = 0; |
/* Please preserve this code (it can be used to determine scancodes) |
keybuffer_push(keybuffer, to_hex((scan_code>>4)&0xf)); |
keybuffer_push(keybuffer, to_hex(scan_code&0xf)); |
keybuffer_push(keybuffer, ' '); |
keybuffer_push(keybuffer, ' '); |
return 1; |
*/ |
if(scan_code == 0x7e) { |
switch (buf) { |
case MSIM_KEY_F5: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 5); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F6: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 6); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F7: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 7); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F8: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 8); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F9: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 9); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F10: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 10); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F11: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 11); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F12: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 12); |
buf = count = 0; |
return 1; |
default: |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) &0xff); |
keybuffer_push(keybuffer, (buf >> 16) &0xff); |
keybuffer_push(keybuffer, (buf >> 24) &0xff); |
keybuffer_push(keybuffer, scan_code); |
buf = count = 0; |
return 1; |
} |
} |
buf |= ((unsigned long) scan_code)<<(8*(count++)); |
if((buf & 0xff) != (MSIM_KEY_F1 & 0xff)) { |
keybuffer_push(keybuffer, buf); |
buf = count = 0; |
return 1; |
} |
if (count <= 1) |
return 1; |
if ((buf & 0xffff) != (MSIM_KEY_F1 & 0xffff) |
&& (buf & 0xffff) != (MSIM_KEY_F5 & 0xffff) ) { |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) &0xff); |
buf = count = 0; |
return 1; |
} |
if (count <= 2) |
return 1; |
switch (buf) { |
case MSIM_KEY_F1: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 1); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F2: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 2); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F3: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 3); |
buf = count = 0; |
return 1; |
case MSIM_KEY_F4: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 4); |
buf = count = 0; |
return 1; |
} |
if((buf & 0xffffff) != (MSIM_KEY_F5 & 0xffffff) |
&& (buf & 0xffffff) != (MSIM_KEY_F9 & 0xffffff)) { |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) & 0xff); |
keybuffer_push(keybuffer, (buf >> 16) & 0xff); |
buf=count=0; |
return 1; |
} |
if (count <= 3) |
return 1; |
switch (buf) { |
case MSIM_KEY_F5: |
case MSIM_KEY_F6: |
case MSIM_KEY_F7: |
case MSIM_KEY_F8: |
case MSIM_KEY_F9: |
case MSIM_KEY_F10: |
case MSIM_KEY_F11: |
case MSIM_KEY_F12: |
return 1; |
default: |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) &0xff); |
keybuffer_push(keybuffer, (buf >> 16) &0xff); |
keybuffer_push(keybuffer, (buf >> 24) &0xff); |
buf = count = 0; |
return 1; |
} |
return 1; |
} |
static int kbd_arch_process_fb(keybuffer_t *keybuffer, int scan_code) |
{ |
static unsigned long buf = 0; |
static int count = 0; |
/* Please preserve this code (it can be used to determine scancodes) |
keybuffer_push(keybuffer, to_hex((scan_code>>4)&0xf)); |
keybuffer_push(keybuffer, to_hex(scan_code&0xf)); |
keybuffer_push(keybuffer, ' '); |
keybuffer_push(keybuffer, ' '); |
return 1; |
*/ |
if (scan_code == '\r') |
scan_code = '\n'; |
buf |= ((unsigned long) scan_code)<<(8*(count++)); |
if ((buf & 0xff) != (GXEMUL_KEY_F1 & 0xff)) { |
keybuffer_push(keybuffer, buf); |
buf = count = 0; |
return 1; |
} |
if (count <= 1) |
return 1; |
if ((buf & 0xffff) != (GXEMUL_KEY_F1 & 0xffff)) { |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) &0xff); |
buf = count = 0; |
return 1; |
} |
if (count <= 2) |
return 1; |
if ((buf & 0xffffff) != (GXEMUL_KEY_F1 & 0xffffff) |
&& (buf & 0xffffff) != (GXEMUL_KEY_F5 & 0xffffff) |
&& (buf & 0xffffff) != (GXEMUL_KEY_F9 & 0xffffff)) { |
keybuffer_push(keybuffer, buf & 0xff); |
keybuffer_push(keybuffer, (buf >> 8) & 0xff); |
keybuffer_push(keybuffer, (buf >> 16) & 0xff); |
buf = count = 0; |
return 1; |
} |
if ( count <= 3 ) |
return 1; |
switch (buf) { |
case GXEMUL_KEY_F1: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 1 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F2: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 2 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F3: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 3 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F4: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 4 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F5: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 5 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F6: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 6 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F7: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 7 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F8: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 8 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F9: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 9 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F10: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 10 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F11: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 11 ); |
buf=count=0; |
return 1; |
case GXEMUL_KEY_F12: |
keybuffer_push(keybuffer,FUNCTION_KEYS | 12 ); |
buf=count=0; |
return 1; |
default: |
keybuffer_push(keybuffer, buf & 0xff ); |
keybuffer_push(keybuffer, (buf >> 8) &0xff ); |
keybuffer_push(keybuffer, (buf >> 16) &0xff ); |
keybuffer_push(keybuffer, (buf >> 24) &0xff ); |
buf=count=0; |
return 1; |
} |
return 1; |
} |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
int scan_code = IPC_GET_ARG2(*call); |
static int esc_count=0; |
if (scan_code == 0x1b) { |
esc_count++; |
if (esc_count == 3) |
__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE); |
} else { |
esc_count=0; |
} |
if (fb_fb) |
return kbd_arch_process_fb(keybuffer, scan_code); |
return kbd_arch_process_no_fb(keybuffer, scan_code); |
} |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/arch/amd64 |
---|
0,0 → 1,0 |
link ia32 |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/uspace/srv/kbd/arch/mips32eb |
---|
0,0 → 1,0 |
link mips32 |
Property changes: |
Added: svn:special |
+* |
\ No newline at end of property |
/branches/arm/uspace/srv/kbd/include/sun.h |
---|
File deleted |
/branches/arm/uspace/srv/kbd/include/layout.h |
---|
File deleted |
/branches/arm/uspace/srv/kbd/include/gsp.h |
---|
File deleted |
/branches/arm/uspace/srv/kbd/include/keybuffer.h |
---|
File deleted |
/branches/arm/uspace/srv/kbd/include/kbd_port.h |
---|
File deleted |
/branches/arm/uspace/srv/kbd/include/kbd_ctl.h |
---|
File deleted |
/branches/arm/uspace/srv/kbd/include/stroke.h |
---|
File deleted |
/branches/arm/uspace/srv/kbd/include/key_buffer.h |
---|
0,0 → 1,64 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdgen |
* @brief HelenOS generic uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#ifndef __KEY_BUFFER_H__ |
#define __KEY_BUFFER_H__ |
#include <sys/types.h> |
/** Size of buffer for pressed keys */ |
#define KEYBUFFER_SIZE 128 |
typedef struct { |
int fifo[KEYBUFFER_SIZE]; |
unsigned long head; |
unsigned long tail; |
unsigned long items; |
} keybuffer_t; |
void keybuffer_free(keybuffer_t *keybuffer); |
void keybuffer_init(keybuffer_t *keybuffer); |
int keybuffer_available(keybuffer_t *keybuffer); |
int keybuffer_empty(keybuffer_t *keybuffer); |
void keybuffer_push(keybuffer_t *keybuffer, int key); |
int keybuffer_pop(keybuffer_t *keybuffer, int *c); |
#endif |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/include/keys.h |
---|
0,0 → 1,62 |
/* |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** |
* @addtogroup kbdgen |
* @{ |
*/ |
/** |
* @file |
*/ |
#ifndef _KBD_KEYS_H_ |
#define _KBD_KEYS_H_ |
#define KBD_PUSHCHAR 1024 |
#define KBD_MS_LEFT 1025 |
#define KBD_MS_RIGHT 1026 |
#define KBD_MS_MIDDLE 1027 |
#define KBD_MS_MOVE 1028 |
#define KBD_KEY_F1 0x3b |
#define KBD_KEY_F2 0x3c |
#define KBD_KEY_F3 0x3d |
#define KBD_KEY_F4 0x3e |
#define KBD_KEY_F5 0x3f |
#define KBD_KEY_F6 0x40 |
#define KBD_KEY_F7 0x41 |
#define KBD_KEY_F8 0x42 |
#define KBD_KEY_F9 0x43 |
#define KBD_KEY_F10 0x44 |
#define KBD_KEY_F11 0x45 |
#define KBD_KEY_F12 0x46 |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/kbd/include/kbd.h |
---|
27,10 → 27,10 |
*/ |
/** @addtogroup kbdgen generic |
* @brief HelenOS generic uspace keyboard handler. |
* @ingroup kbd |
* @brief HelenOS generic uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
*/ |
/** @file |
*/ |
37,28 → 37,15 |
#ifndef KBD_KBD_H_ |
#define KBD_KBD_H_ |
#include <keybuffer.h> |
#include <ipc/ipc.h> |
#include <key_buffer.h> |
#define KBD_EVENT 1024 |
#define KBD_MS_LEFT 1025 |
#define KBD_MS_RIGHT 1026 |
#define KBD_MS_MIDDLE 1027 |
#define KBD_MS_MOVE 1028 |
extern int kbd_arch_init(void); |
extern int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call); |
extern int mouse_arch_process(int phoneid, ipc_call_t *call); |
typedef enum { |
KBD_YIELD = IPC_FIRST_USER_METHOD, |
KBD_RECLAIM |
} kbd_request_t; |
extern int cir_service; |
extern int cir_phone; |
extern void kbd_push_scancode(int); |
extern void kbd_push_ev(int, unsigned int); |
#endif |
/** |
* @} |
*/ |
*/ |
/branches/arm/uspace/srv/kbd/genarch/gsp.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/genarch/stroke.c |
---|
File deleted |
/branches/arm/uspace/srv/kbd/genarch/include/kbd.h |
---|
0,0 → 1,47 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KBD_genarch_KBD_H_ |
#define KBD_genarch_KBD_H_ |
#include <key_buffer.h> |
extern void key_released(keybuffer_t *keybuffer, unsigned char key); |
extern void key_pressed(keybuffer_t *keybuffer, unsigned char key); |
#endif |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/genarch/include/scanc.h |
---|
0,0 → 1,50 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#ifndef KBD_SCANC_H_ |
#define KBD_SCANC_H_ |
#define FUNCTION_KEYS 0x100 |
#define SPECIAL 255 |
extern int sc_primary_map[]; |
extern int sc_secondary_map[]; |
#endif |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/kbd/genarch/src/kbd.c |
---|
0,0 → 1,113 |
/* |
* Copyright (c) 2001-2004 Jakub Jermar |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbd |
* @brief Handling of keyboard IRQ notifications for several architectures. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
*/ |
#include <key_buffer.h> |
#include <arch/scanc.h> |
#include <genarch/scanc.h> |
#include <genarch/kbd.h> |
#include <libc.h> |
#define PRESSED_SHIFT (1<<0) |
#define PRESSED_CAPSLOCK (1<<1) |
#define LOCKED_CAPSLOCK (1<<0) |
static volatile int keyflags; /**< Tracking of multiple keypresses. */ |
static volatile int lockflags; /**< Tracking of multiple keys lockings. */ |
void key_released(keybuffer_t *keybuffer, unsigned char key) |
{ |
switch (key) { |
case SC_LSHIFT: |
case SC_RSHIFT: |
keyflags &= ~PRESSED_SHIFT; |
break; |
case SC_CAPSLOCK: |
keyflags &= ~PRESSED_CAPSLOCK; |
if (lockflags & LOCKED_CAPSLOCK) |
lockflags &= ~LOCKED_CAPSLOCK; |
else |
lockflags |= LOCKED_CAPSLOCK; |
break; |
default: |
break; |
} |
} |
void key_pressed(keybuffer_t *keybuffer, unsigned char key) |
{ |
int *map = sc_primary_map; |
int ascii = sc_primary_map[key]; |
int shift, capslock; |
int letter = 0; |
static int esc_count = 0; |
if (key == SC_ESC) { |
esc_count++; |
if (esc_count == 3) |
__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE); |
} else { |
esc_count = 0; |
} |
switch (key) { |
case SC_LSHIFT: |
case SC_RSHIFT: |
keyflags |= PRESSED_SHIFT; |
break; |
case SC_CAPSLOCK: |
keyflags |= PRESSED_CAPSLOCK; |
break; |
case SC_SPEC_ESCAPE: |
break; |
default: |
letter = ((ascii >= 'a') && (ascii <= 'z')); |
capslock = (keyflags & PRESSED_CAPSLOCK) || (lockflags & LOCKED_CAPSLOCK); |
shift = keyflags & PRESSED_SHIFT; |
if (letter && capslock) |
shift = !shift; |
if (shift) |
map = sc_secondary_map; |
if (map[key] != SPECIAL) |
keybuffer_push(keybuffer, map[key]); |
break; |
} |
} |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/ns/clonable.c |
---|
File deleted |
/branches/arm/uspace/srv/ns/task.h |
---|
File deleted |
/branches/arm/uspace/srv/ns/ns.h |
---|
File deleted |
/branches/arm/uspace/srv/ns/clonable.h |
---|
File deleted |
/branches/arm/uspace/srv/ns/service.c |
---|
File deleted |
/branches/arm/uspace/srv/ns/task.c |
---|
File deleted |
/branches/arm/uspace/srv/ns/service.h |
---|
File deleted |
/branches/arm/uspace/srv/ns/Makefile |
---|
31,7 → 31,6 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
LIBS = $(LIBC_PREFIX)/libc.a |
41,10 → 40,7 |
OUTPUT = ns |
SOURCES = \ |
ns.c \ |
service.c \ |
clonable.c \ |
task.c |
ns.c |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
55,18 → 51,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/srv/ns/ns.c |
---|
28,55 → 28,77 |
/** @addtogroup ns |
* @{ |
*/ |
*/ |
/** |
* @file ns.c |
* @brief Naming service for HelenOS IPC. |
* @file ns.c |
* @brief Naming service for HelenOS IPC. |
*/ |
#include <ipc/ipc.h> |
#include <ipc/ns.h> |
#include <ipc/services.h> |
#include <ipc/ns.h> |
#include <stdio.h> |
#include <unistd.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <errno.h> |
#include <assert.h> |
#include <libadt/list.h> |
#include <libadt/hash_table.h> |
#include <sysinfo.h> |
#include <ddi.h> |
#include <as.h> |
#include <ddi.h> |
#include <event.h> |
#include <macros.h> |
#include <sysinfo.h> |
#include "ns.h" |
#include "service.h" |
#include "clonable.h" |
#include "task.h" |
#define NAME "ns" |
#define NS_HASH_TABLE_CHAINS 20 |
static int register_service(ipcarg_t service, ipcarg_t phone, ipc_call_t *call); |
static int connect_to_service(ipcarg_t service, ipc_call_t *call, |
ipc_callid_t callid); |
/* Static functions implementing NS hash table operations. */ |
static hash_index_t ns_hash(unsigned long *key); |
static int ns_compare(unsigned long *key, hash_count_t keys, link_t *item); |
static void ns_remove(link_t *item); |
/** Operations for NS hash table. */ |
static hash_table_operations_t ns_hash_table_ops = { |
.hash = ns_hash, |
.compare = ns_compare, |
.remove_callback = ns_remove |
}; |
/** NS hash table structure. */ |
static hash_table_t ns_hash_table; |
/** NS hash table item. */ |
typedef struct { |
link_t link; |
ipcarg_t service; /**< Number of the service. */ |
ipcarg_t phone; /**< Phone registered with the service. */ |
ipcarg_t in_phone_hash; /**< Incoming phone hash. */ |
} hashed_service_t; |
static void *clockaddr = NULL; |
static void *klogaddr = NULL; |
static void get_as_area(ipc_callid_t callid, ipc_call_t *call, void *ph_addr, |
size_t pages, void **addr) |
static void get_as_area(ipc_callid_t callid, ipc_call_t *call, char *name, |
void **addr) |
{ |
if (ph_addr == NULL) { |
ipc_answer_0(callid, ENOENT); |
return; |
} |
if (*addr == NULL) { |
*addr = as_get_mappable_page(pages * PAGE_SIZE); |
if (*addr == NULL) { |
void *ph_addr; |
if (!*addr) { |
ph_addr = (void *) sysinfo_value(name); |
if (!ph_addr) { |
ipc_answer_0(callid, ENOENT); |
return; |
} |
if (physmem_map(ph_addr, *addr, pages, |
AS_AREA_READ | AS_AREA_CACHEABLE) != 0) { |
ipc_answer_0(callid, ENOENT); |
return; |
} |
*addr = as_get_mappable_page(PAGE_SIZE); |
physmem_map(ph_addr, *addr, 1, |
AS_AREA_READ | AS_AREA_CACHEABLE); |
} |
ipc_answer_2(callid, EOK, (ipcarg_t) *addr, AS_AREA_READ); |
} |
84,42 → 106,30 |
{ |
printf(NAME ": HelenOS IPC Naming Service\n"); |
int rc = service_init(); |
if (rc != EOK) |
return rc; |
ipc_call_t call; |
ipc_callid_t callid; |
rc = clonable_init(); |
if (rc != EOK) |
return rc; |
ipcarg_t retval; |
if (!hash_table_create(&ns_hash_table, NS_HASH_TABLE_CHAINS, 3, |
&ns_hash_table_ops)) { |
printf(NAME ": No memory available\n"); |
return ENOMEM; |
} |
rc = task_init(); |
if (rc != EOK) |
return rc; |
printf(NAME ": Accepting connections\n"); |
while (true) { |
process_pending_conn(); |
process_pending_wait(); |
ipc_call_t call; |
ipc_callid_t callid = ipc_wait_for_call(&call); |
task_id_t id; |
ipcarg_t retval; |
while (1) { |
callid = ipc_wait_for_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_SHARE_IN: |
switch (IPC_GET_ARG3(call)) { |
case SERVICE_MEM_REALTIME: |
get_as_area(callid, &call, |
(void *) sysinfo_value("clock.faddr"), |
1, &clockaddr); |
get_as_area(callid, &call, "clock.faddr", |
&clockaddr); |
break; |
case SERVICE_MEM_KLOG: |
get_as_area(callid, &call, |
(void *) sysinfo_value("klog.faddr"), |
sysinfo_value("klog.pages"), &klogaddr); |
get_as_area(callid, &call, "klog.faddr", |
&klogaddr); |
break; |
default: |
ipc_answer_0(callid, ENOENT); |
126,56 → 136,29 |
} |
continue; |
case IPC_M_PHONE_HUNGUP: |
retval = ns_task_disconnect(&call); |
retval = EOK; |
break; |
case IPC_M_CONNECT_TO_ME: |
/* |
* Server requests service registration. |
*/ |
if (service_clonable(IPC_GET_ARG1(call))) { |
register_clonable(IPC_GET_ARG1(call), |
IPC_GET_ARG5(call), &call, callid); |
continue; |
} else { |
retval = register_service(IPC_GET_ARG1(call), |
IPC_GET_ARG5(call), &call); |
} |
retval = register_service(IPC_GET_ARG1(call), |
IPC_GET_ARG5(call), &call); |
break; |
case IPC_M_CONNECT_ME_TO: |
/* |
* Client requests to be connected to a service. |
*/ |
if (service_clonable(IPC_GET_ARG1(call))) { |
connect_to_clonable(IPC_GET_ARG1(call), |
&call, callid); |
continue; |
} else { |
connect_to_service(IPC_GET_ARG1(call), &call, |
callid); |
continue; |
} |
retval = connect_to_service(IPC_GET_ARG1(call), &call, |
callid); |
break; |
case NS_PING: |
retval = EOK; |
break; |
case NS_TASK_WAIT: |
id = (task_id_t) |
MERGE_LOUP32(IPC_GET_ARG1(call), IPC_GET_ARG2(call)); |
wait_for_task(id, &call, callid); |
continue; |
case NS_ID_INTRO: |
retval = ns_task_id_intro(&call); |
break; |
case NS_RETVAL: |
retval = ns_task_retval(&call); |
break; |
default: |
retval = ENOENT; |
break; |
} |
if (!(callid & IPC_CALLID_NOTIFICATION)) |
if (!(callid & IPC_CALLID_NOTIFICATION)) { |
ipc_answer_0(callid, retval); |
} |
} |
/* Not reached */ |
182,6 → 165,115 |
return 0; |
} |
/** |
/** Register service. |
* |
* @param service Service to be registered. |
* @param phone Phone to be used for connections to the service. |
* @param call Pointer to call structure. |
* |
* @return Zero on success or a value from @ref errno.h. |
*/ |
int register_service(ipcarg_t service, ipcarg_t phone, ipc_call_t *call) |
{ |
unsigned long keys[3] = { |
service, |
call->in_phone_hash, |
0 |
}; |
hashed_service_t *hs; |
if (hash_table_find(&ns_hash_table, keys)) { |
return EEXISTS; |
} |
hs = (hashed_service_t *) malloc(sizeof(hashed_service_t)); |
if (!hs) { |
return ENOMEM; |
} |
link_initialize(&hs->link); |
hs->service = service; |
hs->phone = phone; |
hs->in_phone_hash = call->in_phone_hash; |
hash_table_insert(&ns_hash_table, keys, &hs->link); |
return 0; |
} |
/** Connect client to service. |
* |
* @param service Service to be connected to. |
* @param call Pointer to call structure. |
* @param callid Call ID of the request. |
* |
* @return Zero on success or a value from @ref errno.h. |
*/ |
int connect_to_service(ipcarg_t service, ipc_call_t *call, ipc_callid_t callid) |
{ |
unsigned long keys[3] = { service, 0, 0 }; |
link_t *hlp; |
hashed_service_t *hs; |
hlp = hash_table_find(&ns_hash_table, keys); |
if (!hlp) { |
return ENOENT; |
} |
hs = hash_table_get_instance(hlp, hashed_service_t, link); |
return ipc_forward_fast(callid, hs->phone, IPC_GET_ARG2(*call), |
IPC_GET_ARG3(*call), 0, IPC_FF_NONE); |
} |
/** Compute hash index into NS hash table. |
* |
* @param key Pointer keys. However, only the first key (i.e. service number) |
* is used to compute the hash index. |
* @return Hash index corresponding to key[0]. |
*/ |
hash_index_t ns_hash(unsigned long *key) |
{ |
assert(key); |
return *key % NS_HASH_TABLE_CHAINS; |
} |
/** Compare a key with hashed item. |
* |
* This compare function always ignores the third key. |
* It exists only to make it possible to remove records |
* originating from connection with key[1] in_phone_hash |
* value. Note that this is close to being classified |
* as a nasty hack. |
* |
* @param key Array of keys. |
* @param keys Must be lesser or equal to 3. |
* @param item Pointer to a hash table item. |
* @return Non-zero if the key matches the item, zero otherwise. |
*/ |
int ns_compare(unsigned long key[], hash_count_t keys, link_t *item) |
{ |
hashed_service_t *hs; |
assert(key); |
assert(keys <= 3); |
assert(item); |
hs = hash_table_get_instance(item, hashed_service_t, link); |
if (keys == 2) |
return key[1] == hs->in_phone_hash; |
else |
return key[0] == hs->service; |
} |
/** Perform actions after removal of item from the hash table. |
* |
* @param item Item that was removed from the hash table. |
*/ |
void ns_remove(link_t *item) |
{ |
assert(item); |
free(hash_table_get_instance(item, hashed_service_t, link)); |
} |
/** |
* @} |
*/ |
/branches/arm/uspace/srv/console/gfx/cons_selected.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/nameic.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/helenos.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/cons_idle.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/cons_kernel.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/anim_1.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/anim_2.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/anim_3.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/cons_has_data.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/gfx/anim_4.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/Makefile |
---|
31,9 → 31,8 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -I. -I../kbd/include -I../fb |
LIBS = $(LIBC_PREFIX)/libc.a |
42,30 → 41,22 |
# |
OUTPUT = console |
GENERIC_SOURCES = \ |
console.c \ |
screenbuffer.c \ |
../kbd/generic/keybuffer.c \ |
../kbd/generic/key_buffer.c \ |
gcons.c |
IMAGES = \ |
gfx/helenos.ppm \ |
gfx/nameic.ppm \ |
gfx/cons_selected.ppm \ |
gfx/cons_idle.ppm \ |
gfx/cons_has_data.ppm \ |
gfx/cons_kernel.ppm \ |
gfx/anim_1.ppm \ |
gfx/anim_2.ppm \ |
gfx/anim_3.ppm \ |
gfx/anim_4.ppm |
IMAGES = helenos.ppm nameic.ppm cons_selected.ppm cons_idle.ppm \ |
cons_has_data.ppm cons_kernel.ppm anim_1.ppm anim_2.ppm anim_3.ppm \ |
anim_4.ppm |
ARCH_SOURCES = |
GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) \ |
$(addsuffix .o,$(basename $(IMAGES))) |
$(addsuffix .o,$(basename $(IMAGES))) |
ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
OBJECTS := $(GENERIC_OBJECTS) |
.PHONY: all clean depend disasm |
all: $(OUTPUT) $(OUTPUT).disasm |
73,18 → 64,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(OUTPUT): $(ARCH_OBJECTS) $(GENERIC_OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(GENERIC_OBJECTS) $(ARCH_OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/srv/console/console.c |
---|
27,7 → 27,7 |
*/ |
/** @addtogroup console |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
35,388 → 35,327 |
#include <libc.h> |
#include <fb.h> |
#include <ipc/ipc.h> |
#include <kbd.h> |
#include <io/keycode.h> |
#include <keys.h> |
#include <ipc/fb.h> |
#include <ipc/services.h> |
#include <errno.h> |
#include <keybuffer.h> |
#include <ipc/console.h> |
#include <key_buffer.h> |
#include <console.h> |
#include <unistd.h> |
#include <async.h> |
#include <adt/fifo.h> |
#include <libadt/fifo.h> |
#include <screenbuffer.h> |
#include <sys/mman.h> |
#include <stdio.h> |
#include <string.h> |
#include <sysinfo.h> |
#include <event.h> |
#include <devmap.h> |
#include <fibril_sync.h> |
#include "console.h" |
#include "gcons.h" |
#include "screenbuffer.h" |
#define NAME "console" |
#define MAX_KEYREQUESTS_BUFFERED 32 |
#define MAX_DEVICE_NAME 32 |
#define NAME "console" |
/** Phone to the keyboard driver. */ |
static int kbd_phone; |
/** Index of currently used virtual console. |
*/ |
int active_console = 0; |
/** Information about framebuffer */ |
/** Information about framebuffer |
*/ |
struct { |
int phone; /**< Framebuffer phone */ |
ipcarg_t cols; /**< Framebuffer columns */ |
ipcarg_t rows; /**< Framebuffer rows */ |
int color_cap; /**< Color capabilities (FB_CCAP_xxx) */ |
int phone; /**< Framebuffer phone */ |
ipcarg_t rows; /**< Framebuffer rows */ |
ipcarg_t cols; /**< Framebuffer columns */ |
} fb_info; |
typedef struct { |
size_t index; /**< Console index */ |
size_t refcount; /**< Connection reference count */ |
dev_handle_t dev_handle; /**< Device handle */ |
keybuffer_t keybuffer; /**< Buffer for incoming keys. */ |
screenbuffer_t scr; /**< Screenbuffer for saving screen |
contents and related settings. */ |
} console_t; |
keybuffer_t keybuffer; /**< Buffer for incoming keys. */ |
/** Buffer for unsatisfied request for keys. */ |
FIFO_CREATE_STATIC(keyrequests, ipc_callid_t, |
MAX_KEYREQUESTS_BUFFERED); |
int keyrequest_counter; /**< Number of requests in buffer. */ |
int client_phone; /**< Phone to connected client. */ |
int used; /**< 1 if this virtual console is |
* connected to some client.*/ |
screenbuffer_t screenbuffer; /**< Screenbuffer for saving screen |
* contents and related settings. */ |
} connection_t; |
/** Array of data for virtual consoles */ |
static console_t consoles[CONSOLE_COUNT]; |
static connection_t connections[CONSOLE_COUNT]; /**< Array of data for virtual |
* consoles */ |
static keyfield_t *interbuffer = NULL; /**< Pointer to memory shared |
* with framebufer used for |
* faster virtual console |
* switching */ |
static console_t *active_console = &consoles[0]; |
static console_t *prev_console = &consoles[0]; |
static console_t *kernel_console = &consoles[KERNEL_CONSOLE]; |
static int kernel_pixmap = -1; /**< Number of fb pixmap, where kernel |
* console is stored */ |
/** Pointer to memory shared with framebufer used for |
faster virtual console switching */ |
static keyfield_t *interbuffer = NULL; |
/** Information on row-span yet unsent to FB driver. */ |
struct { |
size_t col; /**< Leftmost column of the span. */ |
size_t row; /**< Row where the span lies. */ |
size_t cnt; /**< Width of the span. */ |
} fb_pending; |
static FIBRIL_MUTEX_INITIALIZE(input_mutex); |
static FIBRIL_CONDVAR_INITIALIZE(input_cv); |
static void curs_visibility(bool visible) |
/** Find unused virtual console. |
* |
*/ |
static int find_free_connection(void) |
{ |
async_msg_1(fb_info.phone, FB_CURSOR_VISIBILITY, visible); |
int i; |
for (i = 0; i < CONSOLE_COUNT; i++) { |
if (!connections[i].used) |
return i; |
} |
return -1; |
} |
static void curs_hide_sync(void) |
static void clrscr(void) |
{ |
ipc_call_sync_1_0(fb_info.phone, FB_CURSOR_VISIBILITY, false); |
} |
static void curs_goto(size_t x, size_t y) |
{ |
async_msg_2(fb_info.phone, FB_CURSOR_GOTO, x, y); |
} |
static void screen_clear(void) |
{ |
async_msg_0(fb_info.phone, FB_CLEAR); |
} |
static void screen_yield(void) |
static void curs_visibility(int v) |
{ |
ipc_call_sync_0_0(fb_info.phone, FB_SCREEN_YIELD); |
async_msg_1(fb_info.phone, FB_CURSOR_VISIBILITY, v); |
} |
static void screen_reclaim(void) |
static void curs_goto(int row, int col) |
{ |
ipc_call_sync_0_0(fb_info.phone, FB_SCREEN_RECLAIM); |
async_msg_2(fb_info.phone, FB_CURSOR_GOTO, row, col); |
} |
static void kbd_yield(void) |
static void set_style(style_t *style) |
{ |
ipc_call_sync_0_0(kbd_phone, KBD_YIELD); |
async_msg_2(fb_info.phone, FB_SET_STYLE, style->fg_color, |
style->bg_color); |
} |
static void kbd_reclaim(void) |
static void set_style_col(int fgcolor, int bgcolor) |
{ |
ipc_call_sync_0_0(kbd_phone, KBD_RECLAIM); |
async_msg_2(fb_info.phone, FB_SET_STYLE, fgcolor, bgcolor); |
} |
static void set_style(int style) |
static void prtchr(char c, int row, int col) |
{ |
async_msg_1(fb_info.phone, FB_SET_STYLE, style); |
async_msg_3(fb_info.phone, FB_PUTCHAR, c, row, col); |
} |
static void set_color(int fgcolor, int bgcolor, int flags) |
{ |
async_msg_3(fb_info.phone, FB_SET_COLOR, fgcolor, bgcolor, flags); |
} |
static void set_rgb_color(int fgcolor, int bgcolor) |
{ |
async_msg_2(fb_info.phone, FB_SET_RGB_COLOR, fgcolor, bgcolor); |
} |
static void set_attrs(attrs_t *attrs) |
{ |
switch (attrs->t) { |
case at_style: |
set_style(attrs->a.s.style); |
break; |
case at_idx: |
set_color(attrs->a.i.fg_color, attrs->a.i.bg_color, |
attrs->a.i.flags); |
break; |
case at_rgb: |
set_rgb_color(attrs->a.r.fg_color, attrs->a.r.bg_color); |
break; |
} |
} |
int ccap_fb_to_con(int ccap_fb, int *ccap_con) |
{ |
switch (ccap_fb) { |
case FB_CCAP_NONE: *ccap_con = CONSOLE_CCAP_NONE; break; |
case FB_CCAP_STYLE: *ccap_con = CONSOLE_CCAP_STYLE; break; |
case FB_CCAP_INDEXED: *ccap_con = CONSOLE_CCAP_INDEXED; break; |
case FB_CCAP_RGB: *ccap_con = CONSOLE_CCAP_RGB; break; |
default: return EINVAL; |
} |
return EOK; |
} |
/** Send an area of screenbuffer to the FB driver. */ |
static void fb_update_area(console_t *cons, ipcarg_t x0, ipcarg_t y0, ipcarg_t width, ipcarg_t height) |
{ |
if (interbuffer) { |
ipcarg_t x; |
ipcarg_t y; |
for (y = 0; y < height; y++) { |
for (x = 0; x < width; x++) { |
interbuffer[y * width + x] = |
*get_field_at(&cons->scr, x0 + x, y0 + y); |
} |
} |
async_req_4_0(fb_info.phone, FB_DRAW_TEXT_DATA, |
x0, y0, width, height); |
} |
} |
/** Flush pending cells to FB. */ |
static void fb_pending_flush(void) |
{ |
if (fb_pending.cnt > 0) { |
fb_update_area(active_console, fb_pending.col, |
fb_pending.row, fb_pending.cnt, 1); |
fb_pending.cnt = 0; |
} |
} |
/** Mark a character cell as changed. |
/** Check key and process special keys. |
* |
* This adds the cell to the pending rowspan if possible. Otherwise |
* the old span is flushed first. |
* |
*/ |
static void cell_mark_changed(size_t col, size_t row) |
static void write_char(int console, char key) |
{ |
if (fb_pending.cnt != 0) { |
if ((col != fb_pending.col + fb_pending.cnt) |
|| (row != fb_pending.row)) { |
fb_pending_flush(); |
} |
} |
screenbuffer_t *scr = &(connections[console].screenbuffer); |
if (fb_pending.cnt == 0) { |
fb_pending.col = col; |
fb_pending.row = row; |
} |
fb_pending.cnt++; |
} |
/** Print a character to the active VC with buffering. */ |
static void fb_putchar(wchar_t c, ipcarg_t col, ipcarg_t row) |
{ |
async_msg_3(fb_info.phone, FB_PUTCHAR, c, col, row); |
} |
/** Process a character from the client (TTY emulation). */ |
static void write_char(console_t *cons, wchar_t ch) |
{ |
bool flush_cursor = false; |
switch (ch) { |
switch (key) { |
case '\n': |
fb_pending_flush(); |
flush_cursor = true; |
cons->scr.position_y++; |
cons->scr.position_x = 0; |
scr->position_y++; |
scr->position_x = 0; |
break; |
case '\r': |
break; |
case '\t': |
cons->scr.position_x += 8; |
cons->scr.position_x -= cons->scr.position_x % 8; |
scr->position_x += 8; |
scr->position_x -= scr->position_x % 8; |
break; |
case '\b': |
if (cons->scr.position_x == 0) |
if (scr->position_x == 0) |
break; |
cons->scr.position_x--; |
if (cons == active_console) |
cell_mark_changed(cons->scr.position_x, cons->scr.position_y); |
screenbuffer_putchar(&cons->scr, ' '); |
scr->position_x--; |
if (console == active_console) |
prtchr(' ', scr->position_y, scr->position_x); |
screenbuffer_putchar(scr, ' '); |
break; |
default: |
if (cons == active_console) |
cell_mark_changed(cons->scr.position_x, cons->scr.position_y); |
screenbuffer_putchar(&cons->scr, ch); |
cons->scr.position_x++; |
default: |
if (console == active_console) |
prtchr(key, scr->position_y, scr->position_x); |
screenbuffer_putchar(scr, key); |
scr->position_x++; |
} |
if (cons->scr.position_x >= cons->scr.size_x) { |
flush_cursor = true; |
cons->scr.position_y++; |
} |
scr->position_y += (scr->position_x >= scr->size_x); |
if (cons->scr.position_y >= cons->scr.size_y) { |
fb_pending_flush(); |
cons->scr.position_y = cons->scr.size_y - 1; |
screenbuffer_clear_line(&cons->scr, cons->scr.top_line); |
cons->scr.top_line = (cons->scr.top_line + 1) % cons->scr.size_y; |
if (cons == active_console) |
if (scr->position_y >= scr->size_y) { |
scr->position_y = scr->size_y - 1; |
screenbuffer_clear_line(scr, scr->top_line); |
scr->top_line = (scr->top_line + 1) % scr->size_y; |
if (console == active_console) |
async_msg_1(fb_info.phone, FB_SCROLL, 1); |
} |
scr->position_x = scr->position_x % scr->size_x; |
if (console == active_console) |
curs_goto(scr->position_y, scr->position_x); |
} |
if (cons == active_console && flush_cursor) |
curs_goto(cons->scr.position_x, cons->scr.position_y); |
cons->scr.position_x = cons->scr.position_x % cons->scr.size_x; |
/** Save current screen to pixmap, draw old pixmap |
* |
* @param oldpixmap Old pixmap |
* @return ID of pixmap of current screen |
*/ |
static int switch_screens(int oldpixmap) |
{ |
int newpmap; |
/* Save screen */ |
newpmap = async_req_0_0(fb_info.phone, FB_VP2PIXMAP); |
if (newpmap < 0) |
return -1; |
if (oldpixmap != -1) { |
/* Show old screen */ |
async_msg_2(fb_info.phone, FB_VP_DRAW_PIXMAP, 0, oldpixmap); |
/* Drop old pixmap */ |
async_msg_1(fb_info.phone, FB_DROP_PIXMAP, oldpixmap); |
} |
return newpmap; |
} |
/** Switch to new console */ |
static void change_console(console_t *cons) |
static void change_console(int newcons) |
{ |
if (cons == active_console) |
connection_t *conn; |
static int console_pixmap = -1; |
int i, j, rc; |
keyfield_t *field; |
style_t *style; |
if (newcons == active_console) |
return; |
fb_pending_flush(); |
if (cons == kernel_console) { |
if (newcons == KERNEL_CONSOLE) { |
if (active_console == KERNEL_CONSOLE) |
return; |
active_console = KERNEL_CONSOLE; |
curs_visibility(0); |
async_serialize_start(); |
curs_hide_sync(); |
gcons_in_kernel(); |
screen_yield(); |
kbd_yield(); |
if (kernel_pixmap == -1) { |
/* store/restore unsupported */ |
set_style_col(DEFAULT_FOREGROUND, DEFAULT_BACKGROUND); |
clrscr(); |
} else { |
gcons_in_kernel(); |
console_pixmap = switch_screens(kernel_pixmap); |
kernel_pixmap = -1; |
} |
async_serialize_end(); |
if (__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE)) { |
prev_console = active_console; |
active_console = kernel_console; |
} else |
cons = active_console; |
__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE); |
return; |
} |
async_serialize_start(); |
if (console_pixmap != -1) { |
kernel_pixmap = switch_screens(console_pixmap); |
console_pixmap = -1; |
} |
active_console = newcons; |
gcons_change_console(newcons); |
conn = &connections[active_console]; |
set_style(&conn->screenbuffer.style); |
curs_visibility(0); |
if (interbuffer) { |
for (i = 0; i < conn->screenbuffer.size_x; i++) |
for (j = 0; j < conn->screenbuffer.size_y; j++) { |
unsigned int size_x; |
size_x = conn->screenbuffer.size_x; |
interbuffer[i + j * size_x] = |
*get_field_at(&conn->screenbuffer, i, j); |
} |
/* This call can preempt, but we are already at the end */ |
rc = async_req_0_0(fb_info.phone, FB_DRAW_TEXT_DATA); |
} |
if (cons != kernel_console) { |
size_t x; |
size_t y; |
int rc = 0; |
async_serialize_start(); |
if (active_console == kernel_console) { |
screen_reclaim(); |
kbd_reclaim(); |
gcons_redraw_console(); |
} |
active_console = cons; |
gcons_change_console(cons->index); |
set_attrs(&cons->scr.attrs); |
curs_visibility(false); |
if (interbuffer) { |
for (y = 0; y < cons->scr.size_y; y++) { |
for (x = 0; x < cons->scr.size_x; x++) { |
interbuffer[y * cons->scr.size_x + x] = |
*get_field_at(&cons->scr, x, y); |
} |
if ((!interbuffer) || (rc != 0)) { |
set_style(&conn->screenbuffer.style); |
clrscr(); |
style = &conn->screenbuffer.style; |
for (j = 0; j < conn->screenbuffer.size_y; j++) |
for (i = 0; i < conn->screenbuffer.size_x; i++) { |
field = get_field_at(&conn->screenbuffer, i, j); |
if (!style_same(*style, field->style)) |
set_style(&field->style); |
style = &field->style; |
if ((field->character == ' ') && |
(style_same(field->style, |
conn->screenbuffer.style))) |
continue; |
prtchr(field->character, j, i); |
} |
/* This call can preempt, but we are already at the end */ |
rc = async_req_4_0(fb_info.phone, FB_DRAW_TEXT_DATA, |
0, 0, cons->scr.size_x, |
cons->scr.size_y); |
} |
if ((!interbuffer) || (rc != 0)) { |
set_attrs(&cons->scr.attrs); |
screen_clear(); |
for (y = 0; y < cons->scr.size_y; y++) |
for (x = 0; x < cons->scr.size_x; x++) { |
keyfield_t *field = get_field_at(&cons->scr, x, y); |
if (!attrs_same(cons->scr.attrs, field->attrs)) |
set_attrs(&field->attrs); |
cons->scr.attrs = field->attrs; |
if ((field->character == ' ') && |
(attrs_same(field->attrs, cons->scr.attrs))) |
continue; |
fb_putchar(field->character, x, y); |
} |
} |
curs_goto(cons->scr.position_x, cons->scr.position_y); |
curs_visibility(cons->scr.is_cursor_visible); |
async_serialize_end(); |
} |
curs_goto(conn->screenbuffer.position_y, |
conn->screenbuffer.position_x); |
curs_visibility(conn->screenbuffer.is_cursor_visible); |
async_serialize_end(); |
} |
/** Handler for keyboard */ |
static void keyboard_events(ipc_callid_t iid, ipc_call_t *icall) |
{ |
/* Ignore parameters, the connection is already opened */ |
while (true) { |
ipc_call_t call; |
ipc_callid_t callid = async_get_call(&call); |
int retval; |
console_event_t ev; |
ipc_callid_t callid; |
ipc_call_t call; |
int retval; |
int c; |
connection_t *conn; |
int newcon; |
/* Ignore parameters, the connection is alread opened */ |
while (1) { |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
/* TODO: Handle hangup */ |
return; |
case KBD_EVENT: |
/* Got event from keyboard driver. */ |
case KBD_MS_LEFT: |
newcon = gcons_mouse_btn(IPC_GET_ARG1(call)); |
if (newcon != -1) |
change_console(newcon); |
retval = 0; |
ev.type = IPC_GET_ARG1(call); |
ev.key = IPC_GET_ARG2(call); |
ev.mods = IPC_GET_ARG3(call); |
ev.c = IPC_GET_ARG4(call); |
break; |
case KBD_MS_MOVE: |
gcons_mouse_move(IPC_GET_ARG1(call), |
IPC_GET_ARG2(call)); |
retval = 0; |
break; |
case KBD_PUSHCHAR: |
/* got key from keyboard driver */ |
if ((ev.key >= KC_F1) && (ev.key < KC_F1 + |
CONSOLE_COUNT) && ((ev.mods & KM_CTRL) == 0)) { |
if (ev.key == KC_F1 + KERNEL_CONSOLE) |
change_console(kernel_console); |
retval = 0; |
c = IPC_GET_ARG1(call); |
/* switch to another virtual console */ |
conn = &connections[active_console]; |
/* |
* if ((c >= KBD_KEY_F1) && (c < KBD_KEY_F1 + |
* CONSOLE_COUNT)) { |
*/ |
if ((c >= 0x101) && (c < 0x101 + CONSOLE_COUNT)) { |
if (c == 0x112) |
change_console(KERNEL_CONSOLE); |
else |
change_console(&consoles[ev.key - KC_F1]); |
change_console(c - 0x101); |
break; |
} |
fibril_mutex_lock(&input_mutex); |
keybuffer_push(&active_console->keybuffer, &ev); |
fibril_condvar_broadcast(&input_cv); |
fibril_mutex_unlock(&input_mutex); |
/* if client is awaiting key, send it */ |
if (conn->keyrequest_counter > 0) { |
conn->keyrequest_counter--; |
ipc_answer_1(fifo_pop(conn->keyrequests), EOK, |
c); |
break; |
} |
keybuffer_push(&conn->keybuffer, c); |
retval = 0; |
break; |
default: |
retval = ENOENT; |
425,361 → 364,204 |
} |
} |
static void cons_write(console_t *cons, ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_write_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
char *buf = (char *) malloc(size); |
if (buf == NULL) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
(void) ipc_data_write_finalize(callid, buf, size); |
async_serialize_start(); |
size_t off = 0; |
while (off < size) { |
wchar_t ch = str_decode(buf, &off, size); |
write_char(cons, ch); |
} |
async_serialize_end(); |
gcons_notify_char(cons->index); |
ipc_answer_1(rid, EOK, size); |
free(buf); |
} |
static void cons_read(console_t *cons, ipc_callid_t rid, ipc_call_t *request) |
{ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_read_receive(&callid, &size)) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(rid, EINVAL); |
return; |
} |
char *buf = (char *) malloc(size); |
if (buf == NULL) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(rid, ENOMEM); |
return; |
} |
size_t pos = 0; |
console_event_t ev; |
fibril_mutex_lock(&input_mutex); |
recheck: |
while ((keybuffer_pop(&cons->keybuffer, &ev)) && (pos < size)) { |
if (ev.type == KEY_PRESS) { |
buf[pos] = ev.c; |
pos++; |
} |
} |
if (pos == size) { |
(void) ipc_data_read_finalize(callid, buf, size); |
ipc_answer_1(rid, EOK, size); |
free(buf); |
} else { |
fibril_condvar_wait(&input_cv, &input_mutex); |
goto recheck; |
} |
fibril_mutex_unlock(&input_mutex); |
} |
static void cons_get_event(console_t *cons, ipc_callid_t rid, ipc_call_t *request) |
{ |
console_event_t ev; |
fibril_mutex_lock(&input_mutex); |
recheck: |
if (keybuffer_pop(&cons->keybuffer, &ev)) { |
ipc_answer_4(rid, EOK, ev.type, ev.key, ev.mods, ev.c); |
} else { |
fibril_condvar_wait(&input_cv, &input_mutex); |
goto recheck; |
} |
fibril_mutex_unlock(&input_mutex); |
} |
/** Default thread for new connections */ |
static void client_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
console_t *cons = NULL; |
size_t i; |
for (i = 0; i < CONSOLE_COUNT; i++) { |
if (i == KERNEL_CONSOLE) |
continue; |
if (consoles[i].dev_handle == (dev_handle_t) IPC_GET_ARG1(*icall)) { |
cons = &consoles[i]; |
break; |
} |
} |
if (cons == NULL) { |
ipc_answer_0(iid, ENOENT); |
return; |
} |
ipc_callid_t callid; |
ipc_call_t call; |
ipcarg_t arg1; |
ipcarg_t arg2; |
ipcarg_t arg3; |
int consnum; |
ipcarg_t arg1, arg2; |
connection_t *conn; |
int cons_ccap; |
int rc; |
if ((consnum = find_free_connection()) == -1) { |
ipc_answer_0(iid, ELIMIT); |
return; |
} |
conn = &connections[consnum]; |
conn->used = 1; |
async_serialize_start(); |
if (cons->refcount == 0) |
gcons_notify_connect(cons->index); |
gcons_notify_connect(consnum); |
conn->client_phone = IPC_GET_ARG5(*icall); |
screenbuffer_clear(&conn->screenbuffer); |
cons->refcount++; |
/* Accept the connection */ |
ipc_answer_0(iid, EOK); |
while (true) { |
while (1) { |
async_serialize_end(); |
callid = async_get_call(&call); |
async_serialize_start(); |
arg1 = 0; |
arg2 = 0; |
arg3 = 0; |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
cons->refcount--; |
if (cons->refcount == 0) |
gcons_notify_disconnect(cons->index); |
gcons_notify_disconnect(consnum); |
/* Answer all pending requests */ |
while (conn->keyrequest_counter > 0) { |
conn->keyrequest_counter--; |
ipc_answer_0(fifo_pop(conn->keyrequests), |
ENOENT); |
break; |
} |
conn->used = 0; |
return; |
case VFS_OUT_READ: |
async_serialize_end(); |
cons_read(cons, callid, &call); |
async_serialize_start(); |
continue; |
case VFS_OUT_WRITE: |
async_serialize_end(); |
cons_write(cons, callid, &call); |
async_serialize_start(); |
continue; |
case VFS_OUT_SYNC: |
fb_pending_flush(); |
if (cons == active_console) { |
async_req_0_0(fb_info.phone, FB_FLUSH); |
curs_goto(cons->scr.position_x, cons->scr.position_y); |
} |
case CONSOLE_PUTCHAR: |
write_char(consnum, IPC_GET_ARG1(call)); |
gcons_notify_char(consnum); |
break; |
case CONSOLE_CLEAR: |
/* Send message to fb */ |
if (cons == active_console) |
async_msg_0(fb_info.phone, FB_CLEAR); |
if (consnum == active_console) { |
async_msg_0(fb_info.phone, FB_CLEAR); |
} |
screenbuffer_clear(&cons->scr); |
screenbuffer_clear(&conn->screenbuffer); |
break; |
case CONSOLE_GOTO: |
screenbuffer_goto(&cons->scr, |
IPC_GET_ARG1(call), IPC_GET_ARG2(call)); |
if (cons == active_console) |
screenbuffer_goto(&conn->screenbuffer, |
IPC_GET_ARG2(call), IPC_GET_ARG1(call)); |
if (consnum == active_console) |
curs_goto(IPC_GET_ARG1(call), |
IPC_GET_ARG2(call)); |
break; |
case CONSOLE_GET_SIZE: |
arg1 = fb_info.cols; |
arg2 = fb_info.rows; |
case CONSOLE_GETSIZE: |
arg1 = fb_info.rows; |
arg2 = fb_info.cols; |
break; |
case CONSOLE_GET_COLOR_CAP: |
rc = ccap_fb_to_con(fb_info.color_cap, &cons_ccap); |
if (rc != EOK) { |
ipc_answer_0(callid, rc); |
continue; |
} |
arg1 = cons_ccap; |
case CONSOLE_FLUSH: |
if (consnum == active_console) |
async_req_0_0(fb_info.phone, FB_FLUSH); |
break; |
case CONSOLE_SET_STYLE: |
fb_pending_flush(); |
arg1 = IPC_GET_ARG1(call); |
screenbuffer_set_style(&cons->scr, arg1); |
if (cons == active_console) |
set_style(arg1); |
break; |
case CONSOLE_SET_COLOR: |
fb_pending_flush(); |
arg1 = IPC_GET_ARG1(call); |
arg2 = IPC_GET_ARG2(call); |
arg3 = IPC_GET_ARG3(call); |
screenbuffer_set_color(&cons->scr, arg1, arg2, arg3); |
if (cons == active_console) |
set_color(arg1, arg2, arg3); |
screenbuffer_set_style(&conn->screenbuffer, arg1, |
arg2); |
if (consnum == active_console) |
set_style_col(arg1, arg2); |
break; |
case CONSOLE_SET_RGB_COLOR: |
fb_pending_flush(); |
arg1 = IPC_GET_ARG1(call); |
arg2 = IPC_GET_ARG2(call); |
screenbuffer_set_rgb_color(&cons->scr, arg1, arg2); |
if (cons == active_console) |
set_rgb_color(arg1, arg2); |
break; |
case CONSOLE_CURSOR_VISIBILITY: |
fb_pending_flush(); |
arg1 = IPC_GET_ARG1(call); |
cons->scr.is_cursor_visible = arg1; |
if (cons == active_console) |
conn->screenbuffer.is_cursor_visible = arg1; |
if (consnum == active_console) |
curs_visibility(arg1); |
break; |
case CONSOLE_GET_EVENT: |
async_serialize_end(); |
cons_get_event(cons, callid, &call); |
async_serialize_start(); |
continue; |
case CONSOLE_KCON_ENABLE: |
change_console(kernel_console); |
case CONSOLE_GETCHAR: |
if (keybuffer_empty(&conn->keybuffer)) { |
/* buffer is empty -> store request */ |
if (conn->keyrequest_counter < |
MAX_KEYREQUESTS_BUFFERED) { |
fifo_push(conn->keyrequests, callid); |
conn->keyrequest_counter++; |
} else { |
/* |
* No key available and too many |
* requests => fail. |
*/ |
ipc_answer_0(callid, ELIMIT); |
} |
continue; |
} |
keybuffer_pop(&conn->keybuffer, (int *) &arg1); |
break; |
} |
ipc_answer_3(callid, EOK, arg1, arg2, arg3); |
ipc_answer_2(callid, EOK, arg1, arg2); |
} |
} |
static void interrupt_received(ipc_callid_t callid, ipc_call_t *call) |
int main(int argc, char *argv[]) |
{ |
change_console(prev_console); |
} |
printf(NAME ": HelenOS Console service\n"); |
ipcarg_t phonehash; |
int kbd_phone; |
int i; |
static bool console_init(void) |
{ |
ipcarg_t color_cap; |
async_set_client_connection(client_connection); |
/* Connect to keyboard driver */ |
/* Connect to keyboard driver */ |
kbd_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_KEYBOARD, 0, 0); |
if (kbd_phone < 0) { |
printf(NAME ": Failed to connect to keyboard service\n"); |
return false; |
kbd_phone = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0, 0); |
while (kbd_phone < 0) { |
usleep(10000); |
kbd_phone = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0, 0); |
} |
ipcarg_t phonehash; |
if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) { |
printf(NAME ": Failed to create callback from keyboard service\n"); |
return false; |
} |
if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) |
return -1; |
async_new_connection(phonehash, 0, NULL, keyboard_events); |
async_new_connection(phonehash, 0, NULL, keyboard_events); |
/* Connect to framebuffer driver */ |
fb_info.phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VIDEO, 0, 0); |
if (fb_info.phone < 0) { |
printf(NAME ": Failed to connect to video service\n"); |
return -1; |
} |
/* Register driver */ |
int rc = devmap_driver_register(NAME, client_connection); |
if (rc < 0) { |
printf(NAME ": Unable to register driver (%d)\n", rc); |
return false; |
fb_info.phone = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0, 0); |
while (fb_info.phone < 0) { |
usleep(10000); |
fb_info.phone = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0, 0); |
} |
/* Save old kernel screen */ |
kernel_pixmap = switch_screens(-1); |
/* Initialize gcons */ |
gcons_init(fb_info.phone); |
/* Synchronize, the gcons could put something in queue */ |
/* Synchronize, the gcons can have something in queue */ |
async_req_0_0(fb_info.phone, FB_FLUSH); |
async_req_0_2(fb_info.phone, FB_GET_CSIZE, &fb_info.cols, &fb_info.rows); |
async_req_0_1(fb_info.phone, FB_GET_COLOR_CAP, &color_cap); |
fb_info.color_cap = color_cap; |
/* Enable double buffering */ |
async_msg_2(fb_info.phone, FB_VIEWPORT_DB, (sysarg_t) -1, 1); |
/* Set up shared memory buffer. */ |
size_t ib_size = sizeof(keyfield_t) * fb_info.cols * fb_info.rows; |
interbuffer = as_get_mappable_page(ib_size); |
async_req_0_2(fb_info.phone, FB_GET_CSIZE, &fb_info.rows, |
&fb_info.cols); |
set_style_col(DEFAULT_FOREGROUND, DEFAULT_BACKGROUND); |
clrscr(); |
if (as_area_create(interbuffer, ib_size, AS_AREA_READ | |
AS_AREA_WRITE | AS_AREA_CACHEABLE) != interbuffer) |
interbuffer = NULL; |
/* Init virtual consoles */ |
for (i = 0; i < CONSOLE_COUNT; i++) { |
connections[i].used = 0; |
keybuffer_init(&connections[i].keybuffer); |
connections[i].keyrequests.head = 0; |
connections[i].keyrequests.tail = 0; |
connections[i].keyrequests.items = MAX_KEYREQUESTS_BUFFERED; |
connections[i].keyrequest_counter = 0; |
if (screenbuffer_init(&connections[i].screenbuffer, |
fb_info.cols, fb_info.rows) == NULL) { |
/* FIXME: handle error */ |
return -1; |
} |
} |
connections[KERNEL_CONSOLE].used = 1; |
if (interbuffer) { |
interbuffer = mmap(NULL, |
sizeof(keyfield_t) * fb_info.cols * fb_info.rows, |
PROTO_READ | PROTO_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); |
if (!interbuffer) { |
if (ipc_share_out_start(fb_info.phone, interbuffer, |
AS_AREA_READ) != EOK) { |
as_area_destroy(interbuffer); |
munmap(interbuffer, |
sizeof(keyfield_t) * fb_info.cols * fb_info.rows); |
interbuffer = NULL; |
} |
} |
fb_pending.cnt = 0; |
/* Inititalize consoles */ |
size_t i; |
for (i = 0; i < CONSOLE_COUNT; i++) { |
if (i != KERNEL_CONSOLE) { |
if (screenbuffer_init(&consoles[i].scr, |
fb_info.cols, fb_info.rows) == NULL) { |
printf(NAME ": Unable to allocate screen buffer %u\n", i); |
return false; |
} |
screenbuffer_clear(&consoles[i].scr); |
keybuffer_init(&consoles[i].keybuffer); |
consoles[i].index = i; |
consoles[i].refcount = 0; |
char vc[MAX_DEVICE_NAME]; |
snprintf(vc, MAX_DEVICE_NAME, "vc%u", i); |
if (devmap_device_register(vc, &consoles[i].dev_handle) != EOK) { |
devmap_hangup_phone(DEVMAP_DRIVER); |
printf(NAME ": Unable to register device %s\n", vc); |
return false; |
} |
} |
} |
/* Disable kernel output to the console */ |
__SYSCALL0(SYS_DEBUG_DISABLE_CONSOLE); |
/* Initialize the screen */ |
async_serialize_start(); |
gcons_redraw_console(); |
set_rgb_color(DEFAULT_FOREGROUND, DEFAULT_BACKGROUND); |
screen_clear(); |
curs_goto(0, 0); |
curs_visibility(active_console->scr.is_cursor_visible); |
async_serialize_end(); |
/* Receive kernel notifications */ |
if (event_subscribe(EVENT_KCONSOLE, 0) != EOK) |
printf(NAME ": Error registering kconsole notifications\n"); |
async_set_interrupt_received(interrupt_received); |
return true; |
} |
curs_visibility( |
connections[active_console].screenbuffer.is_cursor_visible); |
int main(int argc, char *argv[]) |
{ |
printf(NAME ": HelenOS Console service\n"); |
if (!console_init()) |
/* Register at NS */ |
if (ipc_connect_to_me(PHONE_NS, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) |
return -1; |
printf(NAME ": Accepting connections\n"); |
// FIXME: avoid connectiong to itself, keep using klog |
// printf(NAME ": Accepting connections\n"); |
async_manager(); |
return 0; |
return 0; |
} |
/** @} |
*/ |
/branches/arm/uspace/srv/console/gcons.c |
---|
27,7 → 27,7 |
*/ |
/** @addtogroup console |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
39,25 → 39,23 |
#include <sys/mman.h> |
#include <string.h> |
#include <align.h> |
#include <bool.h> |
#include "console.h" |
#include "gcons.h" |
#define CONSOLE_TOP 66 |
#define CONSOLE_MARGIN 6 |
#define CONSOLE_TOP 66 |
#define CONSOLE_MARGIN 6 |
#define STATUS_START 110 |
#define STATUS_TOP 8 |
#define STATUS_SPACE 4 |
#define STATUS_WIDTH 48 |
#define STATUS_HEIGHT 48 |
#define STATUS_START 110 |
#define STATUS_TOP 8 |
#define STATUS_SPACE 4 |
#define STATUS_WIDTH 48 |
#define STATUS_HEIGHT 48 |
#define MAIN_COLOR 0xffffff |
#define MAIN_COLOR 0xffffff |
static bool use_gcons = false; |
static ipcarg_t xres; |
static ipcarg_t yres; |
static int use_gcons = 0; |
static ipcarg_t xres,yres; |
enum butstate { |
CONS_DISCONNECTED = 0, |
79,22 → 77,16 |
static int ic_pixmaps[CONS_LAST] = {-1, -1, -1, -1, -1, -1}; |
static int animation = -1; |
static size_t active_console = 0; |
static int active_console = 0; |
size_t mouse_x; |
size_t mouse_y; |
bool btn_pressed; |
size_t btn_x; |
size_t btn_y; |
static void vp_switch(int vp) |
{ |
async_msg_1(fbphone, FB_VIEWPORT_SWITCH, vp); |
async_msg_1(fbphone,FB_VIEWPORT_SWITCH, vp); |
} |
/** Create view port */ |
static int vp_create(size_t x, size_t y, size_t width, size_t height) |
static int vp_create(unsigned int x, unsigned int y, unsigned int width, |
unsigned int height) |
{ |
return async_req_2_0(fbphone, FB_VIEWPORT_CREATE, (x << 16) | y, |
(width << 16) | height); |
105,52 → 97,48 |
async_msg_0(fbphone, FB_CLEAR); |
} |
static void set_rgb_color(uint32_t fgcolor, uint32_t bgcolor) |
static void set_style(int fgcolor, int bgcolor) |
{ |
async_msg_2(fbphone, FB_SET_RGB_COLOR, fgcolor, bgcolor); |
async_msg_2(fbphone, FB_SET_STYLE, fgcolor, bgcolor); |
} |
/** Transparent putchar */ |
static void tran_putch(wchar_t ch, size_t col, size_t row) |
static void tran_putch(char c, int row, int col) |
{ |
async_msg_3(fbphone, FB_PUTCHAR, ch, col, row); |
async_msg_3(fbphone, FB_TRANS_PUTCHAR, c, row, col); |
} |
/** Redraw the button showing state of a given console */ |
static void redraw_state(size_t index) |
static void redraw_state(int consnum) |
{ |
vp_switch(cstatus_vp[index]); |
enum butstate state = console_state[index]; |
char data[5]; |
int i; |
enum butstate state = console_state[consnum]; |
vp_switch(cstatus_vp[consnum]); |
if (ic_pixmaps[state] != -1) |
async_msg_2(fbphone, FB_VP_DRAW_PIXMAP, cstatus_vp[index], |
async_msg_2(fbphone, FB_VP_DRAW_PIXMAP, cstatus_vp[consnum], |
ic_pixmaps[state]); |
if ((state != CONS_DISCONNECTED) && (state != CONS_KERNEL) |
&& (state != CONS_DISCONNECTED_SEL)) { |
char data[5]; |
snprintf(data, 5, "%u", index + 1); |
size_t i; |
for (i = 0; data[i] != 0; i++) |
tran_putch(data[i], 2 + i, 1); |
} |
if (state != CONS_DISCONNECTED && state != CONS_KERNEL && |
state != CONS_DISCONNECTED_SEL) { |
snprintf(data, 5, "%d", consnum + 1); |
for (i = 0; data[i]; i++) |
tran_putch(data[i], 1, 2 + i); |
} |
} |
/** Notification run on changing console (except kernel console) */ |
void gcons_change_console(size_t index) |
void gcons_change_console(int consnum) |
{ |
int i; |
if (!use_gcons) |
return; |
if (active_console == KERNEL_CONSOLE) { |
size_t i; |
for (i = 0; i < CONSOLE_COUNT; i++) |
redraw_state(i); |
if (animation != -1) |
async_msg_1(fbphone, FB_ANIM_START, animation); |
} else { |
158,74 → 146,71 |
console_state[active_console] = CONS_DISCONNECTED; |
else |
console_state[active_console] = CONS_IDLE; |
redraw_state(active_console); |
} |
active_console = index; |
if ((console_state[index] == CONS_DISCONNECTED) |
|| (console_state[index] == CONS_DISCONNECTED_SEL)) |
console_state[index] = CONS_DISCONNECTED_SEL; |
else |
console_state[index] = CONS_SELECTED; |
redraw_state(index); |
active_console = consnum; |
if (console_state[consnum] == CONS_DISCONNECTED) { |
console_state[consnum] = CONS_DISCONNECTED_SEL; |
redraw_state(consnum); |
} else |
console_state[consnum] = CONS_SELECTED; |
redraw_state(consnum); |
vp_switch(console_vp); |
} |
/** Notification function that gets called on new output to virtual console */ |
void gcons_notify_char(size_t index) |
void gcons_notify_char(int consnum) |
{ |
if (!use_gcons) |
return; |
if ((index == active_console) |
|| (console_state[index] == CONS_HAS_DATA)) |
if (consnum == active_console || |
console_state[consnum] == CONS_HAS_DATA) |
return; |
console_state[index] = CONS_HAS_DATA; |
console_state[consnum] = CONS_HAS_DATA; |
if (active_console == KERNEL_CONSOLE) |
return; |
redraw_state(consnum); |
redraw_state(index); |
vp_switch(console_vp); |
} |
/** Notification function called on service disconnect from console */ |
void gcons_notify_disconnect(size_t index) |
void gcons_notify_disconnect(int consnum) |
{ |
if (!use_gcons) |
return; |
if (index == active_console) |
console_state[index] = CONS_DISCONNECTED_SEL; |
if (active_console == consnum) |
console_state[consnum] = CONS_DISCONNECTED_SEL; |
else |
console_state[index] = CONS_DISCONNECTED; |
console_state[consnum] = CONS_DISCONNECTED; |
if (active_console == KERNEL_CONSOLE) |
return; |
redraw_state(index); |
redraw_state(consnum); |
vp_switch(console_vp); |
} |
/** Notification function called on console connect */ |
void gcons_notify_connect(size_t index) |
void gcons_notify_connect(int consnum) |
{ |
if (!use_gcons) |
return; |
if (index == active_console) |
console_state[index] = CONS_SELECTED; |
if (active_console == consnum) |
console_state[consnum] = CONS_SELECTED; |
else |
console_state[index] = CONS_IDLE; |
console_state[consnum] = CONS_IDLE; |
if (active_console == KERNEL_CONSOLE) |
return; |
redraw_state(index); |
redraw_state(consnum); |
vp_switch(console_vp); |
} |
232,43 → 217,50 |
/** Change to kernel console */ |
void gcons_in_kernel(void) |
{ |
if (console_state[active_console] == CONS_DISCONNECTED_SEL) |
console_state[active_console] = CONS_DISCONNECTED; |
else |
console_state[active_console] = CONS_IDLE; |
redraw_state(active_console); |
if (animation != -1) |
async_msg_1(fbphone, FB_ANIM_STOP, animation); |
active_console = KERNEL_CONSOLE; |
active_console = KERNEL_CONSOLE; /* Set to kernel console */ |
vp_switch(0); |
} |
/** Return x, where left <= x <= right && |a-x| == min(|a-x|) is smallest */ |
static inline int limit(size_t a, size_t left, size_t right) |
/** Return x, where left <= x <= right && |a-x|==min(|a-x|) is smallest */ |
static inline int limit(int a,int left, int right) |
{ |
if (a < left) |
a = left; |
if (a >= right) |
a = right - 1; |
return a; |
} |
int mouse_x, mouse_y; |
int btn_pressed, btn_x, btn_y; |
/** Handle mouse move |
* |
* @param dx Delta X of mouse move |
* @param dy Delta Y of mouse move |
*/ |
void gcons_mouse_move(ssize_t dx, ssize_t dy) |
void gcons_mouse_move(int dx, int dy) |
{ |
mouse_x = limit(mouse_x + dx, 0, xres); |
mouse_y = limit(mouse_y + dy, 0, yres); |
mouse_x = limit(mouse_x+dx, 0, xres); |
mouse_y = limit(mouse_y+dy, 0, yres); |
async_msg_2(fbphone, FB_POINTER_MOVE, mouse_x, mouse_y); |
} |
static int gcons_find_conbut(int x, int y) |
{ |
int status_start = STATUS_START + (xres - 800) / 2; |
if ((y < STATUS_TOP) || (y >= STATUS_TOP + STATUS_HEIGHT)) |
int status_start = STATUS_START + (xres - 800) / 2;; |
if (y < STATUS_TOP || y >= STATUS_TOP + STATUS_HEIGHT) |
return -1; |
if (x < status_start) |
276,39 → 268,36 |
if (x >= status_start + (STATUS_WIDTH + STATUS_SPACE) * CONSOLE_COUNT) |
return -1; |
if (((x - status_start) % (STATUS_WIDTH + STATUS_SPACE)) < STATUS_SPACE) |
if (((x - status_start) % (STATUS_WIDTH+STATUS_SPACE)) < STATUS_SPACE) |
return -1; |
return (x - status_start) / (STATUS_WIDTH + STATUS_SPACE); |
return (x - status_start) / (STATUS_WIDTH+STATUS_SPACE); |
} |
/** Handle mouse click |
* |
* @param state New state (true - pressed, false - depressed) |
* @param state New state (1-pressed, 0-depressed) |
*/ |
int gcons_mouse_btn(bool state) |
int gcons_mouse_btn(int state) |
{ |
int conbut; |
if (state) { |
conbut = gcons_find_conbut(mouse_x, mouse_y); |
if (conbut != -1) { |
btn_pressed = true; |
btn_pressed = 1; |
btn_x = mouse_x; |
btn_y = mouse_y; |
} |
return -1; |
} |
if ((!state) && (!btn_pressed)) |
} |
if (!state && !btn_pressed) |
return -1; |
btn_pressed = false; |
btn_pressed = 0; |
conbut = gcons_find_conbut(mouse_x, mouse_y); |
if (conbut == gcons_find_conbut(btn_x, btn_y)) |
return conbut; |
return -1; |
} |
324,60 → 313,53 |
{ |
char *shm; |
int rc; |
/* Create area */ |
shm = mmap(NULL, size, PROTO_READ | PROTO_WRITE, MAP_SHARED | |
MAP_ANONYMOUS, 0, 0); |
if (shm == MAP_FAILED) |
return; |
memcpy(shm, logo, size); |
/* Send area */ |
rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (ipcarg_t) shm); |
if (rc) |
goto exit; |
rc = ipc_share_out_start(fbphone, shm, PROTO_READ); |
if (rc) |
goto drop; |
/* Draw logo */ |
async_msg_2(fbphone, FB_DRAW_PPM, x, y); |
drop: |
/* Drop area */ |
async_msg_0(fbphone, FB_DROP_SHM); |
exit: |
exit: |
/* Remove area */ |
munmap(shm, size); |
} |
extern char _binary_gfx_helenos_ppm_start[0]; |
extern int _binary_gfx_helenos_ppm_size; |
extern char _binary_gfx_nameic_ppm_start[0]; |
extern int _binary_gfx_nameic_ppm_size; |
/** Redraws console graphics */ |
void gcons_redraw_console(void) |
extern char _binary_helenos_ppm_start[0]; |
extern int _binary_helenos_ppm_size; |
extern char _binary_nameic_ppm_start[0]; |
extern int _binary_nameic_ppm_size; |
/** Redraws console graphics */ |
static void gcons_redraw_console(void) |
{ |
int i; |
if (!use_gcons) |
return; |
vp_switch(0); |
set_rgb_color(MAIN_COLOR, MAIN_COLOR); |
set_style(MAIN_COLOR, MAIN_COLOR); |
clear(); |
draw_pixmap(_binary_gfx_helenos_ppm_start, |
(size_t) &_binary_gfx_helenos_ppm_size, xres - 66, 2); |
draw_pixmap(_binary_gfx_nameic_ppm_start, |
(size_t) &_binary_gfx_nameic_ppm_size, 5, 17); |
draw_pixmap(_binary_helenos_ppm_start, |
(size_t) &_binary_helenos_ppm_size, xres - 66, 2); |
draw_pixmap(_binary_nameic_ppm_start, |
(size_t) &_binary_nameic_ppm_size, 5, 17); |
for (i = 0; i < CONSOLE_COUNT; i++) |
redraw_state(i); |
vp_switch(console_vp); |
} |
385,159 → 367,152 |
* |
* @param data PPM data |
* @param size PPM data size |
* |
* @return Pixmap identification |
* |
*/ |
static int make_pixmap(char *data, size_t size) |
static int make_pixmap(char *data, int size) |
{ |
char *shm; |
int rc; |
int pxid = -1; |
/* Create area */ |
shm = mmap(NULL, size, PROTO_READ | PROTO_WRITE, MAP_SHARED | |
MAP_ANONYMOUS, 0, 0); |
if (shm == MAP_FAILED) |
return -1; |
memcpy(shm, data, size); |
/* Send area */ |
rc = async_req_1_0(fbphone, FB_PREPARE_SHM, (ipcarg_t) shm); |
if (rc) |
goto exit; |
rc = ipc_share_out_start(fbphone, shm, PROTO_READ); |
if (rc) |
goto drop; |
/* Obtain pixmap */ |
rc = async_req_0_0(fbphone, FB_SHM2PIXMAP); |
if (rc < 0) |
goto drop; |
pxid = rc; |
drop: |
/* Drop area */ |
async_msg_0(fbphone, FB_DROP_SHM); |
exit: |
exit: |
/* Remove area */ |
munmap(shm, size); |
return pxid; |
} |
extern char _binary_gfx_anim_1_ppm_start[0]; |
extern int _binary_gfx_anim_1_ppm_size; |
extern char _binary_gfx_anim_2_ppm_start[0]; |
extern int _binary_gfx_anim_2_ppm_size; |
extern char _binary_gfx_anim_3_ppm_start[0]; |
extern int _binary_gfx_anim_3_ppm_size; |
extern char _binary_gfx_anim_4_ppm_start[0]; |
extern int _binary_gfx_anim_4_ppm_size; |
extern char _binary_anim_1_ppm_start[0]; |
extern int _binary_anim_1_ppm_size; |
extern char _binary_anim_2_ppm_start[0]; |
extern int _binary_anim_2_ppm_size; |
extern char _binary_anim_3_ppm_start[0]; |
extern int _binary_anim_3_ppm_size; |
extern char _binary_anim_4_ppm_start[0]; |
extern int _binary_anim_4_ppm_size; |
static void make_anim(void) |
{ |
int an = async_req_1_0(fbphone, FB_ANIM_CREATE, cstatus_vp[KERNEL_CONSOLE]); |
int an; |
int pm; |
an = async_req_1_0(fbphone, FB_ANIM_CREATE, cstatus_vp[KERNEL_CONSOLE]); |
if (an < 0) |
return; |
int pm = make_pixmap(_binary_gfx_anim_1_ppm_start, |
(int) &_binary_gfx_anim_1_ppm_size); |
pm = make_pixmap(_binary_anim_1_ppm_start, |
(int) &_binary_anim_1_ppm_size); |
async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); |
pm = make_pixmap(_binary_gfx_anim_2_ppm_start, |
(int) &_binary_gfx_anim_2_ppm_size); |
pm = make_pixmap(_binary_anim_2_ppm_start, |
(int) &_binary_anim_2_ppm_size); |
async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); |
pm = make_pixmap(_binary_gfx_anim_3_ppm_start, |
(int) &_binary_gfx_anim_3_ppm_size); |
pm = make_pixmap(_binary_anim_3_ppm_start, |
(int) &_binary_anim_3_ppm_size); |
async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); |
pm = make_pixmap(_binary_gfx_anim_4_ppm_start, |
(int) &_binary_gfx_anim_4_ppm_size); |
pm = make_pixmap(_binary_anim_4_ppm_start, |
(int) &_binary_anim_4_ppm_size); |
async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm); |
async_msg_1(fbphone, FB_ANIM_START, an); |
animation = an; |
} |
extern char _binary_gfx_cons_selected_ppm_start[0]; |
extern int _binary_gfx_cons_selected_ppm_size; |
extern char _binary_gfx_cons_idle_ppm_start[0]; |
extern int _binary_gfx_cons_idle_ppm_size; |
extern char _binary_gfx_cons_has_data_ppm_start[0]; |
extern int _binary_gfx_cons_has_data_ppm_size; |
extern char _binary_gfx_cons_kernel_ppm_start[0]; |
extern int _binary_gfx_cons_kernel_ppm_size; |
extern char _binary_cons_selected_ppm_start[0]; |
extern int _binary_cons_selected_ppm_size; |
extern char _binary_cons_idle_ppm_start[0]; |
extern int _binary_cons_idle_ppm_size; |
extern char _binary_cons_has_data_ppm_start[0]; |
extern int _binary_cons_has_data_ppm_size; |
extern char _binary_cons_kernel_ppm_start[0]; |
extern int _binary_cons_kernel_ppm_size; |
/** Initialize nice graphical console environment */ |
void gcons_init(int phone) |
{ |
int rc; |
int i; |
int status_start = STATUS_START; |
fbphone = phone; |
int rc = async_req_0_2(phone, FB_GET_RESOLUTION, &xres, &yres); |
rc = async_req_0_2(phone, FB_GET_RESOLUTION, &xres, &yres); |
if (rc) |
return; |
if ((xres < 800) || (yres < 600)) |
if (xres < 800 || yres < 600) |
return; |
/* Create console viewport */ |
/* create console viewport */ |
/* Align width & height to character size */ |
console_vp = vp_create(CONSOLE_MARGIN, CONSOLE_TOP, |
ALIGN_DOWN(xres - 2 * CONSOLE_MARGIN, 8), |
ALIGN_DOWN(yres - (CONSOLE_TOP + CONSOLE_MARGIN), 16)); |
if (console_vp < 0) |
return; |
/* Create status buttons */ |
size_t status_start = STATUS_START + (xres - 800) / 2; |
size_t i; |
status_start += (xres - 800) / 2; |
for (i = 0; i < CONSOLE_COUNT; i++) { |
cstatus_vp[i] = vp_create(status_start + CONSOLE_MARGIN + |
i * (STATUS_WIDTH + STATUS_SPACE), STATUS_TOP, |
STATUS_WIDTH, STATUS_HEIGHT); |
if (cstatus_vp[i] < 0) |
return; |
vp_switch(cstatus_vp[i]); |
set_rgb_color(0x202020, 0xffffff); |
set_style(0x202020, 0xffffff); |
} |
/* Initialize icons */ |
ic_pixmaps[CONS_SELECTED] = |
make_pixmap(_binary_gfx_cons_selected_ppm_start, |
(size_t) &_binary_gfx_cons_selected_ppm_size); |
ic_pixmaps[CONS_IDLE] = |
make_pixmap(_binary_gfx_cons_idle_ppm_start, |
(size_t) &_binary_gfx_cons_idle_ppm_size); |
make_pixmap(_binary_cons_selected_ppm_start, |
(int) &_binary_cons_selected_ppm_size); |
ic_pixmaps[CONS_IDLE] = make_pixmap(_binary_cons_idle_ppm_start, |
(int) &_binary_cons_idle_ppm_size); |
ic_pixmaps[CONS_HAS_DATA] = |
make_pixmap(_binary_gfx_cons_has_data_ppm_start, |
(size_t) &_binary_gfx_cons_has_data_ppm_size); |
make_pixmap(_binary_cons_has_data_ppm_start, |
(int) &_binary_cons_has_data_ppm_size); |
ic_pixmaps[CONS_DISCONNECTED] = |
make_pixmap(_binary_gfx_cons_idle_ppm_start, |
(size_t) &_binary_gfx_cons_idle_ppm_size); |
ic_pixmaps[CONS_KERNEL] = |
make_pixmap(_binary_gfx_cons_kernel_ppm_start, |
(size_t) &_binary_gfx_cons_kernel_ppm_size); |
make_pixmap(_binary_cons_idle_ppm_start, |
(int) &_binary_cons_idle_ppm_size); |
ic_pixmaps[CONS_KERNEL] = make_pixmap(_binary_cons_kernel_ppm_start, |
(int) &_binary_cons_kernel_ppm_size); |
ic_pixmaps[CONS_DISCONNECTED_SEL] = ic_pixmaps[CONS_SELECTED]; |
make_anim(); |
use_gcons = true; |
use_gcons = 1; |
console_state[0] = CONS_DISCONNECTED_SEL; |
console_state[KERNEL_CONSOLE] = CONS_KERNEL; |
vp_switch(console_vp); |
gcons_redraw_console(); |
} |
/** @} |
*/ |
/branches/arm/uspace/srv/console/console.h |
---|
27,7 → 27,7 |
*/ |
/** @addtogroup console |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
35,10 → 35,20 |
#ifndef __CONSOLE_H__ |
#define __CONSOLE_H__ |
#define CONSOLE_COUNT 12 |
#define KERNEL_CONSOLE 11 |
#define KERNEL_CONSOLE 11 |
#define CONSOLE_COUNT 12 |
#define CONSOLE_GETCHAR 1026 |
#define CONSOLE_PUTCHAR 1027 |
#define CONSOLE_CLEAR 1028 |
#define CONSOLE_GOTO 1029 |
#define CONSOLE_GETSIZE 1030 |
#define CONSOLE_FLUSH 1031 |
#define CONSOLE_SET_STYLE 1032 |
#define CONSOLE_CURSOR_VISIBILITY 1033 |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/console/screenbuffer.c |
---|
27,55 → 27,48 |
*/ |
/** @addtogroup console |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
#include <screenbuffer.h> |
#include <io/style.h> |
#include <malloc.h> |
#include <unistd.h> |
/** Store one character to screenbuffer. |
/** Store one character to screenbuffer. Its position is determined by |
* scr->position_x and scr->position_y. |
* |
* Its position is determined by scr->position_x |
* and scr->position_y. |
* |
* @param scr Screenbuffer |
* @param c Stored character |
* |
* @param scr screenbuffer |
* @param c stored character |
*/ |
void screenbuffer_putchar(screenbuffer_t *scr, wchar_t ch) |
void screenbuffer_putchar(screenbuffer_t *scr, char c) |
{ |
keyfield_t *field = |
get_field_at(scr, scr->position_x, scr->position_y); |
keyfield_t *field; |
field->character = ch; |
field->attrs = scr->attrs; |
field = get_field_at(scr, scr->position_x, scr->position_y); |
field->character = c; |
field->style = scr->style; |
} |
/** Initilize screenbuffer. |
* |
* Allocate space for screen content in accordance to given size. |
* |
* @param scr Initialized screenbuffer |
* @param size_x Width in characters |
* @param size_y Height in characters |
* |
* @return Pointer to screenbuffer (same as scr parameter) or NULL |
* |
/** Initilize screenbuffer. Allocate space for screen content in accordance to given size. |
* @param scr initialized screenbuffer |
* @param size_x width in characters |
* @param size_y height in characters |
* @return pointer to screenbuffer (same as scr parameter) or NULL |
*/ |
screenbuffer_t *screenbuffer_init(screenbuffer_t *scr, size_t size_x, size_t size_y) |
screenbuffer_t *screenbuffer_init(screenbuffer_t *scr, int size_x, int size_y) |
{ |
scr->buffer = (keyfield_t *) malloc(sizeof(keyfield_t) * size_x * size_y); |
if (!scr->buffer) |
if (!scr->buffer) { |
return NULL; |
} |
scr->size_x = size_x; |
scr->size_y = size_y; |
scr->attrs.t = at_style; |
scr->attrs.a.s.style = STYLE_NORMAL; |
scr->style.fg_color = DEFAULT_FOREGROUND; |
scr->style.bg_color = DEFAULT_BACKGROUND; |
scr->is_cursor_visible = 1; |
screenbuffer_clear(scr); |
83,63 → 76,56 |
return scr; |
} |
/** Clear screenbuffer. |
* |
* @param scr Screenbuffer |
* |
/** Clear screenbuffer. |
* @param scr screenbuffer |
*/ |
void screenbuffer_clear(screenbuffer_t *scr) |
{ |
size_t i; |
unsigned int i; |
for (i = 0; i < (scr->size_x * scr->size_y); i++) { |
scr->buffer[i].character = ' '; |
scr->buffer[i].attrs = scr->attrs; |
scr->buffer[i].style = scr->style; |
} |
scr->top_line = 0; |
scr->position_y = 0; |
scr->position_x = 0; |
scr->position_y = 0; |
} |
/** Clear one buffer line. |
* |
* @param scr |
* @param line One buffer line (not a screen line!) |
* |
*/ |
void screenbuffer_clear_line(screenbuffer_t *scr, size_t line) |
void screenbuffer_clear_line(screenbuffer_t *scr, unsigned int line) |
{ |
size_t x; |
unsigned int i; |
for (x = 0; x < scr->size_x; x++) { |
scr->buffer[x + line * scr->size_x].character = ' '; |
scr->buffer[x + line * scr->size_x].attrs = scr->attrs; |
for (i = 0; i < scr->size_x; i++) { |
scr->buffer[i + line * scr->size_x].character = ' '; |
scr->buffer[i + line * scr->size_x].style = scr->style; |
} |
} |
/** Copy content buffer from screenbuffer to given memory. |
* |
* @param scr Source screenbuffer |
* @param dest Destination |
* |
* @param scr source screenbuffer |
* @param dest destination |
*/ |
void screenbuffer_copy_buffer(screenbuffer_t *scr, keyfield_t *dest) |
void screenbuffer_copy_buffer(screenbuffer_t *scr, keyfield_t *dest) |
{ |
size_t i; |
unsigned int i; |
for (i = 0; i < (scr->size_x * scr->size_y); i++) |
for (i = 0; i < scr->size_x * scr->size_y; i++) { |
dest[i] = scr->buffer[i]; |
} |
} |
/** Set new cursor position in screenbuffer. |
* |
* @param scr |
* @param x |
* @param y |
* |
*/ |
void screenbuffer_goto(screenbuffer_t *scr, size_t x, size_t y) |
void screenbuffer_goto(screenbuffer_t *scr, unsigned int x, unsigned int y) |
{ |
scr->position_x = x % scr->size_x; |
scr->position_y = y % scr->size_y; |
146,46 → 132,16 |
} |
/** Set new style. |
* |
* @param scr |
* @param fg_color |
* @param bg_color |
* |
*/ |
void screenbuffer_set_style(screenbuffer_t *scr, uint8_t style) |
void screenbuffer_set_style(screenbuffer_t *scr, unsigned int fg_color, unsigned int bg_color) |
{ |
scr->attrs.t = at_style; |
scr->attrs.a.s.style = style; |
scr->style.fg_color = fg_color; |
scr->style.bg_color = bg_color; |
} |
/** Set new color. |
* |
* @param scr |
* @param fg_color |
* @param bg_color |
* |
*/ |
void screenbuffer_set_color(screenbuffer_t *scr, uint8_t fg_color, uint8_t bg_color, uint8_t flags) |
{ |
scr->attrs.t = at_idx; |
scr->attrs.a.i.fg_color = fg_color; |
scr->attrs.a.i.bg_color = bg_color; |
scr->attrs.a.i.flags = flags; |
} |
/** Set new RGB color. |
* |
* @param scr |
* @param fg_color |
* @param bg_color |
* |
*/ |
void screenbuffer_set_rgb_color(screenbuffer_t *scr, uint32_t fg_color, uint32_t bg_color) |
{ |
scr->attrs.t = at_rgb; |
scr->attrs.a.r.fg_color = fg_color; |
scr->attrs.a.r.bg_color = bg_color; |
} |
/** @} |
*/ |
/branches/arm/uspace/srv/console/gcons.h |
---|
27,30 → 27,24 |
*/ |
/** @addtogroup console |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
#ifndef GCONS_H_ |
#define GCONS_H_ |
#ifndef _GCONS_H_ |
#define _GCONS_H_ |
#include <sys/types.h> |
void gcons_init(int phone); |
void gcons_redraw_console(void); |
void gcons_change_console(size_t index); |
void gcons_notify_char(size_t index); |
void gcons_change_console(int consnum); |
void gcons_notify_char(int consnum); |
void gcons_in_kernel(void); |
void gcons_notify_connect(int consnum); |
void gcons_notify_disconnect(int consnum); |
void gcons_mouse_move(int dx, int dy); |
int gcons_mouse_btn(int state); |
void gcons_notify_connect(size_t index); |
void gcons_notify_disconnect(size_t index); |
void gcons_mouse_move(ssize_t dx, ssize_t dy); |
int gcons_mouse_btn(bool state); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/console/screenbuffer.h |
---|
27,133 → 27,74 |
*/ |
/** @addtogroup console |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
#ifndef SCREENBUFFER_H__ |
#define SCREENBUFFER_H__ |
#ifndef __SCREENBUFFER_H__ |
#define __SCREENBUFFER_H__ |
#include <stdint.h> |
#include <sys/types.h> |
#include <bool.h> |
#define DEFAULT_FOREGROUND 0x0 /**< default console foreground color */ |
#define DEFAULT_BACKGROUND 0xf0f0f0 /**< default console background color */ |
#define DEFAULT_FOREGROUND 0x0 /**< default console foreground color */ |
#define DEFAULT_BACKGROUND 0xf0f0f0 /**< default console background color */ |
typedef struct { |
uint8_t style; |
} attr_style_t; |
unsigned int bg_color; /**< background color */ |
unsigned int fg_color; /**< foreground color */ |
} style_t; |
typedef struct { |
uint8_t fg_color; |
uint8_t bg_color; |
uint8_t flags; |
} attr_idx_t; |
typedef struct { |
uint32_t bg_color; /**< background color */ |
uint32_t fg_color; /**< foreground color */ |
} attr_rgb_t; |
typedef struct { |
enum { |
at_style, |
at_idx, |
at_rgb |
} t; |
union { |
attr_style_t s; |
attr_idx_t i; |
attr_rgb_t r; |
} a; |
} attrs_t; |
/** One field on screen. It contain one character and its attributes. */ |
typedef struct { |
wchar_t character; /**< Character itself */ |
attrs_t attrs; /**< Character attributes */ |
char character; /**< Character itself */ |
style_t style; /**< Character`s attributes */ |
} keyfield_t; |
/** Structure for buffering state of one virtual console. |
*/ |
typedef struct { |
keyfield_t *buffer; /**< Screen content - characters and |
their attributes (used as a circular buffer) */ |
size_t size_x; /**< Number of columns */ |
size_t size_y; /**< Number of rows */ |
/** Coordinates of last printed character for determining cursor position */ |
size_t position_x; |
size_t position_y; |
attrs_t attrs; /**< Current attributes. */ |
size_t top_line; /**< Points to buffer[][] line that will |
be printed at screen as the first line */ |
bool is_cursor_visible; /**< Cursor state - default is visible */ |
keyfield_t *buffer; /**< Screen content - characters and its style. Used as cyclyc buffer. */ |
unsigned int size_x, size_y; /**< Number of columns and rows */ |
unsigned int position_x, position_y; /**< Coordinates of last printed character for determining cursor position */ |
style_t style; /**< Current style */ |
unsigned int top_line; /**< Points to buffer[][] line that will be printed at screen as the first line */ |
unsigned char is_cursor_visible; /**< Cursor state - default is visible */ |
} screenbuffer_t; |
/** Returns keyfield for position on screen |
* |
* Screenbuffer->buffer is cyclic buffer so we |
* must couted in index of the topmost line. |
* |
* @param scr Screenbuffer |
* @param x Position on screen |
* @param y Position on screen |
* |
* @return Keyfield structure with character and its attributes on x, y |
* |
/** Returns keyfield for position on screen. Screenbuffer->buffer is cyclic buffer so we must couted in index of the topmost line. |
* @param scr screenbuffer |
* @param x position on screen |
* @param y position on screen |
* @return keyfield structure with character and its attributes on x,y |
*/ |
static inline keyfield_t *get_field_at(screenbuffer_t *scr, size_t x, size_t y) |
static inline keyfield_t *get_field_at(screenbuffer_t *scr, unsigned int x, unsigned int y) |
{ |
return scr->buffer + x + ((y + scr->top_line) % scr->size_y) * scr->size_x; |
} |
/** Compares two sets of attributes. |
* |
* @param s1 First style |
* @param s2 Second style |
* |
* @return Nonzero on equality |
* |
/** Compares two styles. |
* @param s1 first style |
* @param s2 second style |
* @return nonzero on equality |
*/ |
static inline int attrs_same(attrs_t a1, attrs_t a2) |
static inline int style_same(style_t s1, style_t s2) |
{ |
if (a1.t != a2.t) |
return 0; |
switch (a1.t) { |
case at_style: |
return (a1.a.s.style == a2.a.s.style); |
case at_idx: |
return (a1.a.i.fg_color == a2.a.i.fg_color) |
&& (a1.a.i.bg_color == a2.a.i.bg_color) |
&& (a1.a.i.flags == a2.a.i.flags); |
case at_rgb: |
return (a1.a.r.fg_color == a2.a.r.fg_color) |
&& (a1.a.r.bg_color == a2.a.r.bg_color); |
} |
return 0; |
return s1.fg_color == s2.fg_color && s1.bg_color == s2.bg_color; |
} |
void screenbuffer_putchar(screenbuffer_t *scr, wchar_t c); |
screenbuffer_t *screenbuffer_init(screenbuffer_t *scr, size_t size_x, size_t size_y); |
void screenbuffer_putchar(screenbuffer_t *scr, char c); |
screenbuffer_t *screenbuffer_init(screenbuffer_t *scr, int size_x, int size_y); |
void screenbuffer_clear(screenbuffer_t *scr); |
void screenbuffer_clear_line(screenbuffer_t *scr, size_t line); |
void screenbuffer_clear_line(screenbuffer_t *scr, unsigned int line); |
void screenbuffer_copy_buffer(screenbuffer_t *scr, keyfield_t *dest); |
void screenbuffer_goto(screenbuffer_t *scr, size_t x, size_t y); |
void screenbuffer_set_style(screenbuffer_t *scr, uint8_t style); |
void screenbuffer_set_color(screenbuffer_t *scr, uint8_t fg_color, |
uint8_t bg_color, uint8_t attr); |
void screenbuffer_set_rgb_color(screenbuffer_t *scr, uint32_t fg_color, |
uint32_t bg_color); |
void screenbuffer_goto(screenbuffer_t *scr, unsigned int x, unsigned int y); |
void screenbuffer_set_style(screenbuffer_t *scr, unsigned int fg_color, unsigned int bg_color); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/srv/console/cons_kernel.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/anim_1.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/anim_2.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/anim_3.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/anim_4.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/cons_has_data.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/cons_selected.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/cons_idle.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/nameic.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/console/helenos.ppm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/arm/uspace/srv/devmap/Makefile |
---|
31,11 → 31,12 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
LIBS = $(LIBC_PREFIX)/libc.a |
CFLAGS += -I../libipc/include |
LIBS = $(LIBC_PREFIX)/libc.a |
## Sources |
# |
43,7 → 44,7 |
SOURCES = \ |
devmap.c |
CFLAGS += -D$(UARCH) |
CFLAGS += -D$(ARCH) |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
54,18 → 55,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/srv/devmap/devmap.c |
---|
28,9 → 28,9 |
/** |
* @defgroup devmap Device mapper. |
* @brief HelenOS device mapper. |
* @brief HelenOS device mapper. |
* @{ |
*/ |
*/ |
/** @file |
*/ |
41,131 → 41,115 |
#include <stdio.h> |
#include <errno.h> |
#include <bool.h> |
#include <fibril_sync.h> |
#include <futex.h> |
#include <stdlib.h> |
#include <string.h> |
#include <ipc/devmap.h> |
#define NAME "devmap" |
#define NULL_DEVICES 256 |
#define NAME "devmap" |
/** Representation of device driver. |
* |
* Each driver is responsible for a set of devices. |
* |
*/ |
typedef struct { |
/** Pointers to previous and next drivers in linked list */ |
link_t drivers; |
/** Pointer to the linked list of devices controlled by this driver */ |
link_t devices; |
/** Phone asociated with this driver */ |
ipcarg_t phone; |
/** Device driver name */ |
char *name; |
/** Fibril mutex for list of devices owned by this driver */ |
fibril_mutex_t devices_mutex; |
} devmap_driver_t; |
/** Info about registered device |
* |
*/ |
typedef struct { |
/** Pointer to the previous and next device in the list of all devices */ |
link_t devices; |
/** Pointer to the previous and next device in the list of devices |
owned by one driver */ |
link_t driver_devices; |
/** Unique device identifier */ |
dev_handle_t handle; |
/** Device name */ |
char *name; |
/** Device driver handling this device */ |
devmap_driver_t *driver; |
} devmap_device_t; |
LIST_INITIALIZE(devices_list); |
LIST_INITIALIZE(drivers_list); |
/* Locking order: |
* drivers_list_mutex |
* devices_list_mutex |
* (devmap_driver_t *)->devices_mutex |
* create_handle_mutex |
/* order of locking: |
* drivers_list_futex |
* devices_list_futex |
* (devmap_driver_t *)->devices_futex |
* create_handle_futex |
**/ |
static FIBRIL_MUTEX_INITIALIZE(devices_list_mutex); |
static FIBRIL_CONDVAR_INITIALIZE(devices_list_cv); |
static FIBRIL_MUTEX_INITIALIZE(drivers_list_mutex); |
static FIBRIL_MUTEX_INITIALIZE(create_handle_mutex); |
static FIBRIL_MUTEX_INITIALIZE(null_devices_mutex); |
static atomic_t devices_list_futex = FUTEX_INITIALIZER; |
static atomic_t drivers_list_futex = FUTEX_INITIALIZER; |
static atomic_t create_handle_futex = FUTEX_INITIALIZER; |
static dev_handle_t last_handle = 0; |
static devmap_device_t *null_devices[NULL_DEVICES]; |
static dev_handle_t devmap_create_handle(void) |
static int devmap_create_handle(void) |
{ |
static int last_handle = 0; |
int handle; |
/* TODO: allow reusing old handles after their unregistration |
* and implement some version of LRU algorithm, avoid overflow |
*/ |
fibril_mutex_lock(&create_handle_mutex); |
last_handle++; |
fibril_mutex_unlock(&create_handle_mutex); |
return last_handle; |
and implement some version of LRU algorithm */ |
/* FIXME: overflow */ |
futex_down(&create_handle_futex); |
last_handle += 1; |
handle = last_handle; |
futex_up(&create_handle_futex); |
return handle; |
} |
/** Initialize device mapper. |
* |
* |
*/ |
static int devmap_init() |
{ |
/* TODO: */ |
return EOK; |
} |
/** Find device with given name. |
* |
*/ |
static devmap_device_t *devmap_device_find_name(const char *name) |
{ |
link_t *item = devices_list.next; |
link_t *item; |
devmap_device_t *device = NULL; |
item = devices_list.next; |
while (item != &devices_list) { |
device = list_get_instance(item, devmap_device_t, devices); |
if (str_cmp(device->name, name) == 0) |
if (0 == strcmp(device->name, name)) { |
break; |
} |
item = item->next; |
} |
if (item == &devices_list) |
return NULL; |
device = list_get_instance(item, devmap_device_t, devices); |
return device; |
} |
/** Find device with given handle. |
* |
* @todo: use hash table |
* |
*/ |
static devmap_device_t *devmap_device_find_handle(dev_handle_t handle) |
static devmap_device_t *devmap_device_find_handle(int handle) |
{ |
fibril_mutex_lock(&devices_list_mutex); |
link_t *item = (&devices_list)->next; |
link_t *item; |
devmap_device_t *device = NULL; |
futex_down(&devices_list_futex); |
item = (&devices_list)->next; |
while (item != &devices_list) { |
device = list_get_instance(item, devmap_device_t, devices); |
if (device->handle == handle) |
if (device->handle == handle) { |
break; |
} |
item = item->next; |
} |
if (item == &devices_list) { |
fibril_mutex_unlock(&devices_list_mutex); |
futex_up(&devices_list_futex); |
return NULL; |
} |
device = list_get_instance(item, devmap_device_t, devices); |
fibril_mutex_unlock(&devices_list_mutex); |
futex_up(&devices_list_futex); |
return device; |
} |
175,12 → 159,14 |
*/ |
static int devmap_device_unregister_core(devmap_device_t *device) |
{ |
list_remove(&(device->devices)); |
list_remove(&(device->driver_devices)); |
free(device->name); |
free(device->name); |
free(device); |
return EOK; |
} |
190,28 → 176,31 |
*/ |
static void devmap_driver_register(devmap_driver_t **odriver) |
{ |
size_t name_size; |
ipc_callid_t callid; |
ipc_call_t call; |
devmap_driver_t *driver; |
ipc_callid_t iid; |
ipc_call_t icall; |
*odriver = NULL; |
ipc_call_t icall; |
ipc_callid_t iid = async_get_call(&icall); |
iid = async_get_call(&icall); |
if (IPC_GET_METHOD(icall) != DEVMAP_DRIVER_REGISTER) { |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
devmap_driver_t *driver = (devmap_driver_t *) malloc(sizeof(devmap_driver_t)); |
if (driver == NULL) { |
} |
if (NULL == |
(driver = (devmap_driver_t *)malloc(sizeof(devmap_driver_t)))) { |
ipc_answer_0(iid, ENOMEM); |
return; |
} |
/* |
/* |
* Get driver name |
*/ |
ipc_callid_t callid; |
size_t name_size; |
if (!ipc_data_write_receive(&callid, &name_size)) { |
free(driver); |
ipc_answer_0(callid, EREFUSED); |
218,7 → 207,7 |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
if (name_size > DEVMAP_NAME_MAXLEN) { |
free(driver); |
ipc_answer_0(callid, EINVAL); |
225,45 → 214,43 |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
/* |
* Allocate buffer for device name. |
*/ |
driver->name = (char *) malloc(name_size + 1); |
if (driver->name == NULL) { |
if (NULL == (driver->name = (char *)malloc(name_size + 1))) { |
free(driver); |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
} |
/* |
* Send confirmation to sender and get data into buffer. |
*/ |
if (ipc_data_write_finalize(callid, driver->name, name_size) != EOK) { |
if (EOK != ipc_data_write_finalize(callid, driver->name, name_size)) { |
free(driver->name); |
free(driver); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
driver->name[name_size] = 0; |
/* Initialize mutex for list of devices owned by this driver */ |
fibril_mutex_initialize(&driver->devices_mutex); |
/* |
/* Initialize futex for list of devices owned by this driver */ |
futex_initialize(&(driver->devices_futex), 1); |
/* |
* Initialize list of asociated devices |
*/ |
list_initialize(&driver->devices); |
/* |
* Create connection to the driver |
list_initialize(&(driver->devices)); |
/* |
* Create connection to the driver |
*/ |
ipc_call_t call; |
callid = async_get_call(&call); |
if (IPC_GET_METHOD(call) != IPC_M_CONNECT_TO_ME) { |
if (IPC_M_CONNECT_TO_ME != IPC_GET_METHOD(call)) { |
ipc_answer_0(callid, ENOTSUP); |
free(driver->name); |
271,71 → 258,73 |
ipc_answer_0(iid, ENOTSUP); |
return; |
} |
driver->phone = IPC_GET_ARG5(call); |
ipc_answer_0(callid, EOK); |
list_initialize(&(driver->drivers)); |
futex_down(&drivers_list_futex); |
fibril_mutex_lock(&drivers_list_mutex); |
/* TODO: |
* check that no driver with name equal to driver->name is registered |
*/ |
/* |
/* |
* Insert new driver into list of registered drivers |
*/ |
list_append(&(driver->drivers), &drivers_list); |
fibril_mutex_unlock(&drivers_list_mutex); |
futex_up(&drivers_list_futex); |
ipc_answer_0(iid, EOK); |
*odriver = driver; |
} |
/** |
* Unregister device driver, unregister all its devices and free driver |
/** Unregister device driver, unregister all its devices and free driver |
* structure. |
* |
*/ |
static int devmap_driver_unregister(devmap_driver_t *driver) |
{ |
if (driver == NULL) |
devmap_device_t *device; |
if (NULL == driver) |
return EEXISTS; |
fibril_mutex_lock(&drivers_list_mutex); |
futex_down(&drivers_list_futex); |
ipc_hangup(driver->phone); |
if (driver->phone != 0) |
ipc_hangup(driver->phone); |
/* Remove it from list of drivers */ |
/* remove it from list of drivers */ |
list_remove(&(driver->drivers)); |
/* unregister all its devices */ |
/* Unregister all its devices */ |
fibril_mutex_lock(&devices_list_mutex); |
fibril_mutex_lock(&driver->devices_mutex); |
futex_down(&devices_list_futex); |
futex_down(&(driver->devices_futex)); |
while (!list_empty(&(driver->devices))) { |
devmap_device_t *device = list_get_instance(driver->devices.next, |
device = list_get_instance(driver->devices.next, |
devmap_device_t, driver_devices); |
devmap_device_unregister_core(device); |
} |
fibril_mutex_unlock(&driver->devices_mutex); |
fibril_mutex_unlock(&devices_list_mutex); |
fibril_mutex_unlock(&drivers_list_mutex); |
futex_up(&(driver->devices_futex)); |
futex_up(&devices_list_futex); |
futex_up(&drivers_list_futex); |
/* free name and driver */ |
if (driver->name != NULL) |
if (NULL != driver->name) { |
free(driver->name); |
} |
free(driver); |
return EOK; |
} |
/** Register instance of device |
* |
*/ |
342,27 → 331,29 |
static void devmap_device_register(ipc_callid_t iid, ipc_call_t *icall, |
devmap_driver_t *driver) |
{ |
if (driver == NULL) { |
ipc_callid_t callid; |
size_t size; |
devmap_device_t *device; |
if (NULL == driver) { |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
/* Create new device entry */ |
devmap_device_t *device = (devmap_device_t *) malloc(sizeof(devmap_device_t)); |
if (device == NULL) { |
if (NULL == |
(device = (devmap_device_t *) malloc(sizeof(devmap_device_t)))) { |
ipc_answer_0(iid, ENOMEM); |
return; |
} |
/* Get device name */ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_write_receive(&callid, &size)) { |
free(device); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
if (size > DEVMAP_NAME_MAXLEN) { |
free(device); |
ipc_answer_0(callid, EINVAL); |
372,8 → 363,8 |
/* +1 for terminating \0 */ |
device->name = (char *) malloc(size + 1); |
if (device->name == NULL) { |
if (NULL == device->name) { |
free(device); |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(iid, EREFUSED); |
382,39 → 373,38 |
ipc_data_write_finalize(callid, device->name, size); |
device->name[size] = 0; |
list_initialize(&(device->devices)); |
list_initialize(&(device->driver_devices)); |
fibril_mutex_lock(&devices_list_mutex); |
futex_down(&devices_list_futex); |
/* Check that device with such name is not already registered */ |
if (NULL != devmap_device_find_name(device->name)) { |
printf(NAME ": Device '%s' already registered\n", device->name); |
fibril_mutex_unlock(&devices_list_mutex); |
futex_up(&devices_list_futex); |
free(device->name); |
free(device); |
ipc_answer_0(iid, EEXISTS); |
return; |
} |
/* Get unique device handle */ |
device->handle = devmap_create_handle(); |
device->handle = devmap_create_handle(); |
device->driver = driver; |
/* Insert device into list of all devices */ |
list_append(&device->devices, &devices_list); |
/* Insert device into list of devices that belog to one driver */ |
fibril_mutex_lock(&device->driver->devices_mutex); |
futex_down(&device->driver->devices_futex); |
list_append(&device->driver_devices, &device->driver->devices); |
fibril_mutex_unlock(&device->driver->devices_mutex); |
fibril_condvar_broadcast(&devices_list_cv); |
fibril_mutex_unlock(&devices_list_mutex); |
futex_up(&device->driver->devices_futex); |
futex_up(&devices_list_futex); |
ipc_answer_1(iid, EOK, device->handle); |
} |
425,325 → 415,162 |
devmap_driver_t *driver) |
{ |
/* TODO */ |
return EOK; |
} |
/** Connect client to the device. |
* |
* Find device driver owning requested device and forward |
* the message to it. |
* |
*/ |
static void devmap_forward(ipc_callid_t callid, ipc_call_t *call) |
{ |
devmap_device_t *dev; |
int handle; |
/* |
* Get handle from request |
*/ |
dev_handle_t handle = IPC_GET_ARG2(*call); |
devmap_device_t *dev = devmap_device_find_handle(handle); |
if ((dev == NULL) || (dev->driver == NULL) || (dev->driver->phone == 0)) { |
handle = IPC_GET_ARG2(*call); |
dev = devmap_device_find_handle(handle); |
if (NULL == dev) { |
ipc_answer_0(callid, ENOENT); |
return; |
} |
ipc_forward_fast(callid, dev->driver->phone, dev->handle, |
} |
ipc_forward_fast(callid, dev->driver->phone, (ipcarg_t)(dev->handle), |
IPC_GET_ARG3(*call), 0, IPC_FF_NONE); |
} |
/** Find handle for device instance identified by name. |
* |
* In answer will be send EOK and device handle in arg1 or a error |
* code from errno.h. |
* |
* code from errno.h. |
*/ |
static void devmap_get_handle(ipc_callid_t iid, ipc_call_t *icall) |
{ |
/* |
char *name = NULL; |
size_t name_size; |
const devmap_device_t *dev; |
ipc_callid_t callid; |
ipcarg_t retval; |
/* |
* Wait for incoming message with device name (but do not |
* read the name itself until the buffer is allocated). |
*/ |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_write_receive(&callid, &size)) { |
if (!ipc_data_write_receive(&callid, &name_size)) { |
ipc_answer_0(callid, EREFUSED); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
if ((size < 1) || (size > DEVMAP_NAME_MAXLEN)) { |
if (name_size > DEVMAP_NAME_MAXLEN) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
/* |
* Allocate buffer for device name. |
*/ |
char *name = (char *) malloc(size + 1); |
if (name == NULL) { |
if (NULL == (name = (char *)malloc(name_size))) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
} |
/* |
* Send confirmation to sender and get data into buffer. |
*/ |
ipcarg_t retval = ipc_data_write_finalize(callid, name, size); |
if (retval != EOK) { |
if (EOK != (retval = ipc_data_write_finalize(callid, name, |
name_size))) { |
ipc_answer_0(iid, EREFUSED); |
free(name); |
return; |
} |
name[size] = '\0'; |
fibril_mutex_lock(&devices_list_mutex); |
const devmap_device_t *dev; |
recheck: |
/* |
* Find device name in the list of known devices. |
* Find device name in linked list of known devices. |
*/ |
dev = devmap_device_find_name(name); |
/* |
* Device was not found. |
*/ |
if (dev == NULL) { |
if (IPC_GET_ARG1(*icall) & IPC_FLAG_BLOCKING) { |
/* Blocking lookup */ |
fibril_condvar_wait(&devices_list_cv, |
&devices_list_mutex); |
goto recheck; |
} |
if (NULL == dev) { |
ipc_answer_0(iid, ENOENT); |
free(name); |
fibril_mutex_unlock(&devices_list_mutex); |
return; |
} |
fibril_mutex_unlock(&devices_list_mutex); |
ipc_answer_1(iid, EOK, dev->handle); |
free(name); |
} |
/** Find name of device identified by id and send it to caller. |
/** Find name of device identified by id and send it to caller. |
* |
*/ |
static void devmap_get_name(ipc_callid_t iid, ipc_call_t *icall) |
static void devmap_get_name(ipc_callid_t iid, ipc_call_t *icall) |
{ |
const devmap_device_t *device = devmap_device_find_handle(IPC_GET_ARG1(*icall)); |
const devmap_device_t *device; |
size_t name_size; |
device = devmap_device_find_handle(IPC_GET_ARG1(*icall)); |
/* |
* Device not found. |
*/ |
if (device == NULL) { |
if (NULL == device) { |
ipc_answer_0(iid, ENOENT); |
return; |
} |
} |
ipc_answer_0(iid, EOK); |
size_t name_size = str_size(device->name); |
/* FIXME: |
* We have no channel from DEVMAP to client, therefore |
* sending must be initiated by client. |
* |
* int rc = ipc_data_write_send(phone, device->name, name_size); |
* if (rc != EOK) { |
* async_wait_for(req, NULL); |
* return rc; |
* } |
*/ |
/* TODO: send name in response */ |
} |
static void devmap_get_count(ipc_callid_t iid, ipc_call_t *icall) |
{ |
fibril_mutex_lock(&devices_list_mutex); |
ipc_answer_1(iid, EOK, list_count(&devices_list)); |
fibril_mutex_unlock(&devices_list_mutex); |
} |
name_size = strlen(device->name); |
static void devmap_get_devices(ipc_callid_t iid, ipc_call_t *icall) |
{ |
fibril_mutex_lock(&devices_list_mutex); |
ipc_callid_t callid; |
size_t size; |
if (!ipc_data_read_receive(&callid, &size)) { |
ipc_answer_0(callid, EREFUSED); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
if ((size % sizeof(dev_desc_t)) != 0) { |
ipc_answer_0(callid, EINVAL); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
size_t count = size / sizeof(dev_desc_t); |
dev_desc_t *desc = (dev_desc_t *) malloc(size); |
if (desc == NULL) { |
ipc_answer_0(callid, ENOMEM); |
ipc_answer_0(iid, EREFUSED); |
return; |
} |
size_t pos = 0; |
link_t *item = devices_list.next; |
while ((item != &devices_list) && (pos < count)) { |
devmap_device_t *device = list_get_instance(item, devmap_device_t, devices); |
desc[pos].handle = device->handle; |
str_cpy(desc[pos].name, DEVMAP_NAME_MAXLEN, device->name); |
pos++; |
item = item->next; |
} |
ipcarg_t retval = ipc_data_read_finalize(callid, desc, pos * sizeof(dev_desc_t)); |
if (retval != EOK) { |
ipc_answer_0(iid, EREFUSED); |
free(desc); |
return; |
} |
free(desc); |
fibril_mutex_unlock(&devices_list_mutex); |
ipc_answer_1(iid, EOK, pos); |
} |
static void devmap_null_create(ipc_callid_t iid, ipc_call_t *icall) |
{ |
fibril_mutex_lock(&null_devices_mutex); |
unsigned int i; |
bool fnd = false; |
for (i = 0; i < NULL_DEVICES; i++) { |
if (null_devices[i] == NULL) { |
fnd = true; |
break; |
} |
} |
if (!fnd) { |
fibril_mutex_unlock(&null_devices_mutex); |
ipc_answer_0(iid, ENOMEM); |
return; |
} |
/* Create NULL device entry */ |
devmap_device_t *device = (devmap_device_t *) malloc(sizeof(devmap_device_t)); |
if (device == NULL) { |
fibril_mutex_unlock(&null_devices_mutex); |
ipc_answer_0(iid, ENOMEM); |
return; |
} |
char null[DEVMAP_NAME_MAXLEN]; |
snprintf(null, DEVMAP_NAME_MAXLEN, "null%u", i); |
device->name = str_dup(null); |
if (device->name == NULL) { |
fibril_mutex_unlock(&null_devices_mutex); |
free(device); |
ipc_answer_0(iid, ENOMEM); |
return; |
} |
list_initialize(&(device->devices)); |
list_initialize(&(device->driver_devices)); |
fibril_mutex_lock(&devices_list_mutex); |
/* Get unique device handle */ |
device->handle = devmap_create_handle(); |
device->driver = NULL; |
/* Insert device into list of all devices |
and into null devices array */ |
list_append(&device->devices, &devices_list); |
null_devices[i] = device; |
fibril_mutex_unlock(&devices_list_mutex); |
fibril_mutex_unlock(&null_devices_mutex); |
ipc_answer_1(iid, EOK, (ipcarg_t) i); |
} |
/* FIXME: |
we have no channel from DEVMAP to client -> |
sending must be initiated by client |
static void devmap_null_destroy(ipc_callid_t iid, ipc_call_t *icall) |
{ |
fibril_mutex_lock(&null_devices_mutex); |
ipcarg_t i = IPC_GET_ARG1(*icall); |
if (null_devices[i] == NULL) { |
ipc_answer_0(iid, ENOENT); |
return; |
int rc = ipc_data_write_send(phone, device->name, name_size); |
if (rc != EOK) { |
async_wait_for(req, NULL); |
return rc; |
} |
devmap_device_unregister_core(null_devices[i]); |
null_devices[i] = NULL; |
fibril_mutex_unlock(&null_devices_mutex); |
ipc_answer_0(iid, EOK); |
*/ |
/* TODO: send name in response */ |
} |
/** Initialize device mapper. |
* |
* |
*/ |
static bool devmap_init(void) |
{ |
fibril_mutex_lock(&null_devices_mutex); |
unsigned int i; |
for (i = 0; i < NULL_DEVICES; i++) |
null_devices[i] = NULL; |
fibril_mutex_unlock(&null_devices_mutex); |
return true; |
} |
/** Handle connection with device driver. |
* |
*/ |
static void devmap_connection_driver(ipc_callid_t iid, ipc_call_t *icall) |
{ |
/* Accept connection */ |
ipc_answer_0(iid, EOK); |
devmap_driver_t *driver = NULL; |
ipc_callid_t callid; |
ipc_call_t call; |
bool cont = true; |
devmap_driver_t *driver = NULL; |
ipc_answer_0(iid, EOK); |
devmap_driver_register(&driver); |
if (NULL == driver) |
return; |
bool cont = true; |
while (cont) { |
ipc_call_t call; |
ipc_callid_t callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
cont = false; |
continue; |
continue; /* Exit thread */ |
case DEVMAP_DRIVER_UNREGISTER: |
if (NULL == driver) |
if (NULL == driver) { |
ipc_answer_0(callid, ENOENT); |
else |
} else { |
ipc_answer_0(callid, EOK); |
} |
break; |
case DEVMAP_DEVICE_REGISTER: |
/* Register one instance of device */ |
757,21 → 584,23 |
devmap_get_handle(callid, &call); |
break; |
case DEVMAP_DEVICE_GET_NAME: |
devmap_get_name(callid, &call); |
devmap_get_handle(callid, &call); |
break; |
default: |
if (!(callid & IPC_CALLID_NOTIFICATION)) |
if (!(callid & IPC_CALLID_NOTIFICATION)) { |
ipc_answer_0(callid, ENOENT); |
} |
} |
} |
if (driver != NULL) { |
/* |
if (NULL != driver) { |
/* |
* Unregister the device driver and all its devices. |
*/ |
devmap_driver_unregister(driver); |
driver = NULL; |
} |
} |
/** Handle connection with device client. |
779,44 → 608,37 |
*/ |
static void devmap_connection_client(ipc_callid_t iid, ipc_call_t *icall) |
{ |
/* Accept connection */ |
ipc_answer_0(iid, EOK); |
ipc_callid_t callid; |
ipc_call_t call; |
bool cont = true; |
ipc_answer_0(iid, EOK); /* Accept connection */ |
while (cont) { |
ipc_call_t call; |
ipc_callid_t callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
cont = false; |
continue; |
continue; /* Exit thread */ |
case DEVMAP_DEVICE_GET_HANDLE: |
devmap_get_handle(callid, &call); |
devmap_get_handle(callid, &call); |
break; |
case DEVMAP_DEVICE_GET_NAME: |
/* TODO */ |
devmap_get_name(callid, &call); |
break; |
case DEVMAP_DEVICE_NULL_CREATE: |
devmap_null_create(callid, &call); |
break; |
case DEVMAP_DEVICE_NULL_DESTROY: |
devmap_null_destroy(callid, &call); |
break; |
case DEVMAP_DEVICE_GET_COUNT: |
devmap_get_count(callid, &call); |
break; |
case DEVMAP_DEVICE_GET_DEVICES: |
devmap_get_devices(callid, &call); |
break; |
default: |
if (!(callid & IPC_CALLID_NOTIFICATION)) |
if (!(callid & IPC_CALLID_NOTIFICATION)) { |
ipc_answer_0(callid, ENOENT); |
} |
} |
} |
} |
/** Function for handling connections to devmap |
/** Function for handling connections to devmap |
* |
*/ |
static void devmap_connection(ipc_callid_t iid, ipc_call_t *icall) |
834,9 → 656,10 |
devmap_forward(iid, icall); |
break; |
default: |
/* No such interface */ |
ipc_answer_0(iid, ENOENT); |
ipc_answer_0(iid, ENOENT); /* No such interface */ |
} |
/* Cleanup */ |
} |
/** |
846,7 → 669,9 |
{ |
printf(NAME ": HelenOS Device Mapper\n"); |
if (!devmap_init()) { |
ipcarg_t phonead; |
if (devmap_init() != 0) { |
printf(NAME ": Error while initializing service\n"); |
return -1; |
} |
853,15 → 678,13 |
/* Set a handler of incomming connections */ |
async_set_client_connection(devmap_connection); |
/* Register device mapper at naming service */ |
ipcarg_t phonead; |
if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAP, 0, 0, &phonead) != 0) |
return -1; |
printf(NAME ": Accepting connections\n"); |
async_manager(); |
/* Never reached */ |
return 0; |
} |
/branches/arm/uspace/srv/pci/libpci/names.c |
---|
103,7 → 103,7 |
u32 id34 = id_pair(id3, id4); |
unsigned int h = id_hash(cat, id12, id34); |
struct id_entry *n = a->id_hash[h]; |
int len = str_size((char *) text); |
int len = strlen((char *) text); |
while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat)) |
n = n->next; |
/branches/arm/uspace/srv/pci/Makefile |
---|
31,7 → 31,6 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
53,7 → 52,7 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
$(MAKE) -C libpci clean |
depend: |
61,7 → 60,7 |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(MAKE) -C libpci |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: |
$(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
/branches/arm/uspace/app/getvc/getvc.h |
---|
File deleted |
/branches/arm/uspace/app/getvc/version.c |
---|
File deleted |
/branches/arm/uspace/app/getvc/getvc.c |
---|
File deleted |
/branches/arm/uspace/app/getvc/version.h |
---|
File deleted |
/branches/arm/uspace/app/getvc/Makefile |
---|
File deleted |
/branches/arm/uspace/app/trace/trace.c |
---|
35,6 → 35,7 |
#include <stdio.h> |
#include <stdlib.h> |
#include <unistd.h> |
#include <syscall.h> |
#include <ipc/ipc.h> |
#include <fibril.h> |
#include <errno.h> |
41,17 → 42,13 |
#include <udebug.h> |
#include <async.h> |
#include <task.h> |
#include <mem.h> |
#include <string.h> |
#include <loader/loader.h> |
#include <libc.h> |
// Temporary: service and method names |
#include "proto.h" |
#include <ipc/services.h> |
#include "../../srv/vfs/vfs.h" |
#include <ipc/console.h> |
#include "../../srv/console/console.h" |
#include "syscalls.h" |
#include "ipcp.h" |
447,20 → 444,10 |
thread_hash = (uintptr_t)thread_hash_arg; |
thread_id = next_thread_id++; |
printf("Start tracing thread [%d] (hash 0x%lx).\n", thread_id, thread_hash); |
printf("Start tracing thread [%d] (hash 0x%lx)\n", thread_id, thread_hash); |
while (!abort_trace) { |
if (paused) { |
printf("Press R to resume (and be patient).\n"); |
while (paused) { |
usleep(1000000); |
fibril_yield(); |
printf("."); |
} |
printf("Resumed\n"); |
} |
/* Run thread until an event occurs */ |
rc = udebug_go(phoneid, thread_hash, |
&ev_type, &val0, &val1); |
481,16 → 468,23 |
break; |
case UDEBUG_EVENT_STOP: |
printf("Stop event\n"); |
printf("Waiting for resume\n"); |
while (paused) { |
usleep(1000000); |
fibril_yield(); |
printf("."); |
} |
printf("Resumed\n"); |
break; |
case UDEBUG_EVENT_THREAD_B: |
event_thread_b(val0); |
break; |
case UDEBUG_EVENT_THREAD_E: |
printf("Thread 0x%lx exited.\n", val0); |
printf("Thread 0x%lx exited\n", val0); |
abort_trace = 1; |
break; |
default: |
printf("Unknown event type %d.\n", ev_type); |
printf("Unknown event type %d\n", ev_type); |
break; |
} |
} |
497,7 → 491,7 |
} |
printf("Finished tracing thread [%d].\n", thread_id); |
printf("Finished tracing thread [%d]\n", thread_id); |
return 0; |
} |
521,7 → 515,7 |
int rc; |
/* Spawn a program loader */ |
ldr = loader_connect(); |
ldr = loader_spawn(); |
if (ldr == NULL) |
return 0; |
585,7 → 579,6 |
c = getchar(); |
if (c == 'q') break; |
if (c == 'p') { |
printf("Pause...\n"); |
paused = 1; |
rc = udebug_stop(phoneid, thash); |
printf("stop -> %d\n", rc); |
592,7 → 585,6 |
} |
if (c == 'r') { |
paused = 0; |
printf("Resume...\n"); |
} |
} |
625,7 → 617,7 |
V_INTEGER, |
V_INTEGER, |
V_INTEGER, |
V_INTEGER |
V_INTEGER |
}; |
next_thread_id = 1; |
635,36 → 627,26 |
p = proto_new("vfs"); |
o = oper_new("read", 1, arg_def, V_ERRNO, 1, resp_def); |
proto_add_oper(p, VFS_IN_READ, o); |
proto_add_oper(p, VFS_READ, o); |
o = oper_new("write", 1, arg_def, V_ERRNO, 1, resp_def); |
proto_add_oper(p, VFS_IN_WRITE, o); |
proto_add_oper(p, VFS_WRITE, o); |
o = oper_new("truncate", 5, arg_def, V_ERRNO, 0, resp_def); |
proto_add_oper(p, VFS_IN_TRUNCATE, o); |
proto_add_oper(p, VFS_TRUNCATE, o); |
o = oper_new("mount", 2, arg_def, V_ERRNO, 0, resp_def); |
proto_add_oper(p, VFS_IN_MOUNT, o); |
proto_add_oper(p, VFS_MOUNT, o); |
/* o = oper_new("unmount", 0, arg_def); |
proto_add_oper(p, VFS_IN_UNMOUNT, o);*/ |
o = oper_new("open", 2, arg_def, V_INT_ERRNO, 0, resp_def); |
proto_add_oper(p, VFS_IN_OPEN, o); |
o = oper_new("close", 1, arg_def, V_ERRNO, 0, resp_def); |
proto_add_oper(p, VFS_IN_CLOSE, o); |
o = oper_new("seek", 3, arg_def, V_ERRNO, 0, resp_def); |
proto_add_oper(p, VFS_IN_SEEK, o); |
o = oper_new("mkdir", 1, arg_def, V_ERRNO, 0, resp_def); |
proto_add_oper(p, VFS_IN_MKDIR, o); |
o = oper_new("unlink", 0, arg_def, V_ERRNO, 0, resp_def); |
proto_add_oper(p, VFS_IN_UNLINK, o); |
o = oper_new("rename", 0, arg_def, V_ERRNO, 0, resp_def); |
proto_add_oper(p, VFS_IN_RENAME, o); |
proto_add_oper(p, VFS_UNMOUNT, o);*/ |
proto_register(SERVICE_VFS, p); |
p = proto_new("console"); |
resp_def[0] = V_INTEGER; resp_def[1] = V_INTEGER; |
resp_def[2] = V_INTEGER; resp_def[3] = V_CHAR; |
o = oper_new("getkey", 0, arg_def, V_ERRNO, 4, resp_def); |
resp_def[0] = V_CHAR; |
o = oper_new("getchar", 0, arg_def, V_INTEGER, 2, resp_def); |
proto_add_oper(p, CONSOLE_GETCHAR, o); |
arg_def[0] = V_CHAR; |
o = oper_new("putchar", 1, arg_def, V_VOID, 0, resp_def); |
proto_add_oper(p, CONSOLE_PUTCHAR, o); |
o = oper_new("clear", 0, arg_def, V_VOID, 0, resp_def); |
proto_add_oper(p, CONSOLE_CLEAR, o); |
674,17 → 656,13 |
resp_def[0] = V_INTEGER; resp_def[1] = V_INTEGER; |
o = oper_new("getsize", 0, arg_def, V_INTEGER, 2, resp_def); |
proto_add_oper(p, CONSOLE_GET_SIZE, o); |
proto_add_oper(p, CONSOLE_GETSIZE, o); |
o = oper_new("flush", 0, arg_def, V_VOID, 0, resp_def); |
proto_add_oper(p, CONSOLE_FLUSH, o); |
arg_def[0] = V_INTEGER; |
o = oper_new("set_style", 1, arg_def, V_VOID, 0, resp_def); |
arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER; |
o = oper_new("set_style", 2, arg_def, V_INTEGER, 0, resp_def); |
proto_add_oper(p, CONSOLE_SET_STYLE, o); |
arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER; arg_def[2] = V_INTEGER; |
o = oper_new("set_color", 3, arg_def, V_VOID, 0, resp_def); |
proto_add_oper(p, CONSOLE_SET_COLOR, o); |
arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER; |
o = oper_new("set_rgb_color", 2, arg_def, V_VOID, 0, resp_def); |
proto_add_oper(p, CONSOLE_SET_RGB_COLOR, o); |
o = oper_new("cursor_visibility", 1, arg_def, V_VOID, 0, resp_def); |
proto_add_oper(p, CONSOLE_CURSOR_VISIBILITY, o); |
723,7 → 701,7 |
case 'i': dm = dm | DM_IPC; break; |
case 'p': dm = dm | DM_SYSTEM | DM_USER; break; |
default: |
printf("Unexpected event type '%c'.\n", *c); |
printf("Unexpected event type '%c'\n", *c); |
exit(1); |
} |
798,7 → 776,6 |
int rc; |
printf("System Call / IPC Tracer\n"); |
printf("Controls: Q - Quit, P - Pause, R - Resume\n"); |
display_mask = DM_THREAD | DM_SYSTEM | DM_USER; |
809,11 → 786,11 |
rc = connect_task(task_id); |
if (rc < 0) { |
printf("Failed connecting to task %lld.\n", task_id); |
printf("Failed connecting to task %lld\n", task_id); |
return 1; |
} |
printf("Connected to task %lld.\n", task_id); |
printf("Connected to task %lld\n", task_id); |
if (task_ldr != NULL) { |
program_run(); |
/branches/arm/uspace/app/trace/ipcp.c |
---|
34,7 → 34,7 |
#include <stdio.h> |
#include <stdlib.h> |
#include <adt/hash_table.h> |
#include <libadt/hash_table.h> |
#include "ipc_desc.h" |
#include "proto.h" |
/branches/arm/uspace/app/trace/syscalls.c |
---|
59,14 → 59,11 |
[SYS_IPC_ANSWER_FAST] = { "ipc_answer_fast", 6, V_ERRNO }, |
[SYS_IPC_ANSWER_SLOW] = { "ipc_answer_slow", 2, V_ERRNO }, |
[SYS_IPC_FORWARD_FAST] = { "ipc_forward_fast", 6, V_ERRNO }, |
[SYS_IPC_FORWARD_SLOW] = { "ipc_forward_slow", 3, V_ERRNO }, |
[SYS_IPC_WAIT] = { "ipc_wait_for_call", 3, V_HASH }, |
[SYS_IPC_HANGUP] = { "ipc_hangup", 1, V_ERRNO }, |
[SYS_IPC_REGISTER_IRQ] = { "ipc_register_irq", 4, V_ERRNO }, |
[SYS_IPC_UNREGISTER_IRQ] = { "ipc_unregister_irq", 2, V_ERRNO }, |
[SYS_EVENT_SUBSCRIBE] = { "event_subscribe", 2, V_ERRNO }, |
[SYS_CAP_GRANT] = { "cap_grant", 2, V_ERRNO }, |
[SYS_CAP_REVOKE] = { "cap_revoke", 2, V_ERRNO }, |
[SYS_PHYSMEM_MAP] = { "physmem_map", 4, V_ERRNO }, |
/branches/arm/uspace/app/trace/proto.c |
---|
35,7 → 35,7 |
#include <stdio.h> |
#include <stdlib.h> |
#include <ipc/ipc.h> |
#include <adt/hash_table.h> |
#include <libadt/hash_table.h> |
#include "trace.h" |
#include "proto.h" |
/branches/arm/uspace/app/trace/proto.h |
---|
35,7 → 35,7 |
#ifndef PROTO_H_ |
#define PROTO_H_ |
#include <adt/hash_table.h> |
#include <libadt/hash_table.h> |
#include <ipc/ipc.h> |
#include "trace.h" |
/branches/arm/uspace/app/trace/Makefile |
---|
31,7 → 31,6 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -I../../srv/kbd/include |
64,7 → 63,7 |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: |
$(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm |
/branches/arm/uspace/app/bdsh/util.c |
---|
1,4 → 1,7 |
/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com> - All rights reserved |
/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com> |
* Copyright (C) 1998 by Wes Peters <wes@softweyr.com> |
* Copyright (c) 1988, 1993 The Regents of the University of California. |
* All rights reserved by all copyright holders. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are met: |
27,6 → 30,18 |
* POSSIBILITY OF SUCH DAMAGE. |
*/ |
/* NOTES: |
* 1 - Various functions were adapted from FreeBSD (copyright holders noted above) |
* these functions are identified with comments. |
* |
* 2 - Some of these have since appeared in libc. They remain here for various |
* reasons, such as the eventual integration of garbage collection for things |
* that allocate memory and don't automatically free it. |
* |
* 3 - Things that expect a pointer to an allocated string do _no_ sanity checking |
* if developing on a simulator with no debugger, take care :) |
*/ |
#include <stdio.h> |
#include <string.h> |
#include <stdarg.h> |
39,6 → 54,190 |
extern volatile int cli_errno; |
/* some platforms do not have strdup, implement it here. |
* Returns a pointer to an allocated string or NULL on failure */ |
char * cli_strdup(const char *s1) |
{ |
size_t len = strlen(s1) + 1; |
void *ret = malloc(len); |
if (ret == NULL) { |
cli_errno = CL_ENOMEM; |
return (char *) NULL; |
} |
cli_errno = CL_EOK; |
return (char *) memcpy(ret, s1, len); |
} |
/* |
* Take a previously allocated string (s1), re-size it to accept s2 and copy |
* the contents of s2 into s1. |
* Return -1 on failure, or the length of the copied string on success. |
*/ |
int cli_redup(char **s1, const char *s2) |
{ |
size_t len = strlen(s2) + 1; |
if (! len) |
return -1; |
*s1 = realloc(*s1, len); |
if (*s1 == NULL) { |
cli_errno = CL_ENOMEM; |
return -1; |
} |
memset(*s1, 0, sizeof(*s1)); |
memcpy(*s1, s2, len); |
cli_errno = CL_EOK; |
return (int) len; |
} |
/* An asprintf() for formatting paths, similar to asprintf() but ensures |
* the returned allocated string is <= PATH_MAX. On failure, an attempt |
* is made to return the original string (if not null) unmodified. |
* |
* Returns: Length of the new string on success, 0 if the string was handed |
* back unmodified, -1 on failure. On failure, cli_errno is set. |
* |
* We do not use POSIX_PATH_MAX, as it is typically much smaller than the |
* PATH_MAX defined by the kernel. |
* |
* Use this like: |
* if (1 > cli_psprintf(&char, "%s/%s", foo, bar)) { |
* cli_error(cli_errno, "Failed to format path"); |
* stop_what_your_doing_as_your_out_of_memory(); |
* } |
*/ |
int cli_psprintf(char **s1, const char *fmt, ...) |
{ |
va_list ap; |
size_t needed, base = PATH_MAX + 1; |
int skipped = 0; |
char *orig = NULL; |
char *tmp = (char *) malloc(base); |
/* Don't even touch s1, not enough memory */ |
if (NULL == tmp) { |
cli_errno = CL_ENOMEM; |
return -1; |
} |
/* If re-allocating s1, save a copy in case we fail */ |
if (NULL != *s1) |
orig = cli_strdup(*s1); |
/* Print the string to tmp so we can determine the size that |
* we actually need */ |
memset(tmp, 0, sizeof(tmp)); |
va_start(ap, fmt); |
/* vsnprintf will return the # of bytes not written */ |
skipped = vsnprintf(tmp, base, fmt, ap); |
va_end(ap); |
/* realloc/alloc s1 to be just the size that we need */ |
needed = strlen(tmp) + 1; |
*s1 = realloc(*s1, needed); |
if (NULL == *s1) { |
/* No string lived here previously, or we failed to |
* make a copy of it, either way there's nothing we |
* can do. */ |
if (NULL == *orig) { |
cli_errno = CL_ENOMEM; |
return -1; |
} |
/* We can't even allocate enough size to restore the |
* saved copy, just give up */ |
*s1 = realloc(*s1, strlen(orig) + 1); |
if (NULL == *s1) { |
free(tmp); |
free(orig); |
cli_errno = CL_ENOMEM; |
return -1; |
} |
/* Give the string back as we found it */ |
memset(*s1, 0, sizeof(*s1)); |
memcpy(*s1, orig, strlen(orig) + 1); |
free(tmp); |
free(orig); |
cli_errno = CL_ENOMEM; |
return 0; |
} |
/* Ok, great, we have enough room */ |
memset(*s1, 0, sizeof(*s1)); |
memcpy(*s1, tmp, needed); |
free(tmp); |
/* Free tmp only if s1 was reallocated instead of allocated */ |
if (NULL != orig) |
free(orig); |
if (skipped) { |
/* s1 was bigger than PATH_MAX when expanded, however part |
* of the string was printed. Tell the caller not to use it */ |
cli_errno = CL_ETOOBIG; |
return -1; |
} |
/* Success! */ |
cli_errno = CL_EOK; |
return (int) needed; |
} |
/* Ported from FBSD strtok.c 8.1 (Berkeley) 6/4/93 */ |
char * cli_strtok_r(char *s, const char *delim, char **last) |
{ |
char *spanp, *tok; |
int c, sc; |
if (s == NULL && (s = *last) == NULL) { |
cli_errno = CL_EFAIL; |
return (NULL); |
} |
cont: |
c = *s++; |
for (spanp = (char *)delim; (sc = *spanp++) != 0;) { |
if (c == sc) |
goto cont; |
} |
if (c == 0) { /* no non-delimiter characters */ |
*last = NULL; |
return (NULL); |
} |
tok = s - 1; |
for (;;) { |
c = *s++; |
spanp = (char *)delim; |
do { |
if ((sc = *spanp++) == c) { |
if (c == 0) |
s = NULL; |
else |
s[-1] = '\0'; |
*last = s; |
return (tok); |
} |
} while (sc != 0); |
} |
} |
/* Ported from FBSD strtok.c 8.1 (Berkeley) 6/4/93 */ |
char * cli_strtok(char *s, const char *delim) |
{ |
static char *last; |
return (cli_strtok_r(s, delim, &last)); |
} |
/* Count and return the # of elements in an array */ |
unsigned int cli_count_args(char **args) |
{ |
74,7 → 273,10 |
if (NULL == usr->cwd) |
snprintf(usr->cwd, PATH_MAX, "(unknown)"); |
asprintf(&usr->prompt, "%s # ", usr->cwd); |
if (1 < cli_psprintf(&usr->prompt, "%s # ", usr->cwd)) { |
cli_error(cli_errno, "Failed to set prompt"); |
return 1; |
} |
return 0; |
} |
/branches/arm/uspace/app/bdsh/exec.c |
---|
71,7 → 71,7 |
char *path_tok; |
char *path[PATH_MAX]; |
int n = 0, i = 0; |
size_t x = str_size(cmd) + 2; |
size_t x = strlen(cmd) + 2; |
found = (char *)malloc(PATH_MAX); |
80,18 → 80,18 |
return (char *) cmd; |
} |
path_tok = str_dup(PATH); |
path_tok = cli_strdup(PATH); |
/* Extract the PATH env to a path[] array */ |
path[n] = strtok(path_tok, PATH_DELIM); |
path[n] = cli_strtok(path_tok, PATH_DELIM); |
while (NULL != path[n]) { |
if ((str_size(path[n]) + x ) > PATH_MAX) { |
if ((strlen(path[n]) + x ) > PATH_MAX) { |
cli_error(CL_ENOTSUP, |
"Segment %d of path is too large, search ends at segment %d", |
n, n-1); |
break; |
} |
path[++n] = strtok(NULL, PATH_DELIM); |
path[++n] = cli_strtok(NULL, PATH_DELIM); |
} |
/* We now have n places to look for the command */ |
112,27 → 112,18 |
unsigned int try_exec(char *cmd, char **argv) |
{ |
task_id_t tid; |
task_exit_t texit; |
char *tmp; |
int retval; |
tmp = str_dup(find_command(cmd)); |
tmp = cli_strdup(find_command(cmd)); |
free(found); |
tid = task_spawn((const char *)tmp, argv); |
tid = task_spawn((const char *)tmp, (const char **)argv); |
free(tmp); |
if (tid == 0) { |
cli_error(CL_EEXEC, "Cannot spawn `%s'.", cmd); |
cli_error(CL_EEXEC, "Can not spawn %s", cmd); |
return 1; |
} else { |
return 0; |
} |
task_wait(tid, &texit, &retval); |
if (texit != TASK_EXIT_NORMAL) { |
printf("Command failed (unexpectedly terminated).\n"); |
} else if (retval != 0) { |
printf("Command failed (return value %d).\n", retval); |
} |
return 0; |
} |
/branches/arm/uspace/app/bdsh/cmds/modules/kcon/kcon.c |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/kcon/kcon_def.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/kcon/kcon.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/kcon/entry.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/mv/mv.c |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/mv/mv_def.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/mv/entry.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/mv/mv.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/bdd/entry.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/bdd/bdd.c |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/bdd/bdd_def.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/bdd/bdd.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/mount/mount.c |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/mount/mount_def.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/mount/entry.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/mount/mount.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/modules/cp/cp.c |
---|
30,10 → 30,6 |
#include <stdio.h> |
#include <stdlib.h> |
#include <unistd.h> |
#include <getopt.h> |
#include <string.h> |
#include <fcntl.h> |
#include "config.h" |
#include "util.h" |
#include "errors.h" |
41,191 → 37,37 |
#include "cp.h" |
#include "cmds.h" |
#define CP_VERSION "0.0.1" |
#define CP_DEFAULT_BUFLEN 1024 |
static char *cmdname = "cp"; |
static const char *cmdname = "cp"; |
static struct option const long_options[] = { |
{ "buffer", required_argument, 0, 'b' }, |
{ "force", no_argument, 0, 'f' }, |
{ "recursive", no_argument, 0, 'r' }, |
{ "help", no_argument, 0, 'h' }, |
{ "version", no_argument, 0, 'v' }, |
{ "verbose", no_argument, 0, 'V' }, |
{ 0, 0, 0, 0 } |
}; |
static int strtoint(const char *s1) |
{ |
long t1; |
if (-1 == (t1 = strtol(s1, (char **) NULL, 10))) |
return -1; |
if (t1 <= 0) |
return -1; |
return (int) t1; |
} |
static int64_t copy_file(const char *src, const char *dest, |
size_t blen, int vb) |
{ |
int fd1, fd2, bytes = 0; |
off_t total = 0; |
int64_t copied = 0; |
char *buff = NULL; |
if (vb) |
printf("Copying %s to %s\n", src, dest); |
if (-1 == (fd1 = open(src, O_RDONLY))) { |
printf("Unable to open source file %s\n", src); |
return -1; |
} |
if (-1 == (fd2 = open(dest, O_CREAT))) { |
printf("Unable to open destination file %s\n", dest); |
close(fd1); |
return -1; |
} |
total = lseek(fd1, 0, SEEK_END); |
if (vb) |
printf("%d bytes to copy\n", total); |
lseek(fd1, 0, SEEK_SET); |
if (NULL == (buff = (char *) malloc(blen))) { |
printf("Unable to allocate enough memory to read %s\n", |
src); |
copied = -1; |
goto out; |
} |
for (;;) { |
ssize_t res; |
bytes = read(fd1, buff, blen); |
if (bytes <= 0) |
break; |
copied += bytes; |
res = bytes; |
do { |
/* |
* Theoretically, it may not be enough to call write() |
* only once. Also the previous read() may have |
* returned less data than requested. |
*/ |
bytes = write(fd2, buff, res); |
if (bytes < 0) |
goto err; |
res -= bytes; |
} while (res > 0); |
/* TODO: re-insert assert() once this is stand alone, |
* removed as abort() exits the entire shell |
*/ |
if (res != 0) { |
printf("\n%d more bytes than actually exist were copied\n", res); |
goto err; |
} |
} |
if (bytes < 0) { |
err: |
printf("\nError copying %s, (%d)\n", src, bytes); |
copied = bytes; |
} |
out: |
close(fd1); |
close(fd2); |
if (buff) |
free(buff); |
return copied; |
} |
/* Dispays help for cp in various levels */ |
void help_cmd_cp(unsigned int level) |
{ |
static char helpfmt[] = |
"Usage: %s [options] <source> <dest>\n" |
"Options: (* indicates not yet implemented)\n" |
" -h, --help A short option summary\n" |
" -v, --version Print version information and exit\n" |
"* -V, --verbose Be annoyingly noisy about what's being done\n" |
"* -f, --force Do not complain when <dest> exists\n" |
"* -r, --recursive Copy entire directories\n" |
" -b, --buffer ## Set the read buffer size to ##\n" |
"Currently, %s is under development, some options may not work.\n"; |
if (level == HELP_SHORT) { |
printf("`%s' copies files and directories\n", cmdname); |
} else { |
help_cmd_cp(HELP_SHORT); |
printf(helpfmt, cmdname, cmdname); |
} |
printf("This is the %s help for '%s'.\n", |
level ? EXT_HELP : SHORT_HELP, cmdname); |
return; |
} |
/* Main entry point for cp, accepts an array of arguments */ |
int cmd_cp(char **argv) |
{ |
unsigned int argc, buffer = 0, verbose = 0; |
int c, opt_ind; |
int64_t ret; |
unsigned int argc; |
unsigned int i; |
argc = cli_count_args(argv); |
/* Count the arguments */ |
for (argc = 0; argv[argc] != NULL; argc ++); |
for (c = 0, optind = 0, opt_ind = 0; c != -1;) { |
c = getopt_long(argc, argv, "hvVfrb:", long_options, &opt_ind); |
switch (c) { |
case 'h': |
help_cmd_cp(1); |
return CMD_SUCCESS; |
case 'v': |
printf("%d\n", CP_VERSION); |
return CMD_SUCCESS; |
case 'V': |
verbose = 1; |
break; |
case 'f': |
break; |
case 'r': |
break; |
case 'b': |
if (-1 == (buffer = strtoint(optarg))) { |
printf("%s: Invalid buffer specification, " |
"(should be a number greater than zero)\n", |
cmdname); |
return CMD_FAILURE; |
} |
if (verbose) |
printf("Buffer = %d\n", buffer); |
break; |
} |
} |
printf("%s %s\n", TEST_ANNOUNCE, cmdname); |
printf("%d arguments passed to %s", argc - 1, cmdname); |
if (buffer == 0) |
buffer = CP_DEFAULT_BUFLEN; |
argc -= optind; |
if (argc != 2) { |
printf("%s: invalid number of arguments. Try %s --help\n", |
cmdname, cmdname); |
return CMD_FAILURE; |
if (argc < 2) { |
printf("\n"); |
return CMD_SUCCESS; |
} |
ret = copy_file(argv[optind], argv[optind + 1], buffer, verbose); |
printf(":\n"); |
for (i = 1; i < argc; i++) |
printf("[%d] -> %s\n", i, argv[i]); |
if (verbose) |
printf("%d bytes copied\n", ret); |
if (ret >= 0) |
return CMD_SUCCESS; |
else |
return CMD_FAILURE; |
return CMD_SUCCESS; |
} |
/branches/arm/uspace/app/bdsh/cmds/modules/cp/cp_def.h |
---|
3,5 → 3,6 |
"Copy files and directories", |
&cmd_cp, |
&help_cmd_cp, |
0 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/sleep/sleep_def.h |
---|
3,5 → 3,6 |
"Pause for given time interval (in seconds)", |
&cmd_sleep, |
&help_cmd_sleep, |
0 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/modules.h |
---|
18,9 → 18,9 |
/* Prototypes for each module's entry (help/exec) points */ |
#include "help/entry.h" |
#include "quit/entry.h" |
#include "mkdir/entry.h" |
#include "rm/entry.h" |
#include "bdd/entry.h" |
#include "cat/entry.h" |
#include "touch/entry.h" |
#include "ls/entry.h" |
27,9 → 27,6 |
#include "pwd/entry.h" |
#include "sleep/entry.h" |
#include "cp/entry.h" |
#include "mv/entry.h" |
#include "mount/entry.h" |
#include "kcon/entry.h" |
/* Each .def function fills the module_t struct with the individual name, entry |
* point, help entry point, etc. You can use config.h to control what modules |
37,9 → 34,9 |
module_t modules[] = { |
#include "help/help_def.h" |
#include "quit/quit_def.h" |
#include "mkdir/mkdir_def.h" |
#include "rm/rm_def.h" |
#include "bdd/bdd_def.h" |
#include "cat/cat_def.h" |
#include "touch/touch_def.h" |
#include "ls/ls_def.h" |
46,10 → 43,6 |
#include "pwd/pwd_def.h" |
#include "sleep/sleep_def.h" |
#include "cp/cp_def.h" |
#include "mv/mv_def.h" |
#include "mount/mount_def.h" |
#include "kcon/kcon_def.h" |
{NULL, NULL, NULL, NULL} |
}; |
/branches/arm/uspace/app/bdsh/cmds/modules/quit/quit.c |
---|
0,0 → 1,55 |
/* Copyright (c) 2008, Tim Post <tinkertim@gmail.com> |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are met: |
* |
* Redistributions of source code must retain the above copyright notice, this |
* list of conditions and the following disclaimer. |
* |
* Redistributions in binary form must reproduce the above copyright notice, |
* this list of conditions and the following disclaimer in the documentation |
* and/or other materials provided with the distribution. |
* |
* Neither the name of the original program's authors nor the names of its |
* contributors may be used to endorse or promote products derived from this |
* software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
* POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <stdio.h> |
#include <stdlib.h> |
#include "entry.h" |
#include "quit.h" |
#include "cmds.h" |
static char *cmdname = "quit"; |
extern volatile unsigned int cli_quit; |
extern const char *progname; |
void help_cmd_quit(unsigned int level) |
{ |
printf("Type `%s' to exit %s\n", cmdname, progname); |
return; |
} |
/* Quits the program and returns the status of whatever command |
* came before invoking 'quit' */ |
int cmd_quit(char *argv[]) |
{ |
/* Inform that we're outta here */ |
cli_quit = 1; |
return CMD_SUCCESS; |
} |
/branches/arm/uspace/app/bdsh/cmds/modules/quit/entry.h |
---|
0,0 → 1,10 |
#ifndef QUIT_ENTRY_H_ |
#define QUIT_ENTRY_H_ |
/* Entry points for the quit command */ |
extern void help_cmd_quit(unsigned int); |
extern int cmd_quit(char *[]); |
#endif |
/branches/arm/uspace/app/bdsh/cmds/modules/quit/quit_def.h |
---|
0,0 → 1,14 |
{ |
"quit", |
"Exit the console", |
&cmd_quit, |
&help_cmd_quit, |
-1 |
}, |
{ |
"exit", |
NULL, |
&cmd_quit, |
&help_cmd_quit, |
-1 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/quit/quit.h |
---|
0,0 → 1,6 |
#ifndef QUIT_H |
#define QUIT_H |
/* Prototypes for the quit command (excluding entry points) */ |
#endif |
/branches/arm/uspace/app/bdsh/cmds/modules/touch/touch.c |
---|
37,7 → 37,6 |
#include <fcntl.h> |
#include <dirent.h> |
#include <sys/types.h> |
#include <string.h> |
#include "config.h" |
#include "errors.h" |
80,7 → 79,7 |
} |
for (i = 1; i < argc; i ++) { |
buff = str_dup(argv[i]); |
buff = cli_strdup(argv[i]); |
dirp = opendir(buff); |
if (dirp) { |
cli_error(CL_ENOTSUP, "%s is a directory", buff); |
/branches/arm/uspace/app/bdsh/cmds/modules/touch/touch_def.h |
---|
3,5 → 3,6 |
"Create files or update access times", |
&cmd_touch, |
&help_cmd_touch, |
0 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/mkdir/mkdir.c |
---|
37,7 → 37,6 |
#include <sys/stat.h> |
#include <getopt.h> |
#include <stdarg.h> |
#include <string.h> |
#include "config.h" |
#include "errors.h" |
94,7 → 93,7 |
/* Its a good idea to allocate path, plus we (may) need a copy of |
* path to tokenize if parents are specified */ |
if (NULL == (tmp = str_dup(path))) { |
if (NULL == (tmp = cli_strdup(path))) { |
cli_error(CL_ENOMEM, "%s: path too big?", cmdname); |
return 1; |
} |
129,9 → 128,9 |
absolute = 1; |
/* TODO: Canonify the path prior to tokenizing it, see below */ |
dirs[i] = strtok(tmp, "/"); |
dirs[i] = cli_strtok(tmp, "/"); |
while (dirs[i] && i < 255) |
dirs[++i] = strtok(NULL, "/"); |
dirs[++i] = cli_strtok(NULL, "/"); |
if (NULL == dirs[0]) |
return 1; |
150,7 → 149,7 |
while (dirs[i] != NULL) { |
/* Sometimes make or scripts conjoin odd paths. Account for something |
* like this: ../../foo/bar/../foo/foofoo/./bar */ |
if (!str_cmp(dirs[i], "..") || !str_cmp(dirs[i], ".")) { |
if (!strcmp(dirs[i], "..") || !strcmp(dirs[i], ".")) { |
if (0 != (chdir(dirs[i]))) { |
cli_error(CL_EFAIL, "%s: impossible path: %s", |
cmdname, path); |
/branches/arm/uspace/app/bdsh/cmds/modules/mkdir/mkdir_def.h |
---|
3,6 → 3,14 |
"Create new directories", |
&cmd_mkdir, |
&help_cmd_mkdir, |
0 |
}, |
{ |
"md", |
NULL, |
&cmd_mkdir, |
&help_cmd_mkdir, |
0 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/cat/cat.c |
---|
87,8 → 87,7 |
off_t total = 0; |
char *buff = NULL; |
fd = open(fname, O_RDONLY); |
if (fd < 0) { |
if (-1 == (fd = open(fname, O_RDONLY))) { |
printf("Unable to open %s\n", fname); |
return 1; |
} |
104,11 → 103,13 |
} |
do { |
memset(buff, 0, sizeof(buff)); |
bytes = read(fd, buff, blen); |
if (bytes > 0) { |
count += bytes; |
buff[bytes] = '\0'; |
printf("%s", buff); |
if (bytes < blen) |
buff[bytes] = '\0'; |
printf(buff); |
reads++; |
} |
} while (bytes > 0); |
/branches/arm/uspace/app/bdsh/cmds/modules/cat/cat_def.h |
---|
3,5 → 3,6 |
"Show the contents of a file", |
&cmd_cat, |
&help_cmd_cat, |
0 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/help/help.c |
---|
107,7 → 107,7 |
} |
if (argc == 3) { |
if (!str_cmp("extended", argv[2])) |
if (!strcmp("extended", argv[2])) |
level = HELP_LONG; |
else |
level = HELP_SHORT; |
133,11 → 133,13 |
/* First, show a list of built in commands that are available in this mode */ |
for (cmd = builtins; cmd->name != NULL; cmd++, i++) { |
if (!builtin_is_restricted(i)) { |
if (is_builtin_alias(cmd->name)) |
printf(" %-16s\tAlias for `%s'\n", cmd->name, |
alias_for_builtin(cmd->name)); |
else |
printf(" %-16s\t%s\n", cmd->name, cmd->desc); |
} |
} |
i = 0; |
144,11 → 146,13 |
/* Now, show a list of module commands that are available in this mode */ |
for (mod = modules; mod->name != NULL; mod++, i++) { |
if (!module_is_restricted(i)) { |
if (is_module_alias(mod->name)) |
printf(" %-16s\tAlias for `%s'\n", mod->name, |
alias_for_module(mod->name)); |
else |
printf(" %-16s\t%s\n", mod->name, mod->desc); |
} |
} |
printf("\n Try %s %s for more information on how `%s' works.\n\n", |
/branches/arm/uspace/app/bdsh/cmds/modules/help/help_def.h |
---|
3,4 → 3,5 |
"Show help for commands", |
&cmd_help, |
&help_cmd_help, |
0 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/pwd/pwd.c |
---|
30,7 → 30,6 |
#include <stdio.h> |
#include <stdlib.h> |
#include <mem.h> |
#include "config.h" |
#include "errors.h" |
/branches/arm/uspace/app/bdsh/cmds/modules/pwd/pwd_def.h |
---|
3,4 → 3,5 |
"Prints the current working directory", |
&cmd_pwd, |
&help_cmd_pwd, |
-1 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/ls/ls.c |
---|
50,9 → 50,30 |
static char *cmdname = "ls"; |
static unsigned int ls_scope(const char *path) |
{ |
int fd; |
DIR *dirp; |
dirp = opendir(path); |
if (dirp) { |
closedir(dirp); |
return LS_DIR; |
} |
fd = open(path, O_RDONLY); |
if (fd > 0) { |
close(fd); |
return LS_FILE; |
} |
return LS_BOGUS; |
} |
static void ls_scan_dir(const char *d, DIR *dirp) |
{ |
struct dirent *dp; |
unsigned int scope; |
char *buff; |
if (! dirp) |
69,7 → 90,20 |
/* Don't worry if inserting a double slash, this will be fixed by |
* absolutize() later with subsequent calls to open() or readdir() */ |
snprintf(buff, PATH_MAX - 1, "%s/%s", d, dp->d_name); |
ls_print(dp->d_name, buff); |
scope = ls_scope(buff); |
switch (scope) { |
case LS_DIR: |
ls_print_dir(dp->d_name); |
break; |
case LS_FILE: |
ls_print_file(dp->d_name); |
break; |
case LS_BOGUS: |
/* Odd chance it was deleted from the time readdir() found |
* it and the time that it was scoped */ |
printf("ls: skipping bogus node %s\n", dp->d_name); |
break; |
} |
} |
free(buff); |
77,7 → 111,7 |
return; |
} |
/* ls_print currently does nothing more than print the entry. |
/* ls_print_* currently does nothing more than print the entry. |
* in the future, we will likely pass the absolute path, and |
* some sort of ls_options structure that controls how each |
* entry is printed and what is printed about it. |
84,23 → 118,17 |
* |
* Now we just print basic DOS style lists */ |
static void ls_print(const char *name, const char *pathname) |
static void ls_print_dir(const char *d) |
{ |
struct stat s; |
int rc; |
printf("%-40s\t<DIR>\n", d); |
if (rc = stat(pathname, &s)) { |
/* Odd chance it was deleted from the time readdir() found it */ |
printf("ls: skipping bogus node %s\n", pathname); |
printf("rc=%d\n", rc); |
return; |
} |
if (s.is_file) |
printf("%-40s\t%llu\n", name, (long long) s.size); |
else |
printf("%-40s\n", name); |
return; |
} |
static void ls_print_file(const char *f) |
{ |
printf("%-40s\n", f); |
return; |
} |
120,7 → 148,7 |
int cmd_ls(char **argv) |
{ |
unsigned int argc; |
struct stat s; |
unsigned int scope; |
char *buff; |
DIR *dirp; |
136,19 → 164,21 |
if (argc == 1) |
getcwd(buff, PATH_MAX); |
else |
str_cpy(buff, PATH_MAX, argv[1]); |
strncpy(buff, argv[1], PATH_MAX); |
if (stat(buff, &s)) { |
scope = ls_scope(buff); |
switch (scope) { |
case LS_BOGUS: |
cli_error(CL_ENOENT, buff); |
free(buff); |
return CMD_FAILURE; |
} |
if (s.is_file) { |
ls_print(buff, buff); |
} else { |
case LS_FILE: |
ls_print_file(buff); |
break; |
case LS_DIR: |
dirp = opendir(buff); |
if (!dirp) { |
if (! dirp) { |
/* May have been deleted between scoping it and opening it */ |
cli_error(CL_EFAIL, "Could not stat %s", buff); |
free(buff); |
156,6 → 186,7 |
} |
ls_scan_dir(buff, dirp); |
closedir(dirp); |
break; |
} |
free(buff); |
/branches/arm/uspace/app/bdsh/cmds/modules/ls/ls_def.h |
---|
3,4 → 3,14 |
"List files and directories", |
&cmd_ls, |
&help_cmd_ls, |
0 |
}, |
{ |
"dir", |
NULL, |
&cmd_ls, |
&help_cmd_ls, |
0 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/ls/ls.h |
---|
9,7 → 9,8 |
static unsigned int ls_scope(const char *); |
static void ls_scan_dir(const char *, DIR *); |
static void ls_print(const char *, const char *); |
static void ls_print_dir(const char *); |
static void ls_print_file(const char *); |
#endif /* LS_H */ |
/branches/arm/uspace/app/bdsh/cmds/modules/rm/rm.c |
---|
33,9 → 33,8 |
#include <unistd.h> |
#include <fcntl.h> |
#include <dirent.h> |
#include <assert.h> |
#include <getopt.h> |
#include <mem.h> |
#include <string.h> |
#include "config.h" |
#include "errors.h" |
218,13 → 217,9 |
i = optind; |
while (NULL != argv[i]) { |
len = str_size(argv[i]) + 2; |
len = strlen(argv[i]) + 2; |
buff = (char *) realloc(buff, len); |
if (buff == NULL) { |
printf("rm: out of memory\n"); |
ret = 1; |
break; |
} |
assert(buff != NULL); |
memset(buff, 0, sizeof(buff)); |
snprintf(buff, len, argv[i]); |
/branches/arm/uspace/app/bdsh/cmds/modules/rm/rm_def.h |
---|
3,5 → 3,14 |
"Remove files and directories", |
&cmd_rm, |
&help_cmd_rm, |
0 |
}, |
{ |
"del", |
NULL, |
&cmd_rm, |
&help_cmd_rm, |
0 |
}, |
/branches/arm/uspace/app/bdsh/cmds/modules/module_aliases.h |
---|
12,7 → 12,10 |
* the entry point being reached. */ |
char *mod_aliases[] = { |
"ren", "mv", |
"exit", "quit", |
"md", "mkdir", |
"del", "rm", |
"dir", "ls", |
NULL, NULL |
}; |
/branches/arm/uspace/app/bdsh/cmds/mknewcmd |
---|
46,6 → 46,8 |
-e, --entry Entry function of the command (def: cmd_${def}) |
-h, --help-entry Entry function for command help (def: help_cmd_${def}) |
-a, --alias Alias (nickname) for this command (def: none) |
-r, --restrict Restriction level (interactive, non-interactive, both) |
(def: module is both, builtin is interactive only) |
-t, --type Type of command (module or builtin) (def: module) |
-H, --help This help summary |
-V, --version Print $PROGNAME version and exit normally |
65,7 → 67,8 |
$PROGNAME -n foo -d "Foo power" -a bar -r both -t module modules/foo |
The example would generate a modular command named 'foo', which is also |
reached by typing 'bar'. |
reached by typing 'bar' and available in either interactive or noninteractive |
mode. |
Skeletal files do *not* depend on the autoconf generated "config.h" unless you |
include it. This may or may not be desirable depending on your use. |
94,6 → 97,7 |
"${CMDDESC}", |
&${CMDENTRY}, |
&${HELPENTRY}, |
${CMDRESTRICT} |
}, |
EOF |
103,6 → 107,7 |
NULL, |
&${CMDENTRY}, |
&${HELPENTRY}, |
${CMDRESTRICT} |
}, |
EOF |
162,7 → 167,7 |
#include "${CMDNAME}.h" |
#include "cmds.h" |
static const char *cmdname = "${CMDNAME}"; |
static char *cmdname = "${CMDNAME}"; |
/* Dispays help for ${CMDNAME} in various levels */ |
void ${HELPENTRY}(unsigned int level) |
229,8 → 234,8 |
# We need at least one |
[ $# = 0 ] && usage && exit 1; |
TEMP=$(getopt -o n:d:e:h:a:t:HV \ |
--long name:,desc:,entry:,help-entry:,alias:,type:,help,version \ |
TEMP=$(getopt -o n:d:e:h:a:r:t:HV \ |
--long name:,desc:,entry:,help-entry:,alias:,restrict:,type:,help,version \ |
-- "$@") || { |
echo "Try $PROGNAME --help for help" |
} |
264,6 → 269,11 |
shift 2 |
continue |
;; |
-r | --restrict) |
CMDRESTRICT="$2" |
shift 2 |
continue |
;; |
-t | --type) |
CMDTYPE="$2" |
shift 2 |
295,7 → 305,30 |
[ -n "$CMDTYPE" ] || CMDTYPE="module" |
[ -n "$OUTDIR" ] || OUTDIR="${CMDTYPE}s/${CMDNAME}" |
# Builtins typically only need to be available in interactive mode, |
# set the default accordingly. |
[ -n "$CMDRESTRICT" ] || { |
[ "$CMDTYPE" = "module" ] && CMDRESTRICT="both" |
[ "$CMDTYPE" = "builtin" ] && CMDRESTRICT="interactive" |
} |
# Set the restriction level as the structure expects to see it |
case "$CMDRESTRICT" in |
0 | both) |
CMDRESTRICT="0" |
;; |
1 | non-interactive) |
CMDRESTRICT="1" |
;; |
-1 | interactive) |
CMDRESTRICT="-1" |
;; |
*) |
usage |
exit 1 |
;; |
esac |
# Do a little sanity |
[ -d $OUTDIR ] && { |
echo "$OUTDIR already exists, remove it to proceed." |
/branches/arm/uspace/app/bdsh/cmds/builtins/exit/exit.c |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/builtins/exit/exit_def.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/builtins/exit/exit.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/builtins/exit/entry.h |
---|
File deleted |
/branches/arm/uspace/app/bdsh/cmds/builtins/cd/cd_def.h |
---|
3,4 → 3,12 |
"Change the current working directory", |
&cmd_cd, |
&help_cmd_cd, |
-1 |
}, |
{ |
"chdir", |
NULL, |
&cmd_cd, |
&help_cmd_cd, |
-1 |
}, |
/branches/arm/uspace/app/bdsh/cmds/builtins/builtins.h |
---|
4,11 → 4,9 |
#include "config.h" |
#include "cd/entry.h" |
#include "exit/entry.h" |
builtin_t builtins[] = { |
#include "cd/cd_def.h" |
#include "exit/exit_def.h" |
{NULL, NULL, NULL, NULL} |
}; |
/branches/arm/uspace/app/bdsh/cmds/builtins/builtin_aliases.h |
---|
4,6 → 4,7 |
/* See modules/module_aliases.h for an explanation of this file */ |
char *builtin_aliases[] = { |
"chdir", "cd", |
NULL, NULL |
}; |
/branches/arm/uspace/app/bdsh/cmds/cmds.h |
---|
36,6 → 36,7 |
char *desc; /* Description of the command */ |
mod_entry_t entry; /* Command (exec) entry function */ |
mod_help_t help; /* Command (help) entry function */ |
int restricted; /* Restricts to interactive/non-interactive only */ |
} module_t; |
/* Builtin structure, same as modules except different types of entry points */ |
/branches/arm/uspace/app/bdsh/cmds/mod_cmds.c |
---|
53,6 → 53,26 |
extern volatile unsigned int cli_interactive; |
int module_is_restricted(int pos) |
{ |
/* Restriction Levels: |
* -1 -> Available only in interactive mode |
* 0 -> Available in any mode |
* 1 -> Available only in non-interactive mode */ |
module_t *mod = modules; |
mod += pos; |
/* We're interactive, and the module is OK to run */ |
if (cli_interactive && mod->restricted <= 0) |
return 0; |
/* We're not interactive, and the module is OK to run */ |
if (!cli_interactive && mod->restricted >= 0) |
return 0; |
/* Anything else is just a big fat no :) */ |
return 1; |
} |
/* Checks if an entry function matching command exists in modules[], if so |
* its position in the array is returned */ |
int is_module(const char *command) |
64,7 → 84,7 |
return -2; |
for (mod = modules; mod->name != NULL; mod++, i++) { |
if (!str_cmp(mod->name, command)) |
if (!strcmp(mod->name, command)) |
return i; |
} |
81,7 → 101,7 |
return -1; |
for(i=0; mod_aliases[i] != NULL; i+=2) { |
if (!str_cmp(mod_aliases[i], command)) |
if (!strcmp(mod_aliases[i], command)) |
return 1; |
} |
97,7 → 117,7 |
return (char *)NULL; |
for(i=0; mod_aliases[i] != NULL; i++) { |
if (!str_cmp(mod_aliases[i], command)) |
if (!strcmp(mod_aliases[i], command)) |
return (char *)mod_aliases[++i]; |
i++; |
} |
/branches/arm/uspace/app/bdsh/cmds/builtin_cmds.c |
---|
40,6 → 40,19 |
extern volatile unsigned int cli_interactive; |
int builtin_is_restricted(int pos) |
{ |
builtin_t *cmd = builtins; |
cmd += pos; |
if (cli_interactive && cmd->restricted <= 0) |
return 0; |
if (!cli_interactive && cmd->restricted >= 0) |
return 0; |
return 1; |
} |
int is_builtin(const char *command) |
{ |
builtin_t *cmd; |
49,7 → 62,7 |
return -2; |
for (cmd = builtins; cmd->name != NULL; cmd++, i++) { |
if (!str_cmp(cmd->name, command)) |
if (!strcmp(cmd->name, command)) |
return i; |
} |
64,7 → 77,7 |
return -1; |
for(i=0; builtin_aliases[i] != NULL; i+=2) { |
if (!str_cmp(builtin_aliases[i], command)) |
if (!strcmp(builtin_aliases[i], command)) |
return 1; |
} |
79,7 → 92,7 |
return (char *)NULL; |
for(i=0; builtin_aliases[i] != NULL; i++) { |
if (!str_cmp(builtin_aliases[i], command)) |
if (!strcmp(builtin_aliases[i], command)) |
return (char *)builtin_aliases[++i]; |
i++; |
} |
/branches/arm/uspace/app/bdsh/Makefile |
---|
30,18 → 30,25 |
# POSSIBILITY OF SUCH DAMAGE. |
include ../../../version |
include ../../Makefile.config |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
LIBBLOCK_PREFIX = ../../lib/libblock |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -I../../srv/kbd/include -I$(LIBBLOCK_PREFIX) |
CFLAGS += -I../../srv/kbd/include |
LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a |
DEFS += -DRELEASE=$(RELEASE) |
LIBS = $(LIBC_PREFIX)/libc.a |
DEFS += -DRELEASE=\"$(RELEASE)\" |
ifdef REVISION |
DEFS += "-DREVISION=\"$(TIMESTAMP)\"" |
endif |
ifdef TIMESTAMP |
DEFS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
PROGRAM = bdsh |
# Any directory that cleaning targets should know about |
50,9 → 57,9 |
cmds/ \ |
cmds/modules/ \ |
cmds/modules/help/ \ |
cmds/modules/quit/ \ |
cmds/modules/mkdir/ \ |
cmds/modules/rm/ \ |
cmds/modules/bdd/ \ |
cmds/modules/cat/ \ |
cmds/modules/touch/ \ |
cmds/modules/ls/ \ |
59,18 → 66,14 |
cmds/modules/pwd/ \ |
cmds/modules/sleep/ \ |
cmds/modules/cp/ \ |
cmds/modules/mv/ \ |
cmds/modules/mount/ \ |
cmds/modules/kcon/ \ |
cmds/builtins/ \ |
cmds/builtins/exit/\ |
cmds/builtins/cd/ |
SOURCES = \ |
cmds/modules/help/help.c \ |
cmds/modules/quit/quit.c \ |
cmds/modules/mkdir/mkdir.c \ |
cmds/modules/rm/rm.c \ |
cmds/modules/bdd/bdd.c \ |
cmds/modules/cat/cat.c \ |
cmds/modules/touch/touch.c \ |
cmds/modules/ls/ls.c \ |
77,10 → 80,6 |
cmds/modules/pwd/pwd.c \ |
cmds/modules/sleep/sleep.c \ |
cmds/modules/cp/cp.c \ |
cmds/modules/mv/mv.c \ |
cmds/modules/mount/mount.c \ |
cmds/modules/kcon/kcon.c \ |
cmds/builtins/exit/exit.c \ |
cmds/builtins/cd/cd.c \ |
cmds/mod_cmds.c \ |
cmds/builtin_cmds.c \ |
113,7 → 112,7 |
@$(CC) -M $(CFLAGS) $(INC) $*.c > $*.d |
$(PROGRAM): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(PROGRAM).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(PROGRAM).map |
# Everything else is a phony target |
.PHONY: all clean distclean depend disasm |
/branches/arm/uspace/app/bdsh/scli.c |
---|
45,6 → 45,7 |
/* Globals that are modified during start-up that modules/builtins |
* should be aware of. */ |
volatile unsigned int cli_quit = 0; |
volatile unsigned int cli_interactive = 1; |
volatile unsigned int cli_verbocity = 1; |
/* The official name of this program |
/branches/arm/uspace/app/bdsh/util.h |
---|
3,6 → 3,13 |
#include "scli.h" |
/* Internal string handlers */ |
extern char * cli_strdup(const char *); |
extern int cli_redup(char **, const char *); |
extern int cli_psprintf(char **, const char *, ...); |
extern char * cli_strtok_r(char *, const char *, char **); |
extern char * cli_strtok(char *, const char *); |
/* Utility functions */ |
extern unsigned int cli_count_args(char **); |
extern unsigned int cli_set_prompt(cliuser_t *usr); |
/branches/arm/uspace/app/bdsh/input.c |
---|
32,12 → 32,7 |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include <io/console.h> |
#include <io/keycode.h> |
#include <io/style.h> |
#include <vfs/vfs.h> |
#include <errno.h> |
#include <bool.h> |
#include <io/stream.h> |
#include "config.h" |
#include "util.h" |
46,8 → 41,21 |
#include "errors.h" |
#include "exec.h" |
extern volatile unsigned int cli_interactive; |
/* Not exposed in input.h */ |
static void cli_restricted(char *); |
static void read_line(char *, int); |
/* More than a macro than anything */ |
static void cli_restricted(char *cmd) |
{ |
printf("%s is not available in %s mode\n", cmd, |
cli_interactive ? "interactive" : "non-interactive"); |
return; |
} |
/* Tokenizes input from console, sees if the first word is a built-in, if so |
* invokes the built-in entry point (a[0]) passing all arguments in a[] to |
* the handler */ |
61,11 → 69,14 |
if (NULL == usr->line) |
return CL_EFAIL; |
tmp = str_dup(usr->line); |
tmp = cli_strdup(usr->line); |
cmd[n] = strtok(tmp, " "); |
/* Break up what the user typed, space delimited */ |
/* TODO: Protect things in quotes / ticks, expand wildcards */ |
cmd[n] = cli_strtok(tmp, " "); |
while (cmd[n] && n < WORD_MAX) { |
cmd[++n] = strtok(NULL, " "); |
cmd[++n] = cli_strtok(NULL, " "); |
} |
/* We have rubbish */ |
74,19 → 85,39 |
goto finit; |
} |
/* Its a builtin command ? */ |
/* Its a builtin command */ |
if ((i = (is_builtin(cmd[0]))) > -1) { |
/* Its not available in this mode, see what try_exec() thinks */ |
if (builtin_is_restricted(i)) { |
rc = try_exec(cmd[0], cmd); |
if (rc) |
/* No external matching it could be found, tell the |
* user that the command does exist, but is not |
* available in this mode. */ |
cli_restricted(cmd[0]); |
goto finit; |
} |
/* Its a builtin, its available, run it */ |
rc = run_builtin(i, cmd, usr); |
goto finit; |
/* Its a module ? */ |
/* We repeat the same dance for modules */ |
} else if ((i = (is_module(cmd[0]))) > -1) { |
if (module_is_restricted(i)) { |
rc = try_exec(cmd[0], cmd); |
if (rc) |
cli_restricted(cmd[0]); |
goto finit; |
} |
rc = run_module(i, cmd); |
goto finit; |
} else { |
/* Its not a module or builtin, restricted or otherwise. |
* See what try_exec() thinks of it and just pass its return |
* value back to the caller */ |
rc = try_exec(cmd[0], cmd); |
goto finit; |
} |
/* See what try_exec thinks of it */ |
rc = try_exec(cmd[0], cmd); |
finit: |
if (NULL != usr->line) { |
free(usr->line); |
98,46 → 129,31 |
return rc; |
} |
/* Borrowed from Jiri Svoboda's 'cli' uspace app */ |
static void read_line(char *buffer, int n) |
{ |
console_event_t ev; |
size_t offs, otmp; |
wchar_t dec; |
char c; |
int chars; |
offs = 0; |
while (true) { |
fflush(stdout); |
if (!console_get_event(fphone(stdin), &ev)) |
chars = 0; |
while (chars < n - 1) { |
c = getchar(); |
if (c < 0) |
return; |
if (ev.type != KEY_PRESS) |
continue; |
if (ev.key == KC_ENTER || ev.key == KC_NENTER) |
if (c == '\n') |
break; |
if (ev.key == KC_BACKSPACE) { |
if (offs > 0) { |
/* |
* Back up until we reach valid start of |
* character. |
*/ |
while (offs > 0) { |
--offs; otmp = offs; |
dec = str_decode(buffer, &otmp, n); |
if (dec != U_SPECIAL) |
break; |
} |
if (c == '\b') { |
if (chars > 0) { |
putchar('\b'); |
--chars; |
} |
continue; |
} |
if (ev.c >= ' ') { |
if (chr_encode(ev.c, buffer, &offs, n - 1) == EOK) |
putchar(ev.c); |
} |
putchar(c); |
buffer[chars++] = c; |
} |
putchar('\n'); |
buffer[offs] = '\0'; |
buffer[chars] = '\0'; |
} |
/* TODO: |
146,18 → 162,15 |
void get_input(cliuser_t *usr) |
{ |
char line[INPUT_MAX]; |
size_t len = 0; |
fflush(stdout); |
console_set_style(fphone(stdout), STYLE_EMPHASIS); |
printf("%s", usr->prompt); |
fflush(stdout); |
console_set_style(fphone(stdout), STYLE_NORMAL); |
read_line(line, INPUT_MAX); |
len = strlen(line); |
/* Make sure we don't have rubbish or a C/R happy user */ |
if (str_cmp(line, "") == 0 || str_cmp(line, "\n") == 0) |
if (len == 0 || line[0] == '\n') |
return; |
usr->line = str_dup(line); |
usr->line = cli_strdup(line); |
return; |
} |
/branches/arm/uspace/app/bdsh/AUTHORS |
---|
8,6 → 8,9 |
* Based on the HelenOS testing sub-system written by Martin Decky |
* cli_strtok() and cli_strtok_r() (util.c) were adapted from the FreeBSD |
strtok() and strtok_r() functions written by Wes Peters. |
* read_line() (input.c) was written by Jiri Svoboda |
Individual author copyrights are listed in the headers of each file. |
/branches/arm/uspace/app/tester/loop/loop1.def |
---|
File deleted |
/branches/arm/uspace/app/tester/loop/loop1.c |
---|
File deleted |
/branches/arm/uspace/app/tester/stdio/stdio1.def |
---|
File deleted |
/branches/arm/uspace/app/tester/stdio/stdio2.def |
---|
File deleted |
/branches/arm/uspace/app/tester/stdio/stdio1.c |
---|
File deleted |
/branches/arm/uspace/app/tester/stdio/stdio2.c |
---|
File deleted |
/branches/arm/uspace/app/tester/console/console1.def |
---|
File deleted |
/branches/arm/uspace/app/tester/console/console1.c |
---|
File deleted |
/branches/arm/uspace/app/tester/mm/malloc1.def |
---|
File deleted |
/branches/arm/uspace/app/tester/mm/malloc1.c |
---|
File deleted |
/branches/arm/uspace/app/tester/tester.c |
---|
27,10 → 27,10 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup tester User space tester |
* @brief User space testing infrastructure. |
/** @addtogroup tester User space Tester |
* @brief User space testing infrastructure. |
* @{ |
*/ |
*/ |
/** |
* @file |
*/ |
37,44 → 37,42 |
#include <unistd.h> |
#include <stdio.h> |
#include <string.h> |
#include "tester.h" |
bool test_quiet; |
int test_argc; |
char **test_argv; |
int myservice = 0; |
int phones[MAX_PHONES]; |
int connections[MAX_CONNECTIONS]; |
ipc_callid_t callids[MAX_CONNECTIONS]; |
test_t tests[] = { |
#include "thread/thread1.def" |
#include "print/print1.def" |
#include "print/print2.def" |
#include "print/print3.def" |
#include "print/print4.def" |
#include "console/console1.def" |
#include "stdio/stdio1.def" |
#include "stdio/stdio2.def" |
#include "fault/fault1.def" |
#include "fault/fault2.def" |
#include "vfs/vfs1.def" |
#include "ipc/ping_pong.def" |
#include "ipc/register.def" |
#include "ipc/connect.def" |
#include "loop/loop1.def" |
#include "mm/malloc1.def" |
{NULL, NULL, NULL, false} |
#include "ipc/send_async.def" |
#include "ipc/send_sync.def" |
#include "ipc/answer.def" |
#include "ipc/hangup.def" |
#include "devmap/devmap1.def" |
#include "vfs/vfs1.def" |
{NULL, NULL, NULL} |
}; |
static bool run_test(test_t *test) |
{ |
printf("%s\t\t%s\n", test->name, test->desc); |
/* Execute the test */ |
char *ret = test->entry(); |
char * ret = test->entry(false); |
if (ret == NULL) { |
printf("\nTest passed\n"); |
printf("Test passed\n\n"); |
return true; |
} |
printf("\n%s\n", ret); |
printf("%s\n\n", ret); |
return false; |
} |
83,12 → 81,11 |
test_t *test; |
unsigned int i = 0; |
unsigned int n = 0; |
printf("\n*** Running all safe tests ***\n\n"); |
for (test = tests; test->name != NULL; test++) { |
if (test->safe) { |
printf("%s (%s)\n", test->name, test->desc); |
if (run_test(test)) |
i++; |
else |
95,52 → 92,61 |
n++; |
} |
} |
printf("\nCompleted, %u tests run, %u passed.\n", i + n, i); |
printf("\nSafe tests completed, %u tests run, %u passed.\n\n", i + n, i); |
} |
static void list_tests(void) |
{ |
size_t len = 0; |
test_t *test; |
for (test = tests; test->name != NULL; test++) { |
if (str_length(test->name) > len) |
len = str_length(test->name); |
} |
char c = 'a'; |
for (test = tests; test->name != NULL; test++) |
printf("%-*s %s%s\n", len, test->name, test->desc, (test->safe ? "" : " (unsafe)")); |
for (test = tests; test->name != NULL; test++, c++) |
printf("%c\t%s\t\t%s%s\n", c, test->name, test->desc, (test->safe ? "" : " (unsafe)")); |
printf("%-*s Run all safe tests\n", len, "*"); |
printf("*\t\t\tRun all safe tests\n"); |
} |
int main(int argc, char *argv[]) |
int main(int argc, char **argv) |
{ |
if (argc < 2) { |
printf("Usage:\n\n"); |
printf("%s <test> [args ...]\n\n", argv[0]); |
printf("Number of arguments: %d\n", argc); |
if (argv) { |
printf("Arguments:"); |
while (*argv) { |
printf(" '%s'", *argv++); |
} |
printf("\n"); |
} |
while (1) { |
char c; |
test_t *test; |
list_tests(); |
return 0; |
} |
test_quiet = false; |
test_argc = argc - 2; |
test_argv = argv + 2; |
if (str_cmp(argv[1], "*") == 0) { |
run_safe_tests(); |
return 0; |
} |
test_t *test; |
for (test = tests; test->name != NULL; test++) { |
if (str_cmp(argv[1], test->name) == 0) { |
return (run_test(test) ? 0 : -1); |
printf("> "); |
c = getchar(); |
printf("%c\n", c); |
if ((c >= 'a') && (c <= 'z')) { |
for (test = tests; test->name != NULL; test++, c--) |
if (c == 'a') |
break; |
if (test->name == NULL) |
printf("Unknown test\n\n"); |
else |
run_test(test); |
} else if (c == '*') { |
run_safe_tests(); |
} else if (c < 0) { |
/* got EOF */ |
break; |
} else { |
printf("Invalid test\n\n"); |
} |
} |
printf("Unknown test \"%s\"\n", argv[1]); |
return -2; |
} |
/** @} |
/branches/arm/uspace/app/tester/Makefile |
---|
31,7 → 31,6 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -I../../srv/kbd/include |
45,20 → 44,16 |
SOURCES = tester.c \ |
thread/thread1.c \ |
print/print1.c \ |
print/print2.c \ |
print/print3.c \ |
print/print4.c \ |
console/console1.c \ |
stdio/stdio1.c \ |
stdio/stdio2.c \ |
fault/fault1.c \ |
fault/fault2.c \ |
vfs/vfs1.c \ |
ipc/ping_pong.c \ |
ipc/register.c \ |
ipc/connect.c \ |
loop/loop1.c \ |
mm/malloc1.c |
ipc/send_async.c \ |
ipc/send_sync.c \ |
ipc/answer.c \ |
ipc/hangup.c \ |
devmap/devmap1.c \ |
vfs/vfs1.c |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
69,18 → 64,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/app/tester/devmap/devmap1.c |
---|
0,0 → 1,324 |
/* |
* Copyright (c) 2007 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <stdio.h> |
#include <unistd.h> |
#include <ipc/ipc.h> |
#include <ipc/services.h> |
#include <async.h> |
#include <errno.h> |
#include <ipc/devmap.h> |
#include "../tester.h" |
#include <time.h> |
#define TEST_DEVICE1 "TestDevice1" |
#define TEST_DEVICE2 "TestDevice2" |
/** Handle requests from clients |
* |
*/ |
static void driver_client_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
ipc_callid_t callid; |
ipc_call_t call; |
int retval; |
printf("connected: method=%u arg1=%u, arg2=%u arg3=%u.\n", |
IPC_GET_METHOD(*icall), IPC_GET_ARG1(*icall), IPC_GET_ARG2(*icall), |
IPC_GET_ARG3(*icall)); |
printf("driver_client_connection.\n"); |
ipc_answer_0(iid, EOK); |
/* Ignore parameters, the connection is already opened */ |
while (1) { |
callid = async_get_call(&call); |
retval = EOK; |
printf("method=%u arg1=%u, arg2=%u arg3=%u.\n", |
IPC_GET_METHOD(call), IPC_GET_ARG1(call), |
IPC_GET_ARG2(call), IPC_GET_ARG3(call)); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
/* TODO: Handle hangup */ |
return; |
default: |
printf("Unknown device method %u.\n", |
IPC_GET_METHOD(call)); |
retval = ENOENT; |
} |
ipc_answer_0(callid, retval); |
} |
return; |
} |
static int device_client_fibril(void *arg) |
{ |
int handle; |
int device_phone; |
handle = (int)arg; |
device_phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
DEVMAP_CONNECT_TO_DEVICE, handle); |
if (device_phone < 0) { |
printf("Failed to connect to devmap as client (handle = %u).\n", |
handle); |
return -1; |
} |
/* |
* device_phone = (int) IPC_GET_ARG5(answer); |
*/ |
printf("Connected to device.\n"); |
ipc_call_sync_1_0(device_phone, 1024, 1025); |
/* |
* ipc_hangup(device_phone); |
*/ |
ipc_hangup(device_phone); |
return EOK; |
} |
/** Communication test with device. |
* @param handle handle to tested instance. |
*/ |
static int device_client(int handle) |
{ |
/* fid_t fid; |
ipc_call_t call; |
ipc_callid_t callid; |
fid = fibril_create(device_client_fibril, (void *)handle); |
fibril_add_ready(fid); |
*/ |
return EOK; |
} |
/** |
* |
*/ |
static int driver_register(char *name) |
{ |
ipcarg_t retval; |
aid_t req; |
ipc_call_t answer; |
int phone; |
ipcarg_t callback_phonehash; |
phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_DRIVER, 0); |
while (phone < 0) { |
usleep(100000); |
phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, |
DEVMAP_DRIVER, 0); |
} |
req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer); |
retval = ipc_data_write_start(phone, (char *)name, strlen(name) + 1); |
if (retval != EOK) { |
async_wait_for(req, NULL); |
return -1; |
} |
async_set_client_connection(driver_client_connection); |
ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash); |
/* |
if (NULL == async_new_connection(callback_phonehash, 0, NULL, |
driver_client_connection)) { |
printf("Failed to create new fibril.\n"); |
async_wait_for(req, NULL); |
return -1; |
} |
*/ |
async_wait_for(req, &retval); |
printf("Driver '%s' registered.\n", name); |
return phone; |
} |
static int device_get_handle(int driver_phone, char *name, int *handle) |
{ |
ipcarg_t retval; |
aid_t req; |
ipc_call_t answer; |
req = async_send_2(driver_phone, DEVMAP_DEVICE_GET_HANDLE, 0, 0, |
&answer); |
retval = ipc_data_write_start(driver_phone, name, strlen(name) + 1); |
if (retval != EOK) { |
printf("Failed to send device name '%s'.\n", name); |
async_wait_for(req, NULL); |
return retval; |
} |
async_wait_for(req, &retval); |
if (NULL != handle) { |
*handle = -1; |
} |
if (EOK == retval) { |
if (NULL != handle) { |
*handle = (int) IPC_GET_ARG1(answer); |
} |
printf("Device '%s' has handle %u.\n", name, |
(int) IPC_GET_ARG1(answer)); |
} else { |
printf("Failed to get handle for device '%s'.\n", name); |
} |
return retval; |
} |
/** Register new device. |
* @param driver_phone |
* @param name Device name. |
* @param handle Output variable. Handle to the created instance of device. |
*/ |
static int device_register(int driver_phone, char *name, int *handle) |
{ |
ipcarg_t retval; |
aid_t req; |
ipc_call_t answer; |
req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0, &answer); |
retval = ipc_data_write_start(driver_phone, (char *)name, |
strlen(name) + 1); |
if (retval != EOK) { |
printf("Failed to send device name '%s'.\n", name); |
async_wait_for(req, NULL); |
return retval; |
} |
async_wait_for(req, &retval); |
if (NULL != handle) { |
*handle = -1; |
} |
if (EOK == retval) { |
if (NULL != handle) { |
*handle = (int) IPC_GET_ARG1(answer); |
} |
printf("Device registered with handle %u.\n", |
(int) IPC_GET_ARG1(answer)); |
} |
return retval; |
} |
/** Test DevMap from the driver's point of view. |
* |
* |
*/ |
char * test_devmap1(bool quiet) |
{ |
int driver_phone; |
int dev1_handle; |
int dev2_handle; |
int dev3_handle; |
int handle; |
/* Register new driver */ |
driver_phone = driver_register("TestDriver"); |
if (driver_phone < 0) { |
return "Error: Cannot register driver.\n"; |
} |
/* Register new device dev1*/ |
if (EOK != device_register(driver_phone, TEST_DEVICE1, &dev1_handle)) { |
ipc_hangup(driver_phone); |
return "Error: cannot register device.\n"; |
} |
/* Get handle for dev2 (Should fail unless device is already |
* registered by someone else) |
*/ |
if (EOK == device_get_handle(driver_phone, TEST_DEVICE2, &handle)) { |
ipc_hangup(driver_phone); |
return "Error: got handle for dev2 before it was registered.\n"; |
} |
/* Register new device dev2*/ |
if (EOK != device_register(driver_phone, TEST_DEVICE2, &dev2_handle)) { |
ipc_hangup(driver_phone); |
return "Error: cannot register device dev2.\n"; |
} |
/* Register again device dev1 */ |
if (EOK == device_register(driver_phone, TEST_DEVICE1, &dev3_handle)) { |
return "Error: dev1 registered twice.\n"; |
} |
/* Get handle for dev1*/ |
if (EOK != device_get_handle(driver_phone, TEST_DEVICE1, &handle)) { |
ipc_hangup(driver_phone); |
return "Error: cannot get handle for 'DEVMAP_DEVICE1'.\n"; |
} |
if (handle != dev1_handle) { |
ipc_hangup(driver_phone); |
return "Error: cannot get handle for 'DEVMAP_DEVICE1'.\n"; |
} |
if (EOK != device_client(dev1_handle)) { |
ipc_hangup(driver_phone); |
return "Error: failed client test for 'DEVMAP_DEVICE1'.\n"; |
} |
/* TODO: */ |
ipc_hangup(driver_phone); |
return NULL; |
} |
char *test_devmap2(bool quiet) |
{ |
/*TODO: Full automatic test */ |
return NULL; |
} |
char *test_devmap3(bool quiet) |
{ |
/* TODO: allow user to call test functions in random order */ |
return NULL; |
} |
/branches/arm/uspace/app/tester/devmap/devmap1.def |
---|
0,0 → 1,6 |
{ |
"devmap1", |
"DevMap test", |
&test_devmap1, |
true |
}, |
/branches/arm/uspace/app/tester/vfs/vfs1.c |
---|
34,118 → 34,109 |
#include <unistd.h> |
#include <fcntl.h> |
#include <dirent.h> |
#include <devmap.h> |
#include <sys/types.h> |
#include <sys/stat.h> |
#include "../tester.h" |
#define FS_TYPE "tmpfs" |
#define MOUNT_POINT "/tmp" |
#define OPTIONS "" |
#define FLAGS 0 |
char text[] = "O xein', angellein Lakedaimoniois hoti teide " |
"keimetha tois keinon rhemasi peithomenoi."; |
#define TEST_DIRECTORY MOUNT_POINT "/testdir" |
#define TEST_FILE TEST_DIRECTORY "/testfile" |
#define TEST_FILE2 TEST_DIRECTORY "/nextfile" |
#define MAX_DEVICE_NAME 32 |
#define BUF_SIZE 16 |
static char text[] = "Lorem ipsum dolor sit amet, consectetur adipisicing elit"; |
static char *read_root(void) |
char *test_vfs1(bool quiet) |
{ |
TPRINTF("Opening the root directory..."); |
DIR *dirp = opendir("/"); |
if (!dirp) { |
TPRINTF("\n"); |
return "opendir() failed"; |
} else |
TPRINTF("OK\n"); |
struct dirent *dp; |
while ((dp = readdir(dirp))) |
TPRINTF(" node \"%s\"\n", dp->d_name); |
closedir(dirp); |
return NULL; |
} |
int rc; |
char *test_vfs1(void) |
{ |
if (mkdir(MOUNT_POINT, 0) != 0) |
return "mkdir() failed"; |
TPRINTF("Created directory %s\n", MOUNT_POINT); |
char null[MAX_DEVICE_NAME]; |
int null_id = devmap_null_create(); |
if (null_id == -1) |
return "Unable to create null device"; |
snprintf(null, MAX_DEVICE_NAME, "null%d", null_id); |
int rc = mount(FS_TYPE, MOUNT_POINT, null, OPTIONS, FLAGS); |
rc = mount("tmpfs", "/", "nulldev0"); |
switch (rc) { |
case EOK: |
TPRINTF("Mounted /dev/%s as %s on %s\n", null, FS_TYPE, MOUNT_POINT); |
if (!quiet) |
printf("mounted tmpfs on /\n"); |
break; |
case EBUSY: |
TPRINTF("(INFO) Filesystem already mounted on %s\n", MOUNT_POINT); |
if (!quiet) |
printf("(INFO) something is already mounted on /\n"); |
break; |
default: |
TPRINTF("(ERR) IPC returned errno %d (is tmpfs loaded?)\n", rc); |
return "mount() failed"; |
if (!quiet) |
printf("(INFO) IPC returned errno %d\n", rc); |
return "mount() failed."; |
} |
if (mkdir("/mydir", 0) != 0) |
return "mkdir() failed.\n"; |
if (!quiet) |
printf("created directory /mydir\n"); |
if (mkdir(TEST_DIRECTORY, 0) != 0) |
return "mkdir() failed"; |
TPRINTF("Created directory %s\n", TEST_DIRECTORY); |
int fd0 = open(TEST_FILE, O_CREAT); |
int fd0 = open("/mydir/myfile", O_CREAT); |
if (fd0 < 0) |
return "open() failed"; |
TPRINTF("Created file %s (fd=%d)\n", TEST_FILE, fd0); |
return "open() failed.\n"; |
if (!quiet) |
printf("created file /mydir/myfile, fd=%d\n", fd0); |
ssize_t cnt; |
size_t size = sizeof(text); |
ssize_t cnt = write(fd0, text, size); |
cnt = write(fd0, text, size); |
if (cnt < 0) |
return "write() failed"; |
TPRINTF("Written %d bytes\n", cnt); |
return "write() failed.\n"; |
if (!quiet) |
printf("written %d bytes, fd=%d\n", cnt, fd0); |
if (lseek(fd0, 0, SEEK_SET) != 0) |
return "lseek() failed"; |
TPRINTF("Sought to position 0\n"); |
char buf[BUF_SIZE]; |
while ((cnt = read(fd0, buf, BUF_SIZE))) { |
return "lseek() failed.\n"; |
if (!quiet) |
printf("sought to position 0, fd=%d\n", fd0); |
char buf[10]; |
while ((cnt = read(fd0, buf, sizeof(buf)))) { |
if (cnt < 0) |
return "read() failed"; |
TPRINTF("Read %d bytes: \".*s\"\n", cnt, cnt, buf); |
return "read() failed.\n"; |
if (!quiet) |
printf("read %d bytes: \"%.*s\", fd=%d\n", cnt, cnt, |
buf, fd0); |
} |
close(fd0); |
DIR *dirp; |
struct dirent *dp; |
if (!quiet) |
printf("scanning the root directory...\n"); |
dirp = opendir("/"); |
if (!dirp) |
return "opendir() failed\n"; |
while ((dp = readdir(dirp))) |
printf("discovered node %s in /\n", dp->d_name); |
closedir(dirp); |
if (rename("/mydir/myfile", "/mydir/yourfile")) |
return "rename() failed.\n"; |
if (!quiet) |
printf("renamed /mydir/myfile to /mydir/yourfile\n"); |
if (unlink("/mydir/yourfile")) |
return "unlink() failed.\n"; |
char *rv = read_root(); |
if (rv != NULL) |
return rv; |
if (!quiet) |
printf("unlinked file /mydir/yourfile\n"); |
if (rmdir("/mydir")) |
return "rmdir() failed.\n"; |
if (!quiet) |
printf("removed directory /mydir\n"); |
if (rename(TEST_FILE, TEST_FILE2)) |
return "rename() failed"; |
TPRINTF("Renamed %s to %s\n", TEST_FILE, TEST_FILE2); |
if (unlink(TEST_FILE2)) |
return "unlink() failed"; |
TPRINTF("Unlinked %s\n", TEST_FILE2); |
if (rmdir(TEST_DIRECTORY)) |
return "rmdir() failed"; |
TPRINTF("Removed directory %s\n", TEST_DIRECTORY); |
rv = read_root(); |
if (rv != NULL) |
return rv; |
if (!quiet) |
printf("scanning the root directory...\n"); |
dirp = opendir("/"); |
if (!dirp) |
return "opendir() failed\n"; |
while ((dp = readdir(dirp))) |
printf("discovered node %s in /\n", dp->d_name); |
closedir(dirp); |
return NULL; |
} |
/branches/arm/uspace/app/tester/ipc/ping_pong.c |
---|
File deleted |
/branches/arm/uspace/app/tester/ipc/ping_pong.def |
---|
File deleted |
/branches/arm/uspace/app/tester/ipc/hangup.c |
---|
0,0 → 1,53 |
/* |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <stdio.h> |
#include <unistd.h> |
#include <errno.h> |
#include "../tester.h" |
char * test_hangup(bool quiet) |
{ |
char c; |
int res; |
int phoneid; |
printf("Select phoneid to hangup: 2-9 (q to skip)\n"); |
do { |
c = getchar(); |
if ((c == 'Q') || (c == 'q')) |
return TEST_SKIPPED; |
} while (c < '2' || c > '9'); |
phoneid = c - '0'; |
printf("Hanging up..."); |
res = ipc_hangup(phoneid); |
printf("done: %d\n", phoneid); |
return NULL; |
} |
/branches/arm/uspace/app/tester/ipc/send_sync.c |
---|
0,0 → 1,54 |
/* |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <stdio.h> |
#include <unistd.h> |
#include "../tester.h" |
#include <ipc/ipc.h> |
char * test_send_sync(bool quiet) |
{ |
int phoneid; |
int res; |
static int msgid = 1; |
char c; |
printf("Select phoneid to send msg: 2-9 (q to skip)\n"); |
do { |
c = getchar(); |
if ((c == 'Q') || (c == 'q')) |
return TEST_SKIPPED; |
} while (c < '2' || c > '9'); |
phoneid = c - '0'; |
printf("Sending msg..."); |
res = ipc_call_sync_0_0(phoneid, 2000); |
printf("done: %d\n", res); |
return NULL; |
} |
/branches/arm/uspace/app/tester/ipc/send_async.c |
---|
0,0 → 1,57 |
/* |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <stdio.h> |
#include <unistd.h> |
#include "../tester.h" |
static void callback(void *_private, int retval, ipc_call_t *data) |
{ |
printf("Received response to msg %d - retval: %d.\n", _private, retval); |
} |
char * test_send_async(bool quiet) |
{ |
int phoneid; |
static int msgid = 1; |
char c; |
printf("Select phoneid to send msg: 2-9 (q to skip)\n"); |
do { |
c = getchar(); |
if ((c == 'Q') || (c == 'q')) |
return TEST_SKIPPED; |
} while (c < '2' || c > '9'); |
phoneid = c - '0'; |
ipc_call_async_0(phoneid, 2000, (void *) msgid, callback, 1); |
printf("Async sent - msg %d\n", msgid); |
msgid++; |
return NULL; |
} |
/branches/arm/uspace/app/tester/ipc/connect.c |
---|
28,46 → 28,32 |
#include <stdio.h> |
#include <unistd.h> |
#include <atomic.h> |
#include "../tester.h" |
static atomic_t finish; |
static void callback(void *priv, int retval, ipc_call_t *data) |
char * test_connect(bool quiet) |
{ |
atomic_set(&finish, 1); |
} |
char c; |
int svc; |
int phid; |
char *test_connect(void) |
{ |
TPRINTF("Connecting to %u...", IPC_TEST_SERVICE); |
int phone = ipc_connect_me_to(PHONE_NS, IPC_TEST_SERVICE, 0, 0); |
if (phone > 0) { |
TPRINTF("phoneid %d\n", phone); |
} else { |
TPRINTF("\n"); |
return "ipc_connect_me_to() failed"; |
} |
printf("Choose one service: 0:10000....9:10009 (q to skip)\n"); |
do { |
c = getchar(); |
if ((c == 'Q') || (c == 'q')) |
return TEST_SKIPPED; |
} while (c < '0' || c > '9'); |
printf("Sending synchronous message...\n"); |
int retval = ipc_call_sync_0_0(phone, IPC_TEST_METHOD); |
TPRINTF("Received response to synchronous message\n"); |
svc = IPC_TEST_START + c - '0'; |
if (svc == myservice) |
return "Currently cannot connect to myself, update test"; |
TPRINTF("Sending asynchronous message...\n"); |
atomic_set(&finish, 0); |
ipc_call_async_0(phone, IPC_TEST_METHOD, NULL, callback, 1); |
while (atomic_get(&finish) != 1) |
TPRINTF("."); |
TPRINTF("Received response to asynchronous message\n"); |
printf("Connecting to %d..", svc); |
phid = ipc_connect_me_to(PHONE_NS, svc, 0, 0); |
if (phid > 0) { |
printf("phoneid: %d\n", phid); |
phones[phid] = 1; |
} else |
return "Error"; |
TPRINTF("Hanging up..."); |
retval = ipc_hangup(phone); |
if (retval == 0) { |
TPRINTF("OK\n"); |
} else { |
TPRINTF("\n"); |
return "ipc_hangup() failed"; |
} |
return NULL; |
} |
/branches/arm/uspace/app/tester/ipc/register.c |
---|
32,58 → 32,58 |
#include <errno.h> |
#include "../tester.h" |
#define MAX_CONNECTIONS 50 |
static int connections[MAX_CONNECTIONS]; |
static void client_connection(ipc_callid_t iid, ipc_call_t *icall) |
{ |
unsigned int i; |
TPRINTF("Connected phone %#x accepting\n", icall->in_phone_hash); |
ipc_callid_t callid; |
ipc_call_t call; |
ipcarg_t phonehash = icall->in_phone_hash; |
int retval; |
int i; |
printf("Connected phone: %P, accepting\n", icall->in_phone_hash); |
ipc_answer_0(iid, EOK); |
for (i = 0; i < MAX_CONNECTIONS; i++) { |
for (i = 0; i < 1024; i++) |
if (!connections[i]) { |
connections[i] = icall->in_phone_hash; |
connections[i] = phonehash; |
break; |
} |
} |
while (true) { |
ipc_call_t call; |
ipc_callid_t callid = async_get_call(&call); |
int retval; |
while (1) { |
callid = async_get_call(&call); |
switch (IPC_GET_METHOD(call)) { |
case IPC_M_PHONE_HUNGUP: |
TPRINTF("Phone %#x hung up\n", icall->in_phone_hash); |
printf("Phone (%P) hung up.\n", phonehash); |
retval = 0; |
break; |
case IPC_TEST_METHOD: |
TPRINTF("Received well known message from %#x: %#x\n", |
icall->in_phone_hash, callid); |
ipc_answer_0(callid, EOK); |
break; |
default: |
TPRINTF("Received unknown message from %#x: %#x\n", |
icall->in_phone_hash, callid); |
ipc_answer_0(callid, ENOENT); |
break; |
printf("Received message from %P: %X\n", phonehash, |
callid); |
for (i = 0; i < 1024; i++) |
if (!callids[i]) { |
callids[i] = callid; |
break; |
} |
continue; |
} |
ipc_answer_0(callid, retval); |
} |
} |
char *test_register(void) |
char * test_register(bool quiet) |
{ |
int i; |
async_set_client_connection(client_connection); |
for (i = IPC_TEST_START; i < IPC_TEST_START + 10; i++) { |
ipcarg_t phonead; |
int res = ipc_connect_to_me(PHONE_NS, i, 0, 0, &phonead); |
if (!res) |
break; |
printf("Failed registering as %d..:%d\n", i, res); |
} |
printf("Registered as service: %d\n", i); |
myservice = i; |
ipcarg_t phonead; |
int res = ipc_connect_to_me(PHONE_NS, IPC_TEST_SERVICE, 0, 0, &phonead); |
if (res != 0) |
return "Failed registering IPC service"; |
TPRINTF("Registered as service %u, accepting connections\n", IPC_TEST_SERVICE); |
async_manager(); |
return NULL; |
} |
/branches/arm/uspace/app/tester/ipc/answer.c |
---|
0,0 → 1,76 |
/* |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#include <stdio.h> |
#include <unistd.h> |
#include <errno.h> |
#include "../tester.h" |
char * test_answer(bool quiet) |
{ |
int i,cnt, errn = 0; |
char c; |
cnt = 0; |
for (i = 0;i < 50; i++) { |
if (callids[i]) { |
printf("%d: %P\n", cnt, callids[i]); |
cnt++; |
} |
if (cnt >= 10) |
break; |
} |
if (!cnt) |
return NULL; |
printf("Choose message:\n"); |
do { |
c = getchar(); |
} while (c < '0' || (c-'0') >= cnt); |
cnt = c - '0' + 1; |
for (i = 0; cnt; i++) |
if (callids[i]) |
cnt--; |
i -= 1; |
printf("Normal (n) or hangup (h) or error(e) message?\n"); |
do { |
c = getchar(); |
} while (c != 'n' && c != 'h' && c != 'e'); |
if (c == 'n') |
errn = 0; |
else if (c == 'h') |
errn = EHANGUP; |
else if (c == 'e') |
errn = ENOENT; |
printf("Answering %P\n", callids[i]); |
ipc_answer_0(callids[i], errn); |
callids[i] = 0; |
return NULL; |
} |
/branches/arm/uspace/app/tester/ipc/hangup.def |
---|
0,0 → 1,6 |
{ |
"hangup", |
"IPC hangup test", |
&test_hangup, |
true |
}, |
/branches/arm/uspace/app/tester/ipc/send_sync.def |
---|
0,0 → 1,6 |
{ |
"send_sync", |
"IPC send sync message test", |
&test_send_sync, |
true |
}, |
/branches/arm/uspace/app/tester/ipc/send_async.def |
---|
0,0 → 1,6 |
{ |
"send_async", |
"IPC send async message test", |
&test_send_async, |
true |
}, |
/branches/arm/uspace/app/tester/ipc/answer.def |
---|
0,0 → 1,6 |
{ |
"answer", |
"IPC answer message test", |
&test_answer, |
true |
}, |
/branches/arm/uspace/app/tester/tester.h |
---|
39,45 → 39,37 |
#include <bool.h> |
#include <ipc/ipc.h> |
#define IPC_TEST_SERVICE 10240 |
#define IPC_TEST_METHOD 2000 |
#define IPC_TEST_START 10000 |
#define MAX_PHONES 20 |
#define MAX_CONNECTIONS 50 |
#define TEST_SKIPPED "Test Skipped" |
extern bool test_quiet; |
extern int test_argc; |
extern char **test_argv; |
extern int myservice; |
extern int phones[MAX_PHONES]; |
extern int connections[MAX_CONNECTIONS]; |
extern ipc_callid_t callids[MAX_CONNECTIONS]; |
#define TPRINTF(format, ...) \ |
{ \ |
if (!test_quiet) { \ |
fprintf(stderr, format, ##__VA_ARGS__); \ |
} \ |
} |
typedef char * (* test_entry_t)(bool); |
typedef char *(*test_entry_t)(void); |
typedef struct { |
char *name; |
char *desc; |
char * name; |
char * desc; |
test_entry_t entry; |
bool safe; |
} test_t; |
extern char *test_thread1(void); |
extern char *test_print1(void); |
extern char *test_print2(void); |
extern char *test_print3(void); |
extern char *test_print4(void); |
extern char *test_console1(void); |
extern char *test_stdio1(void); |
extern char *test_stdio2(void); |
extern char *test_fault1(void); |
extern char *test_fault2(void); |
extern char *test_vfs1(void); |
extern char *test_ping_pong(void); |
extern char *test_register(void); |
extern char *test_connect(void); |
extern char *test_loop1(void); |
extern char *test_malloc1(void); |
extern char * test_thread1(bool quiet); |
extern char * test_print1(bool quiet); |
extern char * test_fault1(bool quiet); |
extern char * test_fault2(bool quiet); |
extern char * test_register(bool quiet); |
extern char * test_connect(bool quiet); |
extern char * test_send_async(bool quiet); |
extern char * test_send_sync(bool quiet); |
extern char * test_answer(bool quiet); |
extern char * test_hangup(bool quiet); |
extern char * test_devmap1(bool quiet); |
extern char * test_vfs1(bool quiet); |
extern test_t tests[]; |
/branches/arm/uspace/app/tester/thread/thread1.c |
---|
27,8 → 27,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
#define THREADS 20 |
#define DELAY 10 |
#define THREADS 5 |
#include <atomic.h> |
#include <thread.h> |
43,38 → 42,40 |
static void threadtest(void *data) |
{ |
thread_detach(thread_get_id()); |
while (atomic_get(&finish)) |
while (atomic_get(&finish)) { |
if (!sh_quiet) |
printf("%llu ", thread_get_id()); |
usleep(100000); |
} |
atomic_inc(&threads_finished); |
} |
char *test_thread1(void) |
char * test_thread1(bool quiet) |
{ |
unsigned int i; |
unsigned int total = 0; |
unsigned int i, total = 0; |
sh_quiet = quiet; |
atomic_set(&finish, 1); |
atomic_set(&threads_finished, 0); |
TPRINTF("Creating threads"); |
for (i = 0; i < THREADS; i++) { |
for (i = 0; i < THREADS; i++) { |
if (thread_create(threadtest, NULL, "threadtest", NULL) < 0) { |
TPRINTF("\nCould not create thread %u\n", i); |
if (!quiet) |
printf("Could not create thread %d\n", i); |
break; |
} |
TPRINTF("."); |
total++; |
} |
TPRINTF("\nRunning threads for %u seconds...", DELAY); |
sleep(DELAY); |
TPRINTF("\n"); |
if (!quiet) |
printf("Running threads for 10 seconds...\n"); |
sleep(10); |
atomic_set(&finish, 0); |
while (atomic_get(&threads_finished) < total) { |
TPRINTF("Threads left: %u\n", total - atomic_get(&threads_finished)); |
if (!quiet) |
printf("Threads left: %d\n", total - atomic_get(&threads_finished)); |
sleep(1); |
} |
/branches/arm/uspace/app/tester/fault/fault1.c |
---|
29,7 → 29,7 |
#include "../tester.h" |
char *test_fault1(void) |
char * test_fault1(bool quiet) |
{ |
((int *)(0))[1] = 0; |
/branches/arm/uspace/app/tester/fault/fault2.c |
---|
29,7 → 29,7 |
#include "../tester.h" |
char *test_fault2(void) |
char * test_fault2(bool quiet) |
{ |
volatile long long var; |
volatile int var1; |
/branches/arm/uspace/app/tester/print/print2.def |
---|
File deleted |
/branches/arm/uspace/app/tester/print/print3.def |
---|
File deleted |
/branches/arm/uspace/app/tester/print/print4.def |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/uspace/app/tester/print/print2.c |
---|
File deleted |
/branches/arm/uspace/app/tester/print/print3.c |
---|
File deleted |
/branches/arm/uspace/app/tester/print/print4.c |
---|
File deleted |
Property changes: |
Deleted: svn:mergeinfo |
/branches/arm/uspace/app/tester/print/print1.def |
---|
1,6 → 1,6 |
{ |
"print1", |
"String printf test", |
"Printf test", |
&test_print1, |
true |
}, |
/branches/arm/uspace/app/tester/print/print1.c |
---|
30,27 → 30,44 |
#include <unistd.h> |
#include "../tester.h" |
char *test_print1(void) |
#define BUFFER_SIZE 32 |
char * test_print1(bool quiet) |
{ |
TPRINTF("Testing printf(\"%%*.*s\", 5, 3, \"text\"):\n"); |
TPRINTF("Expected output: \" tex\"\n"); |
TPRINTF("Real output: \"%*.*s\"\n\n", 5, 3, "text"); |
if (!quiet) { |
int retval; |
unsigned int nat = 0x12345678u; |
char buffer[BUFFER_SIZE]; |
printf(" text 10.8s %*.*s \n", 5, 3, "text"); |
printf(" very long text 10.8s %10.8s \n", "very long text"); |
printf(" text 8.10s %8.10s \n", "text"); |
printf(" very long text 8.10s %8.10s \n", "very long text"); |
printf(" char: c '%c', 3.2c '%3.2c', -3.2c '%-3.2c', 2.3c '%2.3c', -2.3c '%-2.3c' \n",'a', 'b', 'c', 'd', 'e' ); |
printf(" int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n",1, 1, 1, 1, 1 ); |
printf(" -int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n",-1, -1, -1, -1, -1 ); |
printf(" 0xint: x '%#x', 5.3x '%#5.3x', -5.3x '%#-5.3x', 3.5x '%#3.5x', -3.5x '%#-3.5x' \n",17, 17, 17, 17, 17 ); |
printf("'%#llx' 64bit, '%#x' 32bit, '%#hhx' 8bit, '%#hx' 16bit, unative_t '%#zx'. '%#llx' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, nat, 0x1234567887654321ull, "Lovely string" ); |
printf(" Print to NULL '%s'\n", NULL); |
retval = snprintf(buffer, BUFFER_SIZE, "Short text without parameters."); |
printf("Result is: '%s', retval = %d\n", buffer, retval); |
retval = snprintf(buffer, BUFFER_SIZE, "Very very very long text without parameters."); |
printf("Result is: '%s', retval = %d\n", buffer, retval); |
printf("Print short text to %d char long buffer via snprintf.\n", BUFFER_SIZE); |
retval = snprintf(buffer, BUFFER_SIZE, "Short %s", "text"); |
printf("Result is: '%s', retval = %d\n", buffer, retval); |
printf("Print long text to %d char long buffer via snprintf.\n", BUFFER_SIZE); |
retval = snprintf(buffer, BUFFER_SIZE, "Very long %s. This text`s length is more than %d. We are interested in the result.", "text" , BUFFER_SIZE); |
printf("Result is: '%s', retval = %d\n", buffer, retval); |
} |
TPRINTF("Testing printf(\"%%10.8s\", \"very long text\"):\n"); |
TPRINTF("Expected output: \" very lon\"\n"); |
TPRINTF("Real output: \"%10.8s\"\n\n", "very long text"); |
TPRINTF("Testing printf(\"%%8.10s\", \"text\"):\n"); |
TPRINTF("Expected output: \"text\"\n"); |
TPRINTF("Real output: \"%8.10s\"\n\n", "text"); |
TPRINTF("Testing printf(\"%%8.10s\", \"very long text\"):\n"); |
TPRINTF("Expected output: \"very long \"\n"); |
TPRINTF("Real output: \"%8.10s\"\n\n", "very long text"); |
TPRINTF("Testing printf(\"%%s\", NULL):\n"); |
TPRINTF("Expected output: \"(NULL)\"\n"); |
TPRINTF("Real output: \"%s\"\n\n", NULL); |
return NULL; |
} |
/branches/arm/uspace/app/init/init.c |
---|
27,9 → 27,9 |
*/ |
/** @addtogroup init Init |
* @brief Init process for user space environment configuration. |
* @brief Init process for testing purposes. |
* @{ |
*/ |
*/ |
/** |
* @file |
*/ |
36,91 → 36,46 |
#include <stdio.h> |
#include <unistd.h> |
#include <ipc/ipc.h> |
#include <vfs/vfs.h> |
#include <bool.h> |
#include <errno.h> |
#include <fcntl.h> |
#include <sys/stat.h> |
#include <task.h> |
#include <malloc.h> |
#include <macros.h> |
#include <string.h> |
#include <devmap.h> |
#include "init.h" |
#include "version.h" |
static void info_print(void) |
static void console_wait(void) |
{ |
printf(NAME ": HelenOS init\n"); |
while (get_cons_phone() < 0) |
usleep(50000); // FIXME |
} |
static bool mount_root(const char *fstype) |
static bool mount_fs(const char *fstype) |
{ |
char *opts = ""; |
const char *root_dev = "initrd"; |
int rc = -1; |
if (str_cmp(fstype, "tmpfs") == 0) |
opts = "restore"; |
int rc = mount(fstype, "/", root_dev, opts, IPC_FLAG_BLOCKING); |
switch (rc) { |
case EOK: |
printf(NAME ": Root filesystem mounted, %s at %s\n", |
fstype, root_dev); |
break; |
case EBUSY: |
printf(NAME ": Root filesystem already mounted\n"); |
return false; |
case ELIMIT: |
printf(NAME ": Unable to mount root filesystem\n"); |
return false; |
case ENOENT: |
printf(NAME ": Unknown filesystem type (%s)\n", fstype); |
return false; |
default: |
printf(NAME ": Error mounting root filesystem (%d)\n", rc); |
return false; |
} |
return true; |
} |
while (rc < 0) { |
rc = mount(fstype, "/", "initrd"); |
static bool mount_devfs(void) |
{ |
char null[MAX_DEVICE_NAME]; |
int null_id = devmap_null_create(); |
if (null_id == -1) { |
printf(NAME ": Unable to create null device\n"); |
return false; |
switch (rc) { |
case EOK: |
printf(NAME ": Root filesystem mounted\n"); |
break; |
case EBUSY: |
printf(NAME ": Root filesystem already mounted\n"); |
break; |
case ELIMIT: |
printf(NAME ": Unable to mount root filesystem\n"); |
return false; |
case ENOENT: |
printf(NAME ": Unknown filesystem type (%s)\n", fstype); |
return false; |
default: |
sleep(5); // FIXME |
} |
} |
snprintf(null, MAX_DEVICE_NAME, "null%d", null_id); |
int rc = mount("devfs", "/dev", null, "", IPC_FLAG_BLOCKING); |
switch (rc) { |
case EOK: |
printf(NAME ": Device filesystem mounted\n"); |
break; |
case EBUSY: |
printf(NAME ": Device filesystem already mounted\n"); |
devmap_null_destroy(null_id); |
return false; |
case ELIMIT: |
printf(NAME ": Unable to mount device filesystem\n"); |
devmap_null_destroy(null_id); |
return false; |
case ENOENT: |
printf(NAME ": Unknown filesystem type (devfs)\n"); |
devmap_null_destroy(null_id); |
return false; |
default: |
printf(NAME ": Error mounting device filesystem (%d)\n", rc); |
devmap_null_destroy(null_id); |
return false; |
} |
return true; |
} |
127,132 → 82,37 |
static void spawn(char *fname) |
{ |
char *argv[2]; |
struct stat s; |
if (stat(fname, &s) == ENOENT) |
return; |
printf(NAME ": Spawning %s\n", fname); |
argv[0] = fname; |
argv[1] = NULL; |
if (!task_spawn(fname, argv)) |
printf(NAME ": Error spawning %s\n", fname); |
} |
static void srv_start(char *fname) |
{ |
char *argv[2]; |
task_id_t id; |
task_exit_t texit; |
int rc, retval; |
struct stat s; |
if (stat(fname, &s) == ENOENT) |
return; |
printf(NAME ": Starting %s\n", fname); |
argv[0] = fname; |
argv[1] = NULL; |
id = task_spawn(fname, argv); |
if (!id) { |
printf(NAME ": Error spawning %s\n", fname); |
return; |
} |
rc = task_wait(id, &texit, &retval); |
if (rc != EOK) { |
printf(NAME ": Error waiting for %s\n", fname); |
return; |
if (task_spawn(fname, argv) != 0) { |
/* Success */ |
sleep(1); |
} |
if (texit != TASK_EXIT_NORMAL || retval != 0) { |
printf(NAME ": Server %s failed to start (returned %d)\n", |
fname, retval); |
} |
} |
static void getvc(char *dev, char *app) |
{ |
char *argv[4]; |
char vc[MAX_DEVICE_NAME]; |
int rc; |
snprintf(vc, MAX_DEVICE_NAME, "/dev/%s", dev); |
printf(NAME ": Spawning getvc on %s\n", vc); |
dev_handle_t handle; |
rc = devmap_device_get_handle(dev, &handle, IPC_FLAG_BLOCKING); |
if (rc == EOK) { |
argv[0] = "/app/getvc"; |
argv[1] = vc; |
argv[2] = app; |
argv[3] = NULL; |
if (!task_spawn("/app/getvc", argv)) |
printf(NAME ": Error spawning getvc on %s\n", vc); |
} else { |
printf(NAME ": Error waiting on %s\n", vc); |
} |
} |
void mount_data(void) |
{ |
int rc; |
printf("Trying to mount disk0 on /data... "); |
fflush(stdout); |
rc = mount("fat", "/data", "disk0", "wtcache", 0); |
if (rc == EOK) |
printf("OK\n"); |
else |
printf("Failed\n"); |
} |
int main(int argc, char *argv[]) |
{ |
info_print(); |
sleep(5); // FIXME |
if (!mount_root(STRING(RDFMT))) { |
if (!mount_fs("tmpfs") && !mount_fs("fat")) { |
printf(NAME ": Exiting\n"); |
return -1; |
} |
spawn("/srv/devfs"); |
if (!mount_devfs()) { |
printf(NAME ": Exiting\n"); |
return -2; |
} |
// FIXME: spawn("/srv/pci"); |
spawn("/srv/fb"); |
spawn("/srv/kbd"); |
spawn("/srv/console"); |
spawn("/srv/fhc"); |
spawn("/srv/obio"); |
/* |
* Start these synchronously so that mount_data() can be |
* non-blocking. |
*/ |
srv_start("/srv/ata_bd"); |
srv_start("/srv/gxe_bd"); |
mount_data(); |
console_wait(); |
version_print(); |
getvc("vc0", "/app/bdsh"); |
getvc("vc1", "/app/bdsh"); |
getvc("vc2", "/app/bdsh"); |
getvc("vc3", "/app/bdsh"); |
getvc("vc4", "/app/bdsh"); |
getvc("vc5", "/app/bdsh"); |
getvc("vc6", "/app/klog"); |
spawn("/app/bdsh"); |
return 0; |
} |
/branches/arm/uspace/app/init/Makefile |
---|
26,22 → 26,36 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
include ../../../version |
include ../../Makefile.config |
## Setup toolchain |
# |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
CFLAGS += -I../../srv/kbd/include |
LIBS = $(LIBC_PREFIX)/libc.a |
DEFS += -DRELEASE=\"$(RELEASE)\" |
ifdef REVISION |
DEFS += "-DREVISION=\"$(REVISION)\"" |
endif |
ifdef TIMESTAMP |
DEFS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
endif |
## Sources |
# |
OUTPUT = init |
SOURCES = \ |
init.c |
init.c \ |
version.c |
OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) |
52,18 → 66,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/app/init/version.c |
---|
0,0 → 1,67 |
/* |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup init |
* @{ |
*/ |
/** |
* @file |
*/ |
#include <unistd.h> |
#include <stdio.h> |
#include "init.h" |
#include "version.h" |
char *release = RELEASE; |
#ifdef REVISION |
char *revision = ", revision " REVISION; |
#else |
char *revision = ""; |
#endif |
#ifdef TIMESTAMP |
char *timestamp = "\nBuilt on " TIMESTAMP; |
#else |
char *timestamp = ""; |
#endif |
void info_print(void) |
{ |
printf(NAME ": HelenOS init\n"); |
} |
/** Print version information. */ |
void version_print(void) |
{ |
printf("HelenOS init\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp); |
} |
/** @} |
*/ |
/branches/arm/uspace/app/init/init.h |
---|
28,7 → 28,7 |
/** @addtogroup init |
* @{ |
*/ |
*/ |
/** |
* @file |
*/ |
36,11 → 36,10 |
#ifndef __INIT_H__ |
#define __INIT_H__ |
#define NAME "init" |
#define NAME "init" |
#define MAX_DEVICE_NAME 32 |
#endif |
/** @} |
*/ |
/branches/arm/uspace/app/init/version.h |
---|
0,0 → 1,46 |
/* |
* Copyright (c) 2006 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup init |
* @{ |
*/ |
/** |
* @file |
*/ |
#ifndef __VERSION_H__ |
#define __VERSION_H__ |
extern void info_print(void); |
extern void version_print(void); |
#endif |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/input.c |
---|
36,7 → 36,7 |
*/ |
/** @addtogroup tetris |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
57,9 → 57,7 |
#include "tetris.h" |
#include <async.h> |
#include <vfs/vfs.h> |
#include <io/console.h> |
#include <ipc/console.h> |
#include "../../srv/console/console.h" |
/* return true iff the given timeval is positive */ |
#define TV_POS(tv) \ |
92,12 → 90,14 |
* Return 0 => no input, 1 => can read() from stdin |
* |
*/ |
int rwait(struct timeval *tvp) |
int |
rwait(struct timeval *tvp) |
{ |
struct timeval starttv, endtv, *s; |
static ipc_call_t charcall; |
ipcarg_t rc; |
int cons_phone; |
/* |
* Someday, select() will do this for us. |
* Just in case that day is now, and no one has |
109,15 → 109,14 |
s = &endtv; |
} else |
s = NULL; |
if (!lastchar) { |
again: |
if (!getchar_inprog) { |
getchar_inprog = async_send_0(fphone(stdin), |
CONSOLE_GET_EVENT, &charcall); |
cons_phone = get_cons_phone(); |
getchar_inprog = async_send_2(cons_phone, |
CONSOLE_GETCHAR, 0, 0, &charcall); |
} |
if (!s) |
if (!s) |
async_wait_for(getchar_inprog, &rc); |
else if (async_wait_timeout(getchar_inprog, &rc, s->tv_usec) == ETIMEOUT) { |
tvp->tv_sec = 0; |
124,25 → 123,19 |
tvp->tv_usec = 0; |
return (0); |
} |
getchar_inprog = 0; |
if (rc) |
if (rc) { |
stop("end of file, help"); |
if (IPC_GET_ARG1(charcall) == KEY_RELEASE) |
goto again; |
lastchar = IPC_GET_ARG4(charcall); |
} |
lastchar = IPC_GET_ARG1(charcall); |
} |
if (tvp) { |
/* since there is input, we may not have timed out */ |
(void) gettimeofday(&endtv, NULL); |
TV_SUB(&endtv, &starttv); |
TV_SUB(tvp, &endtv); /* adjust *tvp by elapsed time */ |
TV_SUB(tvp, &endtv); /* adjust *tvp by elapsed time */ |
} |
return 1; |
return (1); |
} |
/* |
149,10 → 142,11 |
* `sleep' for the current turn time (using select). |
* Eat any input that might be available. |
*/ |
void tsleep(void) |
void |
tsleep(void) |
{ |
struct timeval tv; |
tv.tv_sec = 0; |
tv.tv_usec = fallrate; |
while (TV_POS(&tv)) |
165,11 → 159,12 |
/* |
* getchar with timeout. |
*/ |
int tgetchar(void) |
int |
tgetchar(void) |
{ |
static struct timeval timeleft; |
char c; |
/* |
* Reset timeleft to fallrate whenever it is not positive. |
* In any case, wait to see if there is any input. If so, |
180,18 → 175,17 |
* Most of the hard work is done by rwait(). |
*/ |
if (!TV_POS(&timeleft)) { |
faster(); /* go faster */ |
faster(); /* go faster */ |
timeleft.tv_sec = 0; |
timeleft.tv_usec = fallrate; |
} |
if (!rwait(&timeleft)) |
return -1; |
return (-1); |
c = lastchar; |
lastchar = '\0'; |
return ((int) (unsigned char) c); |
return ((int)(unsigned char)c); |
} |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/Makefile |
---|
1,6 → 1,5 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
LIBS = $(LIBC_PREFIX)/libc.a |
19,7 → 18,7 |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o |
27,7 → 26,7 |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/app/tetris/scores.c |
---|
36,7 → 36,7 |
*/ |
/** @addtogroup tetris |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
48,18 → 48,21 |
* |
* Major whacks since then. |
*/ |
#include <errno.h> |
/* #include <err.h> */ |
/* #include <fcntl.h> */ |
/* #include <pwd.h> */ |
#include <stdio.h> |
/* #include <stdlib.h> */ |
#include <string.h> |
#include <io/console.h> |
#include <io/keycode.h> |
#include <vfs/vfs.h> |
#include <stdlib.h> |
#include <fcntl.h> |
#include <err.h> |
#include <time.h> |
/* #include <time.h> */ |
/* #include <term.h> */ |
/* #include <unistd.h> */ |
/* #include <sys/param.h> */ |
/* #include <sys/stat.h> */ |
/* #include <sys/types.h> */ |
#include "pathnames.h" |
#include "screen.h" |
#include "tetris.h" |
#include "scores.h" |
72,22 → 75,20 |
* As long as the scores are kept sorted, this is simply the first one at |
* that level. |
*/ |
#define NUMSPOTS (MAXHISCORES + 1) |
#define NLEVELS (MAXLEVEL + 1) |
#define NUMSPOTS (MAXHISCORES + 1) |
#define NLEVELS (MAXLEVEL + 1) |
/* static time_t now; */ |
/* static int nscores; */ |
/* static int gotscores; */ |
/* static struct highscore scores[NUMSPOTS]; */ |
static struct highscore scores[NUMSPOTS]; |
/** Copy from hiscore table score with index src to dest |
* |
*/ |
static void copyhiscore(int dest, int src) |
{ |
str_cpy(scores[dest].hs_name, STR_BOUNDS(MAXLOGNAME) + 1, |
scores[src].hs_name); |
scores[dest].hs_score = scores[src].hs_score; |
scores[dest].hs_level = scores[src].hs_level; |
} |
/* static int checkscores(struct highscore *, int); */ |
/* static int cmpscores(const void *, const void *); */ |
/* static void getscores(FILE **); */ |
/* static void printem(int, int, struct highscore *, int, const char *); */ |
/* static char *thisuser(void); */ |
void showscores(int firstgame) |
{ |
97,137 → 98,446 |
moveto(10, 0); |
printf("\tRank \tLevel \tName\t points\n"); |
printf("\t========================================================\n"); |
for (i = 0; i < NUMSPOTS - 1; i++) |
printf("\t%6d %6d %-16s %20d\n", |
i + 1, scores[i].hs_level, scores[i].hs_name, scores[i].hs_score); |
for (i = 0; i < NUMSPOTS - 1; i++) { |
printf("\t%6d %6d %-16s %20d\n", i+1, scores[i].hs_level, scores[i].hs_name, scores[i].hs_score); |
} |
if (!firstgame) { |
printf("\t========================================================\n"); |
printf("\t Last %6d %-16s %20d\n", |
scores[NUMSPOTS - 1].hs_level, scores[NUMSPOTS - 1].hs_name, scores[NUMSPOTS - 1].hs_score); |
printf("\t Last %6d %-16s %20d\n", scores[NUMSPOTS - 1].hs_level, scores[NUMSPOTS - 1].hs_name, scores[NUMSPOTS - 1].hs_score); |
} |
printf("\n\n\n\n\tPress any key to return to main menu."); |
getchar(); |
} |
/** Copy from hiscore table score with index src to dest |
* |
*/ |
static void copyhiscore(int dest, int src) |
{ |
strcpy(scores[dest].hs_name, scores[src].hs_name); |
scores[dest].hs_score = scores[src].hs_score; |
scores[dest].hs_level = scores[src].hs_level; |
} |
void insertscore(int score, int level) |
{ |
int i; |
int j; |
size_t off; |
console_event_t ev; |
int i,j; |
int key; |
clear_screen(); |
moveto(10, 10); |
moveto(10 , 10); |
puts("Insert your name: "); |
str_cpy(scores[NUMSPOTS - 1].hs_name, STR_BOUNDS(MAXLOGNAME) + 1, |
"Player"); |
strncpy(scores[NUMSPOTS - 1].hs_name, "Player", MAXLOGNAME); |
i = 6; |
off = 6; |
moveto(10 , 28); |
printf("%s%.*s", scores[NUMSPOTS - 1].hs_name, MAXLOGNAME-i, |
"........................................"); |
while (1) { |
fflush(stdout); |
if (!console_get_event(fphone(stdin), &ev)) |
exit(1); |
if (ev.type == KEY_RELEASE) |
continue; |
if (ev.key == KC_ENTER || ev.key == KC_NENTER) |
break; |
if (ev.key == KC_BACKSPACE) { |
if (i > 0) { |
wchar_t uc; |
--i; |
while (off > 0) { |
--off; |
size_t otmp = off; |
uc = str_decode(scores[NUMSPOTS - 1].hs_name, |
&otmp, STR_BOUNDS(MAXLOGNAME) + 1); |
if (uc != U_SPECIAL) |
break; |
} |
scores[NUMSPOTS - 1].hs_name[off] = '\0'; |
} |
} else if (ev.c != '\0') { |
if (i < (MAXLOGNAME - 1)) { |
if (chr_encode(ev.c, scores[NUMSPOTS - 1].hs_name, |
&off, STR_BOUNDS(MAXLOGNAME) + 1) == EOK) { |
++i; |
} |
scores[NUMSPOTS - 1].hs_name[off] = '\0'; |
} |
printf("%s%.*s",scores[NUMSPOTS - 1].hs_name,MAXLOGNAME-i,"........................................"); |
key = getchar(); |
while(key != '\n') { |
if (key == '\b') { |
if (i > 0) |
scores[NUMSPOTS - 1].hs_name[--i] = '\0'; |
} else { |
if (i < (MAXLOGNAME - 1)) |
scores[NUMSPOTS - 1].hs_name[i++] = key; |
scores[NUMSPOTS - 1].hs_name[i] = '\0'; |
} |
moveto(10, 28); |
printf("%s%.*s", scores[NUMSPOTS - 1].hs_name, MAXLOGNAME - i, |
"........................................"); |
moveto(10 , 28); |
printf("%s%.*s",scores[NUMSPOTS - 1].hs_name,MAXLOGNAME-i,"........................................"); |
key = getchar(); |
} |
scores[NUMSPOTS - 1].hs_score = score; |
scores[NUMSPOTS - 1].hs_score = score; |
scores[NUMSPOTS - 1].hs_level = level; |
i = NUMSPOTS - 1; |
i = NUMSPOTS-1; |
while ((i > 0) && (scores[i - 1].hs_score < score)) |
i--; |
for (j = NUMSPOTS - 2; j > i; j--) |
copyhiscore(j, j-1); |
copyhiscore(i, NUMSPOTS - 1); |
for (j = NUMSPOTS - 2; j > i; j--) { |
copyhiscore(j,j-1); |
} |
copyhiscore(i, NUMSPOTS - 1); |
} |
void initscores(void) |
{ |
int i; |
for (i = 0; i < NUMSPOTS; i++) { |
str_cpy(scores[i].hs_name, STR_BOUNDS(MAXLOGNAME) + 1, "HelenOS Team"); |
scores[i].hs_score = (NUMSPOTS - i) * 200; |
scores[i].hs_level = (i + 1 > MAXLEVEL ? MAXLEVEL : i + 1); |
for(i = 0; i < NUMSPOTS; i++) { |
strncpy(scores[i].hs_name, "HelenOS Team", MAXLOGNAME); |
scores[i].hs_score = (NUMSPOTS - i) * 200; |
scores[i].hs_level = (i + 1 > MAXLEVEL?MAXLEVEL:i + 1); |
} |
} |
int loadscores(void) |
{ |
FILE *f; |
size_t cnt; |
int rc; |
/* |
* Read the score file. Can be called from savescore (before showscores) |
* or showscores (if savescore will not be called). If the given pointer |
* is not NULL, sets *fpp to an open file pointer that corresponds to a |
* read/write score file that is locked with LOCK_EX. Otherwise, the |
* file is locked with LOCK_SH for the read and closed before return. |
* |
* Note, we assume closing the stdio file releases the lock. |
*/ |
/* static void */ |
/* getscores(FILE **fpp) */ |
/* { */ |
/* int sd, mint, lck, mask, i; */ |
/* char *mstr, *human; */ |
/* FILE *sf; */ |
f = fopen("/data/tetris.sco", "rb"); |
if (f == NULL) |
return ENOENT; |
/* if (fpp != NULL) { */ |
/* mint = O_RDWR | O_CREAT; */ |
/* mstr = "r+"; */ |
/* human = "read/write"; */ |
/* lck = LOCK_EX; */ |
/* } else { */ |
/* mint = O_RDONLY; */ |
/* mstr = "r"; */ |
/* human = "reading"; */ |
/* lck = LOCK_SH; */ |
/* } */ |
/* setegid(egid); */ |
/* mask = umask(S_IWOTH); */ |
/* sd = open(_PATH_SCOREFILE, mint, 0666); */ |
/* (void)umask(mask); */ |
/* setegid(gid); */ |
/* if (sd < 0) { */ |
/* if (fpp == NULL) { */ |
/* nscores = 0; */ |
/* return; */ |
/* } */ |
/* err(1, "cannot open %s for %s", _PATH_SCOREFILE, human); */ |
/* } */ |
/* setegid(egid); */ |
/* if ((sf = fdopen(sd, mstr)) == NULL) */ |
/* err(1, "cannot fdopen %s for %s", _PATH_SCOREFILE, human); */ |
/* setegid(gid); */ |
cnt = fread(scores, sizeof(struct highscore), NUMSPOTS, f); |
rc = fclose(f); |
/* /\* */ |
/* * Grab a lock. */ |
/* *\/ */ |
/* if (flock(sd, lck)) */ |
/* warn("warning: score file %s cannot be locked", */ |
/* _PATH_SCOREFILE); */ |
if (cnt != NUMSPOTS || rc != 0) |
return EIO; |
/* nscores = fread(scores, sizeof(scores[0]), MAXHISCORES, sf); */ |
/* if (ferror(sf)) */ |
/* err(1, "error reading %s", _PATH_SCOREFILE); */ |
/* for (i = 0; i < nscores; i++) */ |
/* if (scores[i].hs_level < MINLEVEL || */ |
/* scores[i].hs_level > MAXLEVEL) */ |
/* errx(1, "scorefile %s corrupt", _PATH_SCOREFILE); */ |
return EOK; |
} |
/* if (fpp) */ |
/* *fpp = sf; */ |
/* else */ |
/* (void)fclose(sf); */ |
/* } */ |
void savescores(void) |
void |
savescore(int level) |
{ |
FILE *f; |
size_t cnt; |
int rc; |
return; |
} |
/* struct highscore *sp; */ |
/* int i; */ |
/* int change; */ |
/* FILE *sf; */ |
/* const char *me; */ |
f = fopen("/data/tetris.sco", "wb"); |
cnt = fwrite(scores, sizeof(struct highscore), NUMSPOTS, f); |
rc = fclose(f); |
/* getscores(&sf); */ |
/* gotscores = 1; */ |
/* (void)time(&now); */ |
if (cnt != NUMSPOTS || rc != 0) |
printf("Error saving score table\n"); |
/* /\* */ |
/* * Allow at most one score per person per level -- see if we */ |
/* * can replace an existing score, or (easiest) do nothing. */ |
/* * Otherwise add new score at end (there is always room). */ |
/* *\/ */ |
/* change = 0; */ |
/* me = thisuser(); */ |
/* for (i = 0, sp = &scores[0]; i < nscores; i++, sp++) { */ |
/* if (sp->hs_level != level || strcmp(sp->hs_name, me) != 0) */ |
/* continue; */ |
/* if (score > sp->hs_score) { */ |
/* (void)printf("%s bettered %s %d score of %d!\n", */ |
/* "\nYou", "your old level", level, */ |
/* sp->hs_score * sp->hs_level); */ |
/* sp->hs_score = score; /\* new score *\/ */ |
/* sp->hs_time = now; /\* and time *\/ */ |
/* change = 1; */ |
/* } else if (score == sp->hs_score) { */ |
/* (void)printf("%s tied %s %d high score.\n", */ |
/* "\nYou", "your old level", level); */ |
/* sp->hs_time = now; /\* renew it *\/ */ |
/* change = 1; /\* gotta rewrite, sigh *\/ */ |
/* } /\* else new score < old score: do nothing *\/ */ |
/* break; */ |
/* } */ |
/* if (i >= nscores) { */ |
/* strlcpy(sp->hs_name, me, sizeof sp->hs_name); */ |
/* sp->hs_level = level; */ |
/* sp->hs_score = score; */ |
/* sp->hs_time = now; */ |
/* nscores++; */ |
/* change = 1; */ |
/* } */ |
/* if (change) { */ |
/* /\* */ |
/* * Sort & clean the scores, then rewrite. */ |
/* *\/ */ |
/* nscores = checkscores(scores, nscores); */ |
/* rewind(sf); */ |
/* if (fwrite(scores, sizeof(*sp), nscores, sf) != nscores || */ |
/* fflush(sf) == EOF) */ |
/* warnx("error writing %s: %s\n\t-- %s", */ |
/* _PATH_SCOREFILE, strerror(errno), */ |
/* "high scores may be damaged"); */ |
/* } */ |
/* (void)fclose(sf); /\* releases lock *\/ */ |
/* } */ |
/* |
* Get login name, or if that fails, get something suitable. |
* The result is always trimmed to fit in a score. |
*/ |
/* static char * */ |
/* thisuser(void) */ |
/* { */ |
/* const char *p; */ |
/* struct passwd *pw; */ |
/* static char u[sizeof(scores[0].hs_name)]; */ |
/* if (u[0]) */ |
/* return (u); */ |
/* p = getlogin(); */ |
/* if (p == NULL || *p == '\0') { */ |
/* pw = getpwuid(getuid()); */ |
/* if (pw != NULL) */ |
/* p = pw->pw_name; */ |
/* else */ |
/* p = " ???"; */ |
/* } */ |
/* strlcpy(u, p, sizeof(u)); */ |
/* return (u); */ |
/* } */ |
/* |
* Score comparison function for qsort. |
* |
* If two scores are equal, the person who had the score first is |
* listed first in the highscore file. |
*/ |
/* static int */ |
/* cmpscores(const void *x, const void *y) */ |
/* { */ |
/* const struct highscore *a, *b; */ |
/* long l; */ |
/* a = x; */ |
/* b = y; */ |
/* l = (long)b->hs_level * b->hs_score - (long)a->hs_level * a->hs_score; */ |
/* if (l < 0) */ |
/* return (-1); */ |
/* if (l > 0) */ |
/* return (1); */ |
/* if (a->hs_time < b->hs_time) */ |
/* return (-1); */ |
/* if (a->hs_time > b->hs_time) */ |
/* return (1); */ |
/* return (0); */ |
/* } */ |
/* |
* If we've added a score to the file, we need to check the file and ensure |
* that this player has only a few entries. The number of entries is |
* controlled by MAXSCORES, and is to ensure that the highscore file is not |
* monopolised by just a few people. People who no longer have accounts are |
* only allowed the highest score. Scores older than EXPIRATION seconds are |
* removed, unless they are someone's personal best. |
* Caveat: the highest score on each level is always kept. |
*/ |
/* static int */ |
/* checkscores(struct highscore *hs, int num) */ |
/* { */ |
/* struct highscore *sp; */ |
/* int i, j, k, numnames; */ |
/* int levelfound[NLEVELS]; */ |
/* struct peruser { */ |
/* char *name; */ |
/* int times; */ |
/* } count[NUMSPOTS]; */ |
/* struct peruser *pu; */ |
/* /\* */ |
/* * Sort so that highest totals come first. */ |
/* * */ |
/* * levelfound[i] becomes set when the first high score for that */ |
/* * level is encountered. By definition this is the highest score. */ |
/* *\/ */ |
/* qsort((void *)hs, nscores, sizeof(*hs), cmpscores); */ |
/* for (i = MINLEVEL; i < NLEVELS; i++) */ |
/* levelfound[i] = 0; */ |
/* numnames = 0; */ |
/* for (i = 0, sp = hs; i < num;) { */ |
/* /\* */ |
/* * This is O(n^2), but do you think we care? */ |
/* *\/ */ |
/* for (j = 0, pu = count; j < numnames; j++, pu++) */ |
/* if (strcmp(sp->hs_name, pu->name) == 0) */ |
/* break; */ |
/* if (j == numnames) { */ |
/* /\* */ |
/* * Add new user, set per-user count to 1. */ |
/* *\/ */ |
/* pu->name = sp->hs_name; */ |
/* pu->times = 1; */ |
/* numnames++; */ |
/* } else { */ |
/* /\* */ |
/* * Two ways to keep this score: */ |
/* * - Not too many (per user), still has acct, & */ |
/* * score not dated; or */ |
/* * - High score on this level. */ |
/* *\/ */ |
/* if ((pu->times < MAXSCORES && */ |
/* getpwnam(sp->hs_name) != NULL && */ |
/* sp->hs_time + EXPIRATION >= now) || */ |
/* levelfound[sp->hs_level] == 0) */ |
/* pu->times++; */ |
/* else { */ |
/* /\* */ |
/* * Delete this score, do not count it, */ |
/* * do not pass go, do not collect $200. */ |
/* *\/ */ |
/* num--; */ |
/* for (k = i; k < num; k++) */ |
/* hs[k] = hs[k + 1]; */ |
/* continue; */ |
/* } */ |
/* } */ |
/* levelfound[sp->hs_level] = 1; */ |
/* i++, sp++; */ |
/* } */ |
/* return (num > MAXHISCORES ? MAXHISCORES : num); */ |
/* } */ |
/* |
* Show current scores. This must be called after savescore, if |
* savescore is called at all, for two reasons: |
* - Showscores munches the time field. |
* - Even if that were not the case, a new score must be recorded |
* before it can be shown anyway. |
*/ |
/* |
void |
showscores(int level) |
{ |
return; |
} |
*/ |
/* struct highscore *sp; */ |
/* int i, n, c; */ |
/* const char *me; */ |
/* int levelfound[NLEVELS]; */ |
/* if (!gotscores) */ |
/* getscores((FILE **)NULL); */ |
/* (void)printf("\n\t\t Tetris High Scores\n"); */ |
/* /\* */ |
/* * If level == 0, the person has not played a game but just asked for */ |
/* * the high scores; we do not need to check for printing in highlight */ |
/* * mode. If SOstr is null, we can't do highlighting anyway. */ |
/* *\/ */ |
/* me = level && SOstr ? thisuser() : NULL; */ |
/* /\* */ |
/* * Set times to 0 except for high score on each level. */ |
/* *\/ */ |
/* for (i = MINLEVEL; i < NLEVELS; i++) */ |
/* levelfound[i] = 0; */ |
/* for (i = 0, sp = scores; i < nscores; i++, sp++) { */ |
/* if (levelfound[sp->hs_level]) */ |
/* sp->hs_time = 0; */ |
/* else { */ |
/* sp->hs_time = 1; */ |
/* levelfound[sp->hs_level] = 1; */ |
/* } */ |
/* } */ |
/* /\* */ |
/* * Page each screenful of scores. */ |
/* *\/ */ |
/* for (i = 0, sp = scores; i < nscores; sp += n) { */ |
/* n = 20; */ |
/* if (i + n > nscores) */ |
/* n = nscores - i; */ |
/* printem(level, i + 1, sp, n, me); */ |
/* if ((i += n) < nscores) { */ |
/* (void)printf("\nHit RETURN to continue."); */ |
/* (void)fflush(stdout); */ |
/* while ((c = getchar()) != '\n') */ |
/* if (c == EOF) */ |
/* break; */ |
/* (void)printf("\n"); */ |
/* } */ |
/* } */ |
/* if (nscores == 0) */ |
/* printf("\t\t\t - none to date.\n"); */ |
/* } */ |
/* static void */ |
/* printem(int level, int offset, struct highscore *hs, int n, const char *me) */ |
/* { */ |
/* struct highscore *sp; */ |
/* int row, highlight, i; */ |
/* char buf[100]; */ |
/* #define TITLE "Rank Score Name (points/level)" */ |
/* #define TITL2 "==========================================================" */ |
/* printf("%s\n%s\n", TITLE, TITL2); */ |
/* highlight = 0; */ |
/* for (row = 0; row < n; row++) { */ |
/* sp = &hs[row]; */ |
/* (void)snprintf(buf, sizeof(buf), */ |
/* "%3d%c %6d %-31s (%6d on %d)\n", */ |
/* row + offset, sp->hs_time ? '*' : ' ', */ |
/* sp->hs_score * sp->hs_level, */ |
/* sp->hs_name, sp->hs_score, sp->hs_level); */ |
/* /\* Print leaders every three lines *\/ */ |
/* if ((row + 1) % 3 == 0) { */ |
/* for (i = 0; i < sizeof(buf); i++) */ |
/* if (buf[i] == ' ') */ |
/* buf[i] = '_'; */ |
/* } */ |
/* /\* */ |
/* * Highlight if appropriate. This works because */ |
/* * we only get one score per level. */ |
/* *\/ */ |
/* if (me != NULL && */ |
/* sp->hs_level == level && */ |
/* sp->hs_score == score && */ |
/* strcmp(sp->hs_name, me) == 0) { */ |
/* putpad(SOstr); */ |
/* highlight = 1; */ |
/* } */ |
/* (void)printf("%s", buf); */ |
/* if (highlight) { */ |
/* putpad(SEstr); */ |
/* highlight = 0; */ |
/* } */ |
/* } */ |
/* } */ |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/screen.c |
---|
36,7 → 36,7 |
*/ |
/** @addtogroup tetris |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
50,26 → 50,22 |
#include <stdlib.h> |
#include <string.h> |
#include <unistd.h> |
#include <vfs/vfs.h> |
#include <io/stream.h> |
#include <async.h> |
#include "screen.h" |
#include "tetris.h" |
#include <io/console.h> |
#include "../../srv/console/console.h" |
#define STOP (B_COLS - 3) |
static cell curscreen[B_SIZE]; /* non-zero => standout (or otherwise marked) */ |
static cell curscreen[B_SIZE]; /* 1 => standout (or otherwise marked) */ |
static int curscore; |
static int isset; /* true => terminal is in game mode */ |
static int isset; /* true => terminal is in game mode */ |
static int use_color; /* true => use colors */ |
static const struct shape *lastshape; |
/* |
* putstr() is for unpadded strings (either as in termcap(5) or |
* simply literal strings); |
* simply literal strings); |
*/ |
static inline void putstr(char *s) |
{ |
77,22 → 73,29 |
putchar(*(s++)); |
} |
static void start_standout(uint32_t color) |
static int con_phone; |
static void set_style(int fgcolor, int bgcolor) |
{ |
fflush(stdout); |
console_set_rgb_color(fphone(stdout), 0xf0f0f0, |
use_color ? color : 0x000000); |
async_msg_2(con_phone, CONSOLE_SET_STYLE, fgcolor, bgcolor); |
} |
static void start_standout(void) |
{ |
set_style(0xf0f0f0, 0); |
} |
static void resume_normal(void) |
{ |
fflush(stdout); |
console_set_rgb_color(fphone(stdout), 0, 0xf0f0f0); |
set_style(0, 0xf0f0f0); |
} |
void clear_screen(void) |
{ |
console_clear(fphone(stdout)); |
async_msg_0(con_phone, CONSOLE_CLEAR); |
moveto(0, 0); |
} |
99,20 → 102,24 |
/* |
* Clear the screen, forgetting the current contents in the process. |
*/ |
void scr_clear(void) |
void |
scr_clear(void) |
{ |
resume_normal(); |
console_clear(fphone(stdout)); |
async_msg_0(con_phone, CONSOLE_CLEAR); |
curscore = -1; |
memset(curscreen, 0, sizeof(curscreen)); |
memset((char *)curscreen, 0, sizeof(curscreen)); |
} |
/* |
* Set up screen |
*/ |
void scr_init(void) |
void |
scr_init(void) |
{ |
console_cursor_visibility(fphone(stdout), 0); |
con_phone = get_cons_phone(); |
async_msg_1(con_phone, CONSOLE_CURSOR_VISIBILITY, 0); |
resume_normal(); |
scr_clear(); |
} |
119,49 → 126,38 |
void moveto(int r, int c) |
{ |
fflush(stdout); |
console_goto(fphone(stdout), c, r); |
async_msg_2(con_phone, CONSOLE_GOTO, r, c); |
} |
static void fflush(void) |
{ |
async_msg_0(con_phone, CONSOLE_FLUSH); |
} |
winsize_t winsize; |
static int get_display_size(winsize_t *ws) |
{ |
return console_get_size(fphone(stdout), &ws->ws_col, &ws->ws_row); |
return async_req_0_2(con_phone, CONSOLE_GETSIZE, &ws->ws_row, |
&ws->ws_col); |
} |
static int get_display_color_sup(void) |
{ |
int rc; |
int ccap; |
rc = console_get_color_cap(fphone(stdout), &ccap); |
if (rc != 0) |
return 0; |
return (ccap >= CONSOLE_CCAP_RGB); |
} |
/* |
* Set up screen mode. |
*/ |
void scr_set(void) |
void |
scr_set(void) |
{ |
winsize_t ws; |
Rows = 0; |
Cols = 0; |
Rows = 0, Cols = 0; |
if (get_display_size(&ws) == 0) { |
Rows = ws.ws_row; |
Cols = ws.ws_col; |
} |
if (Rows < MINROWS || Cols < MINCOLS) { |
char smallscr[55]; |
use_color = get_display_color_sup(); |
if ((Rows < MINROWS) || (Cols < MINCOLS)) { |
char smallscr[55]; |
snprintf(smallscr, sizeof(smallscr), |
"the screen is too small (must be at least %dx%d)", |
MINROWS, MINCOLS); |
168,7 → 164,7 |
stop(smallscr); |
} |
isset = 1; |
scr_clear(); |
} |
175,80 → 171,76 |
/* |
* End screen mode. |
*/ |
void scr_end(void) |
void |
scr_end(void) |
{ |
console_cursor_visibility(fphone(stdout), 1); |
} |
void stop(char *why) |
void |
stop(char *why) |
{ |
if (isset) |
scr_end(); |
errx(1, "aborting: %s", why); |
} |
/* |
* Update the screen. |
*/ |
void scr_update(void) |
void |
scr_update(void) |
{ |
cell *bp; |
cell *sp; |
cell so; |
cell cur_so = 0; |
int i; |
int j; |
int ccol; |
/* Always leave cursor after last displayed point */ |
cell *bp, *sp; |
cell so, cur_so = 0; |
int i, ccol, j; |
static const struct shape *lastshape; |
/* always leave cursor after last displayed point */ |
curscreen[D_LAST * B_COLS - 1] = -1; |
if (score != curscore) { |
moveto(0, 0); |
printf("Score: %d", score); |
curscore = score; |
} |
/* Draw preview of next pattern */ |
if ((showpreview) && (nextshape != lastshape)) { |
/* draw preview of next pattern */ |
if (showpreview && (nextshape != lastshape)) { |
int i; |
static int r = 5, c = 2; |
static int r=5, c=2; |
int tr, tc, t; |
lastshape = nextshape; |
/* Clean */ |
/* clean */ |
resume_normal(); |
moveto(r - 1, c - 1); |
putstr(" "); |
moveto(r, c - 1); |
putstr(" "); |
moveto(r + 1, c - 1); |
putstr(" "); |
moveto(r + 2, c - 1); |
putstr(" "); |
moveto(r - 3, c - 2); |
moveto(r-1, c-1); putstr(" "); |
moveto(r, c-1); putstr(" "); |
moveto(r+1, c-1); putstr(" "); |
moveto(r+2, c-1); putstr(" "); |
moveto(r-3, c-2); |
putstr("Next shape:"); |
/* Draw */ |
start_standout(nextshape->color); |
/* draw */ |
start_standout(); |
moveto(r, 2 * c); |
putstr(" "); |
for (i = 0; i < 3; i++) { |
t = c + r * B_COLS; |
t += nextshape->off[i]; |
tr = t / B_COLS; |
tc = t % B_COLS; |
moveto(tr, 2*tc); |
putstr(" "); |
} |
resume_normal(); |
} |
bp = &board[D_FIRST * B_COLS]; |
sp = &curscreen[D_FIRST * B_COLS]; |
for (j = D_FIRST; j < D_LAST; j++) { |
256,7 → 248,6 |
for (i = 0; i < B_COLS; bp++, sp++, i++) { |
if (*sp == (so = *bp)) |
continue; |
*sp = so; |
if (i != ccol) { |
if (cur_so) { |
265,16 → 256,15 |
} |
moveto(RTOD(j), CTOD(i)); |
} |
if (so != cur_so) { |
if (so) |
start_standout(so); |
start_standout(); |
else |
resume_normal(); |
cur_so = so; |
} |
putstr(" "); |
ccol = i + 1; |
/* |
* Look ahead a bit, to avoid extra motion if |
284,35 → 274,33 |
* `unnecessarily'. Skip it all, though, if |
* the next cell is a different color. |
*/ |
if ((i > STOP) || (sp[1] != bp[1]) || (so != bp[1])) |
#define STOP (B_COLS - 3) |
if (i > STOP || sp[1] != bp[1] || so != bp[1]) |
continue; |
if (sp[2] != bp[2]) |
sp[1] = -1; |
else if ((i < STOP) && (so == bp[2]) && (sp[3] != bp[3])) { |
else if (i < STOP && so == bp[2] && sp[3] != bp[3]) { |
sp[2] = -1; |
sp[1] = -1; |
} |
} |
} |
if (cur_so) |
resume_normal(); |
fflush(stdout); |
fflush(); |
} |
/* |
* Write a message (set != 0), or clear the same message (set == 0). |
* Write a message (set!=0), or clear the same message (set==0). |
* (We need its length in case we have to overwrite with blanks.) |
*/ |
void scr_msg(char *s, int set) |
void |
scr_msg(char *s, int set) |
{ |
int l = str_size(s); |
int l = strlen(s); |
moveto(Rows - 2, ((Cols - l) >> 1) - 1); |
if (set) |
putstr(s); |
else |
322,3 → 310,4 |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/tetris.c |
---|
36,25 → 36,30 |
*/ |
/** @addtogroup tetris Tetris |
* @brief Tetris ported from OpenBSD |
* @{ |
* @brief Tetris ported from OpenBSD |
* @{ |
*/ |
/** @file |
*/ |
#ifndef lint |
static const char copyright[] = |
"@(#) Copyright (c) 1992, 1993\n" |
"\tThe Regents of the University of California. All rights reserved.\n"; |
"@(#) Copyright (c) 1992, 1993\n\ |
The Regents of the University of California. All rights reserved.\n"; |
#endif /* not lint */ |
/* |
* Tetris (or however it is spelled). |
*/ |
#include <sys/time.h> |
#include <sys/types.h> |
#include <err.h> |
#include <errno.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include <unistd.h> |
#include <getopt.h> |
#include "input.h" |
#include "scores.h" |
61,76 → 66,66 |
#include "screen.h" |
#include "tetris.h" |
cell board[B_SIZE]; |
int Rows; |
int Cols; |
cell board[B_SIZE]; |
int Rows, Cols; |
const struct shape *curshape; |
const struct shape *nextshape; |
long fallrate; |
int score; |
//gid_t gid, egid; |
char key_msg[100]; |
int showpreview, classic; |
long fallrate; |
int score; |
char key_msg[100]; |
int showpreview; |
int classic; |
static void elide(void); |
static void setup_board(void); |
const struct shape *randshape(void); |
void onintr(int); |
void usage(void); |
static void elide(void); |
static void setup_board(void); |
static const struct shape *randshape(void); |
static void usage(void); |
static int firstgame = 1; |
/* |
* Set up the initial board. The bottom display row is completely set, |
* along with another (hidden) row underneath that. Also, the left and |
* Set up the initial board. The bottom display row is completely set, |
* along with another (hidden) row underneath that. Also, the left and |
* right edges are set. |
*/ |
static void setup_board(void) |
static void |
setup_board(void) |
{ |
int i; |
cell *p = board; |
cell *p; |
p = board; |
for (i = B_SIZE; i; i--) |
*p++ = (i <= (2 * B_COLS) || (i % B_COLS) < 2) ? 0x0000ff : 0x000000; |
*p++ = i <= (2 * B_COLS) || (i % B_COLS) < 2; |
} |
/* |
* Elide any full active rows. |
*/ |
static void elide(void) |
static void |
elide(void) |
{ |
int rows = 0; |
int i; |
int j; |
int base; |
int i, j, base; |
cell *p; |
for (i = A_FIRST; i < A_LAST; i++) { |
base = i * B_COLS + 1; |
p = &board[base]; |
for (j = B_COLS - 2; *p++ != 0;) { |
if (--j <= 0) { |
/* This row is to be elided */ |
/* this row is to be elided */ |
rows++; |
memset(&board[base], 0, sizeof(cell) * (B_COLS - 2)); |
memset(&board[base], 0, B_COLS - 2); |
scr_update(); |
tsleep(); |
while (--base != 0) |
board[base + B_COLS] = board[base]; |
scr_update(); |
tsleep(); |
break; |
} |
} |
} |
switch (rows) { |
case 1: |
score += 10; |
149,15 → 144,16 |
} |
} |
const struct shape *randshape(void) |
const struct shape * |
randshape(void) |
{ |
const struct shape *tmp = &shapes[random() % 7]; |
int i; |
int j = random() % 4; |
const struct shape *tmp; |
int i, j; |
tmp = &shapes[random() % 7]; |
j = random() % 4; |
for (i = 0; i < j; i++) |
tmp = &shapes[classic ? tmp->rotc : tmp->rot]; |
tmp = &shapes[classic? tmp->rotc : tmp->rot]; |
return (tmp); |
} |
164,7 → 160,7 |
static void srandomdev(void) |
{ |
struct timeval tv; |
gettimeofday(&tv, NULL); |
srandom(tv.tv_sec + tv.tv_usec / 100000); |
} |
171,43 → 167,61 |
static void tetris_menu_draw(int level) |
{ |
clear_screen(); |
moveto(5, 10); |
puts("Tetris\n\n"); |
moveto(8, 10); |
printf("Level = %d (press keys 1 - 9 to change)", level); |
moveto(9, 10); |
printf("Preview is %s (press 'p' to change)", (showpreview ? "on ": "off")); |
moveto(12, 10); |
printf("Press 'h' to show hiscore table."); |
moveto(13, 10); |
printf("Press 's' to start game."); |
moveto(14, 10); |
printf("Press 'q' to quit game."); |
moveto(20, 10); |
printf("In game controls:"); |
moveto(21, 0); |
puts(key_msg); |
clear_screen(); |
moveto(5,10); |
puts("Tetris\n\n"); |
moveto(8,10); |
printf("Level = %d (press keys 1 - 9 to change)",level); |
moveto(9,10); |
printf("Preview is %s (press 'p' to change)", (showpreview?"on ":"off")); |
moveto(12,10); |
printf("Press 'h' to show hiscore table."); |
moveto(13,10); |
printf("Press 's' to start game."); |
moveto(14,10); |
printf("Press 'q' to quit game."); |
moveto(20,10); |
printf("In game controls:"); |
moveto(21,0); |
puts(key_msg); |
} |
static int tetris_menu(int *level) |
static int tetris_menu(int *level) |
{ |
static int firstgame = 1; |
int i; |
/* if (showpreview == 0) |
(void)printf("Your score: %d point%s x level %d = %d\n", |
score, score == 1 ? "" : "s", level, score * level); |
else { |
(void)printf("Your score: %d point%s x level %d x preview penalty %0.3f = %d\n", |
score, score == 1 ? "" : "s", level, (double)PRE_PENALTY, |
(int)(score * level * PRE_PENALTY)); |
score = score * PRE_PENALTY; |
} |
savescore(level); |
showscores(level); |
printf("\nHit 's' to new game, 'q' to quit.\n"); |
*/ |
tetris_menu_draw(*level); |
while (1) { |
int i = getchar(); |
i = getchar(); |
switch(i) { |
case 'p': |
showpreview = !showpreview; |
moveto(9, 21); |
moveto(9,21); |
if (showpreview) |
printf("on "); |
else |
printf("off"); |
break; |
case 'h': |
loadscores(); |
showscores(firstgame); |
tetris_menu_draw(*level); |
break; |
221,103 → 235,112 |
case '3': |
case '4': |
case '5': |
case '6': |
case '6': |
case '7': |
case '8': |
case '9': |
*level = i - '0'; |
moveto(8, 18); |
moveto(8,18); |
printf("%d", *level); |
break; |
} |
} |
} |
int main(int argc, char *argv[]) |
int |
main(int argc, char *argv[]) |
{ |
int pos; |
int c; |
int pos, c; |
char *keys; |
int level = 2; |
char key_write[6][10]; |
int i; |
int j; |
int ch; |
int i, j; |
keys = "jkl pq"; |
// gid = getgid(); |
// egid = getegid(); |
// setegid(gid); |
classic = 0; |
showpreview = 1; |
/* while ((ch = getopt(argc, argv, "ck:l:ps")) != -1) */ |
/* switch(ch) { */ |
/* case 'c': */ |
/* /\* */ |
/* * this means: */ |
/* * - rotate the other way; */ |
/* * - no reverse video. */ |
/* *\/ */ |
/* classic = 1; */ |
/* break; */ |
/* case 'k': */ |
/* if (strlen(keys = optarg) != 6) */ |
/* usage(); */ |
/* break; */ |
/* case 'l': */ |
/* level = (int)strtonum(optarg, MINLEVEL, MAXLEVEL, */ |
/* &errstr); */ |
/* if (errstr) */ |
/* errx(1, "level must be from %d to %d", */ |
/* MINLEVEL, MAXLEVEL); */ |
/* break; */ |
/* case 'p': */ |
/* showpreview = 1; */ |
/* break; */ |
/* case 's': */ |
/* showscores(0); */ |
/* exit(0); */ |
/* default: */ |
/* usage(); */ |
/* } */ |
/* argc -= optind; */ |
/* argv += optind; */ |
/* if (argc) */ |
/* usage(); */ |
while ((ch = getopt(argc, argv, "ck:ps")) != -1) |
switch(ch) { |
case 'c': |
/* |
* this means: |
* - rotate the other way |
* - no reverse video |
*/ |
classic = 1; |
break; |
case 'k': |
if (str_size(keys = optarg) != 6) |
usage(); |
break; |
case 'p': |
showpreview = 1; |
break; |
case 's': |
showscores(0); |
exit(0); |
default: |
usage(); |
} |
argc -= optind; |
argv += optind; |
if (argc) |
usage(); |
for (i = 0; i <= 5; i++) { |
for (j = i + 1; j <= 5; j++) { |
for (j = i+1; j <= 5; j++) { |
if (keys[i] == keys[j]) |
errx(1, "duplicate command keys specified."); |
} |
if (keys[i] == ' ') |
str_cpy(key_write[i], sizeof(key_write[i]), "<space>"); |
strncpy(key_write[i], "<space>", sizeof key_write[i]); |
else { |
key_write[i][0] = keys[i]; |
key_write[i][1] = '\0'; |
} |
} |
snprintf(key_msg, sizeof(key_msg), |
"%s - left %s - rotate %s - right %s - drop %s - pause %s - quit", |
key_write[0], key_write[1], key_write[2], key_write[3], |
key_write[4], key_write[5]); |
snprintf(key_msg, sizeof key_msg, |
"%s - left %s - rotate %s - right %s - drop %s - pause %s - quit", |
key_write[0], key_write[1], key_write[2], key_write[3], |
key_write[4], key_write[5]); |
scr_init(); |
if (loadscores() != EOK) |
initscores(); |
initscores(); |
while (tetris_menu(&level)) { |
fallrate = 1000000 / level; |
scr_clear(); |
setup_board(); |
srandomdev(); |
scr_set(); |
pos = A_FIRST * B_COLS + (B_COLS / 2) - 1; |
pos = A_FIRST*B_COLS + (B_COLS/2)-1; |
nextshape = randshape(); |
curshape = randshape(); |
scr_msg(key_msg, 1); |
while (1) { |
for (;;) { |
place(curshape, pos, 1); |
scr_update(); |
place(curshape, pos, 0); |
330,7 → 353,7 |
pos += B_COLS; |
continue; |
} |
/* |
* Put up the current shape `permanently', |
* bump score, and elide any full rows. |
338,7 → 361,7 |
place(curshape, pos, 1); |
score++; |
elide(); |
/* |
* Choose a new shape. If it does not fit, |
* the game is over. |
345,14 → 368,12 |
*/ |
curshape = nextshape; |
nextshape = randshape(); |
pos = A_FIRST * B_COLS + (B_COLS / 2) - 1; |
pos = A_FIRST*B_COLS + (B_COLS/2)-1; |
if (!fits_in(curshape, pos)) |
break; |
continue; |
} |
/* |
* Handle command keys. |
*/ |
360,25 → 381,22 |
/* quit */ |
break; |
} |
if (c == keys[4]) { |
static char msg[] = |
"paused - press RETURN to continue"; |
place(curshape, pos, 1); |
do { |
scr_update(); |
scr_msg(key_msg, 0); |
scr_msg(msg, 1); |
(void) fflush(stdout); |
} while (rwait((struct timeval *) NULL) == -1); |
// (void) fflush(stdout); |
} while (rwait((struct timeval *)NULL) == -1); |
scr_msg(msg, 0); |
scr_msg(key_msg, 1); |
place(curshape, pos, 0); |
continue; |
} |
if (c == keys[0]) { |
/* move left */ |
if (fits_in(curshape, pos - 1)) |
385,17 → 403,15 |
pos--; |
continue; |
} |
if (c == keys[1]) { |
/* turn */ |
const struct shape *new = |
&shapes[classic ? curshape->rotc : curshape->rot]; |
const struct shape *new = &shapes[ |
classic? curshape->rotc : curshape->rot]; |
if (fits_in(new, pos)) |
curshape = new; |
continue; |
} |
if (c == keys[2]) { |
/* move right */ |
if (fits_in(curshape, pos + 1)) |
402,7 → 418,6 |
pos++; |
continue; |
} |
if (c == keys[3]) { |
/* move to bottom */ |
while (fits_in(curshape, pos + B_COLS)) { |
411,7 → 426,6 |
} |
continue; |
} |
if (c == '\f') { |
scr_clear(); |
scr_msg(key_msg, 1); |
419,24 → 433,37 |
} |
scr_clear(); |
loadscores(); |
insertscore(score, level); |
savescores(); |
score = 0; |
score=0; |
} |
scr_clear(); |
printf("\nGame over.\n"); |
printf("\n\n\n\t\tGame over.\n"); |
/* |
while ((i = getchar()) != '\n') |
if (i == EOF) |
break |
*/ |
scr_end(); |
return 0; |
} |
void usage(void) |
/* void */ |
/* onintr(int signo) */ |
/* { */ |
/* scr_clear(); /\* XXX signal race *\/ */ |
/* scr_end(); /\* XXX signal race *\/ */ |
/* _exit(0); */ |
/* } */ |
void |
usage(void) |
{ |
fprintf(stderr, "usage: tetris [-ps] [-k keys]\n"); |
(void)fprintf(stderr, "usage: tetris [-ps] [-k keys] [-l level]\n"); |
exit(1); |
} |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/tetris.h |
---|
36,7 → 36,7 |
*/ |
/** @addtogroup tetris |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
55,60 → 55,57 |
* worrying about addressing problems. |
*/ |
/* The board */ |
#define B_COLS 12 |
#define B_ROWS 23 |
#define B_SIZE (B_ROWS * B_COLS) |
/* the board */ |
#define B_COLS 12 |
#define B_ROWS 23 |
#define B_SIZE (B_ROWS * B_COLS) |
typedef uint32_t cell; |
typedef unsigned char cell; |
extern cell board[B_SIZE]; /* 1 => occupied, 0 => empty */ |
extern cell board[B_SIZE]; /* 1 => occupied, 0 => empty */ |
/* the displayed area (rows) */ |
#define D_FIRST 1 |
#define D_LAST 22 |
/* The displayed area (rows) */ |
#define D_FIRST 1 |
#define D_LAST 22 |
/* the active area (rows) */ |
#define A_FIRST 1 |
#define A_LAST 21 |
/* The active area (rows) */ |
#define A_FIRST 1 |
#define A_LAST 21 |
/* |
* Minimum display size. |
*/ |
#define MINROWS 23 |
#define MINCOLS 40 |
#define MINROWS 23 |
#define MINCOLS 40 |
/* Current screen size */ |
extern int Rows; |
extern int Cols; |
extern int Rows, Cols; /* current screen size */ |
/* |
* Translations from board coordinates to display coordinates. |
* As with board coordinates, display coordiates are zero origin. |
*/ |
#define RTOD(x) ((x) - 1) |
#define CTOD(x) ((x) * 2 + (((Cols - 2 * B_COLS) >> 1) - 1)) |
#define RTOD(x) ((x) - 1) |
#define CTOD(x) ((x) * 2 + (((Cols - 2 * B_COLS) >> 1) - 1)) |
/* |
* A `shape' is the fundamental thing that makes up the game. There |
* are 7 basic shapes, each consisting of four `blots': |
* |
* X.X X.X X.X |
* X.X X.X X.X.X X.X X.X.X X.X.X X.X.X.X |
* X X X |
* X.X X.X X.X |
* X.X X.X X.X.X X.X X.X.X X.X.X X.X.X.X |
* X X X |
* |
* 0 1 2 3 4 5 6 |
* 0 1 2 3 4 5 6 |
* |
* Except for 3 and 6, the center of each shape is one of the blots. |
* This blot is designated (0, 0). The other three blots can then be |
* This blot is designated (0,0). The other three blots can then be |
* described as offsets from the center. Shape 3 is the same under |
* rotation, so its center is effectively irrelevant; it has been chosen |
* so that it `sticks out' upward and leftward. Except for shape 6, |
* all the blots are contained in a box going from (-1, -1) to (+1, +1); |
* all the blots are contained in a box going from (-1,-1) to (+1,+1); |
* shape 6's center `wobbles' as it rotates, so that while it `sticks out' |
* rightward, its rotation---a vertical line---`sticks out' downward. |
* The containment box has to include the offset (2, 0), making the overall |
* containment box range from offset (-1, -1) to (+2, +1). (This is why |
* The containment box has to include the offset (2,0), making the overall |
* containment box range from offset (-1,-1) to (+2,+1). (This is why |
* there is only one row above, but two rows below, the display area.) |
* |
* The game works by choosing one of these shapes at random and putting |
119,7 → 116,7 |
* At this time, any completely filled rows are elided, and blots above |
* these rows move down to make more room. A new random shape is again |
* introduced at the top of the board, and the whole process repeats. |
* The game ends when the new shape will not fit at (1, 5). |
* The game ends when the new shape will not fit at (1,5). |
* |
* While the shapes are falling, the user can rotate them counterclockwise |
* 90 degrees (in addition to moving them left or right), provided that the |
131,10 → 128,9 |
* rotated forms. |
*/ |
struct shape { |
int rot; /* index of rotated version of this shape */ |
int rotc; /* -- " -- in classic version */ |
int off[3]; /* offsets to other blots if center is at (0,0) */ |
uint32_t color; |
int rot; /* index of rotated version of this shape */ |
int rotc; /* -- " -- in classic version */ |
int off[3]; /* offsets to other blots if center is at (0,0) */ |
}; |
extern const struct shape shapes[]; |
152,16 → 148,15 |
* The value eventually reaches a limit, and things stop going faster, |
* but by then the game is utterly impossible. |
*/ |
extern long fallrate; /* less than 1 million; smaller => faster */ |
extern long fallrate; /* less than 1 million; smaller => faster */ |
#define faster() (fallrate -= fallrate / 3000) |
#define faster() (fallrate -= fallrate / 3000) |
/* |
* Game level must be between 1 and 9. This controls the initial fall rate |
* and affects scoring. |
*/ |
#define MINLEVEL 1 |
#define MAXLEVEL 9 |
#define MINLEVEL 1 |
#define MAXLEVEL 9 |
/* |
* Scoring is as follows: |
175,17 → 170,19 |
* |
* If previewing has been turned on, the score is multiplied by PRE_PENALTY. |
*/ |
#define PRE_PENALTY 0.75 |
#define PRE_PENALTY 0.75 |
extern int score; /* The obvious thing */ |
extern int score; /* the obvious thing */ |
//extern gid_t gid, egid; |
extern char key_msg[100]; |
extern int showpreview; |
extern int classic; |
extern char key_msg[100]; |
extern int showpreview; |
extern int classic; |
extern int fits_in(const struct shape *, int); |
extern void place(const struct shape *, int, int); |
extern void stop(char *); |
int fits_in(const struct shape *, int); |
void place(const struct shape *, int, int); |
void stop(char *); |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/scores.h |
---|
34,9 → 34,8 |
* |
* @(#)scores.h 8.1 (Berkeley) 5/31/93 |
*/ |
/** @addtogroup tetris |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
45,27 → 44,24 |
/* |
* Tetris scores. |
*/ |
#include <sys/time.h> |
#include <string.h> |
#define MAXLOGNAME 16 |
#define MAXHISCORES 10 |
#define MAXSCORES 9 /* maximum high score entries per person */ |
#define EXPIRATION (5L * 365 * 24 * 60 * 60) |
#define MAXLOGNAME 16 |
struct highscore { |
char hs_name[STR_BOUNDS(MAXLOGNAME) + 1]; /* login name */ |
int hs_score; /* raw score */ |
int hs_level; /* play level */ |
time_t hs_time; /* time at game end */ |
char hs_name[MAXLOGNAME + 1]; /* login name */ |
int hs_score; /* raw score */ |
int hs_level; /* play level */ |
// time_t hs_time; /* time at game end */ |
}; |
extern void showscores(int); |
extern void initscores(void); |
extern void insertscore(int score, int level); |
extern int loadscores(void); |
extern void savescores(void); |
#define MAXHISCORES 10 |
//#define MAXSCORES 9 /* maximum high score entries per person */ |
//#define EXPIRATION (5L * 365 * 24 * 60 * 60) |
void savescore(int); |
void showscores(int); |
void insertscore(int score, int level); |
void initscores(void); |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/shapes.c |
---|
36,7 → 36,7 |
*/ |
/** @addtogroup tetris |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
50,35 → 50,35 |
#include <unistd.h> |
#include "tetris.h" |
#define TL (-B_COLS - 1) /* top left */ |
#define TC (-B_COLS) /* top center */ |
#define TR (-B_COLS + 1) /* top right */ |
#define ML -1 /* middle left */ |
#define MR 1 /* middle right */ |
#define BL (B_COLS - 1) /* bottom left */ |
#define BC B_COLS /* bottom center */ |
#define BR (B_COLS + 1) /* bottom right */ |
#define TL -B_COLS-1 /* top left */ |
#define TC -B_COLS /* top center */ |
#define TR -B_COLS+1 /* top right */ |
#define ML -1 /* middle left */ |
#define MR 1 /* middle right */ |
#define BL B_COLS-1 /* bottom left */ |
#define BC B_COLS /* bottom center */ |
#define BR B_COLS+1 /* bottom right */ |
const struct shape shapes[] = { |
/* 0 */ { 7, 7, { TL, TC, MR }, 0xff042d}, |
/* 1 */ { 8, 8, { TC, TR, ML }, 0xff9304}, |
/* 2 */ { 9, 11, { ML, MR, BC }, 0xbeff04}, |
/* 3 */ { 3, 3, { TL, TC, ML }, 0x63ff04}, |
/* 4 */ { 12, 14, { ML, BL, MR }, 0xce04ff}, |
/* 5 */ { 15, 17, { ML, BR, MR }, 0xff04cf}, |
/* 6 */ { 18, 18, { ML, MR, 2 }, 0x7604ff}, /* sticks out */ |
/* 7 */ { 0, 0, { TC, ML, BL }, 0xff042d}, |
/* 8 */ { 1, 1, { TC, MR, BR }, 0xff9304}, |
/* 9 */ { 10, 2, { TC, MR, BC }, 0xbeff04}, |
/* 10 */ { 11, 9, { TC, ML, MR }, 0xbeff04}, |
/* 11 */ { 2, 10, { TC, ML, BC }, 0xbeff04}, |
/* 12 */ { 13, 4, { TC, BC, BR }, 0xce04ff}, |
/* 13 */ { 14, 12, { TR, ML, MR }, 0xce04ff}, |
/* 14 */ { 4, 13, { TL, TC, BC }, 0xce04ff}, |
/* 15 */ { 16, 5, { TR, TC, BC }, 0xff04cf}, |
/* 16 */ { 17, 15, { TL, MR, ML }, 0xff04cf}, |
/* 17 */ { 5, 16, { TC, BC, BL }, 0xff04cf}, |
/* 18 */ { 6, 6, { TC, BC, 2 * B_COLS }, 0x7604ff} /* sticks out */ |
/* 0*/ { 7, 7, { TL, TC, MR } }, |
/* 1*/ { 8, 8, { TC, TR, ML } }, |
/* 2*/ { 9, 11, { ML, MR, BC } }, |
/* 3*/ { 3, 3, { TL, TC, ML } }, |
/* 4*/ { 12, 14, { ML, BL, MR } }, |
/* 5*/ { 15, 17, { ML, BR, MR } }, |
/* 6*/ { 18, 18, { ML, MR, 2 } }, /* sticks out */ |
/* 7*/ { 0, 0, { TC, ML, BL } }, |
/* 8*/ { 1, 1, { TC, MR, BR } }, |
/* 9*/ { 10, 2, { TC, MR, BC } }, |
/*10*/ { 11, 9, { TC, ML, MR } }, |
/*11*/ { 2, 10, { TC, ML, BC } }, |
/*12*/ { 13, 4, { TC, BC, BR } }, |
/*13*/ { 14, 12, { TR, ML, MR } }, |
/*14*/ { 4, 13, { TL, TC, BC } }, |
/*15*/ { 16, 5, { TR, TC, BC } }, |
/*16*/ { 17, 15, { TL, MR, ML } }, |
/*17*/ { 5, 16, { TC, BC, BL } }, |
/*18*/ { 6, 6, { TC, BC, 2*B_COLS } }/* sticks out */ |
}; |
/* |
85,14 → 85,14 |
* Return true iff the given shape fits in the given position, |
* taking the current board into account. |
*/ |
int fits_in(const struct shape *shape, int pos) |
int |
fits_in(const struct shape *shape, int pos) |
{ |
int *o = shape->off; |
if ((board[pos]) || (board[pos + *o++]) || (board[pos + *o++]) || |
(board[pos + *o])) |
if (board[pos] || board[pos + *o++] || board[pos + *o++] || |
board[pos + *o]) |
return 0; |
return 1; |
} |
100,15 → 100,17 |
* Write the given shape into the current board, turning it on |
* if `onoff' is 1, and off if `onoff' is 0. |
*/ |
void place(const struct shape *shape, int pos, int onoff) |
void |
place(const struct shape *shape, int pos, int onoff) |
{ |
int *o = shape->off; |
board[pos] = onoff ? shape->color : 0x000000; |
board[pos + *o++] = onoff ? shape->color : 0x000000; |
board[pos + *o++] = onoff ? shape->color : 0x000000; |
board[pos + *o] = onoff ? shape->color : 0x000000; |
board[pos] = onoff; |
board[pos + *o++] = onoff; |
board[pos + *o++] = onoff; |
board[pos + *o] = onoff; |
} |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/input.h |
---|
36,14 → 36,15 |
*/ |
/** @addtogroup tetris |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
extern int rwait(struct timeval *); |
extern int tgetchar(void); |
extern void tsleep(void); |
int rwait(struct timeval *); |
int tgetchar(void); |
void tsleep(void); |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/screen.h |
---|
36,17 → 36,16 |
*/ |
/** @addtogroup tetris |
* @{ |
* @{ |
*/ |
/** @file |
*/ |
/* |
* putpad() is for padded strings with count = 1. |
* putpad() is for padded strings with count=1. |
*/ |
#define putpad(s) tputs(s, 1, put) |
#define putpad(s) tputs(s, 1, put) |
#include <sys/types.h> |
#include <async.h> |
typedef struct { |
56,17 → 55,17 |
extern winsize_t winsize; |
extern void moveto(int r, int c); |
extern void clear_screen(void); |
void moveto(int r, int c); |
void clear_screen(void); |
/* just calls putchar; for tputs */ |
extern int put(int); |
extern void scr_clear(void); |
extern void scr_end(void); |
extern void scr_init(void); |
extern void scr_msg(char *, int); |
extern void scr_set(void); |
extern void scr_update(void); |
int put(int); /* just calls putchar; for tputs */ |
void scr_clear(void); |
void scr_end(void); |
void scr_init(void); |
void scr_msg(char *, int); |
void scr_set(void); |
void scr_update(void); |
/** @} |
*/ |
/branches/arm/uspace/app/tetris/pathnames.h |
---|
0,0 → 1,49 |
/* $OpenBSD: pathnames.h,v 1.3 2003/06/03 03:01:41 millert Exp $ */ |
/* $NetBSD: pathnames.h,v 1.2 1995/04/22 07:42:37 cgd Exp $ */ |
/*- |
* Copyright (c) 1992, 1993 |
* The Regents of the University of California. All rights reserved. |
* |
* This code is derived from software contributed to Berkeley by |
* Chris Torek and Darren F. Provine. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* 1. Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* 2. Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* 3. Neither the name of the University nor the names of its contributors |
* may be used to endorse or promote products derived from this software |
* without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
* SUCH DAMAGE. |
* |
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93 |
*/ |
/** @addtogroup tetris |
* @{ |
*/ |
/** @file |
*/ |
#define _PATH_SCOREFILE "/var/games/tetris.scores" |
/** @} |
*/ |
/branches/arm/uspace/app/klog/Makefile |
---|
31,7 → 31,6 |
LIBC_PREFIX = ../../lib/libc |
SOFTINT_PREFIX = ../../lib/softint |
include $(LIBC_PREFIX)/Makefile.toolchain |
LIBS = $(LIBC_PREFIX)/libc.a |
53,18 → 52,18 |
-include Makefile.depend |
clean: |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend $(OBJECTS) |
-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend |
depend: |
$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend |
$(OUTPUT): $(OBJECTS) $(LIBS) |
$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map |
disasm: $(OUTPUT).disasm |
$(OUTPUT).disasm: $(OUTPUT) |
$(OBJDUMP) -d $< > $@ |
$(OBJDUMP) -d $< >$@ |
%.o: %.S |
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@ |
/branches/arm/uspace/app/klog/klog.c |
---|
27,9 → 27,9 |
*/ |
/** @addtogroup klog KLog |
* @brief HelenOS KLog |
* @brief HelenOS KLog |
* @{ |
*/ |
*/ |
/** |
* @file |
*/ |
40,47 → 40,56 |
#include <ipc/services.h> |
#include <as.h> |
#include <sysinfo.h> |
#include <event.h> |
#include <io/stream.h> |
#include <errno.h> |
#include <io/klog.h> |
#define NAME "klog" |
#define NAME "klog" |
#define KLOG_SIZE PAGE_SIZE |
/* Pointer to klog area */ |
static wchar_t *klog; |
static size_t klog_length; |
static char *klog; |
static void console_wait(void) |
{ |
while (get_cons_phone() < 0) |
usleep(50000); // FIXME |
} |
static void interrupt_received(ipc_callid_t callid, ipc_call_t *call) |
{ |
async_serialize_start(); |
size_t klog_start = (size_t) IPC_GET_ARG1(*call); |
size_t klog_len = (size_t) IPC_GET_ARG2(*call); |
size_t klog_stored = (size_t) IPC_GET_ARG3(*call); |
size_t i; |
for (i = klog_len - klog_stored; i < klog_len; i++) |
putchar(klog[(klog_start + i) % KLOG_SIZE]); |
for (i = klog_len - klog_stored; i < klog_len; i++) |
putchar(klog[(klog_start + i) % klog_length]); |
async_serialize_end(); |
} |
int main(int argc, char *argv[]) |
{ |
size_t klog_pages = sysinfo_value("klog.pages"); |
size_t klog_size = klog_pages * PAGE_SIZE; |
klog_length = klog_size / sizeof(wchar_t); |
console_wait(); |
klog = (wchar_t *) as_get_mappable_page(klog_size); |
klog = (char *) as_get_mappable_page(KLOG_SIZE); |
if (klog == NULL) { |
printf(NAME ": Error allocating memory area\n"); |
return -1; |
} |
int res = ipc_share_in_start_1_0(PHONE_NS, (void *) klog, |
klog_size, SERVICE_MEM_KLOG); |
int res = ipc_share_in_start_1_0(PHONE_NS, (void *) klog, KLOG_SIZE, |
SERVICE_MEM_KLOG); |
if (res != EOK) { |
printf(NAME ": Error initializing memory area\n"); |
return -1; |
} |
if (event_subscribe(EVENT_KLOG, 0) != EOK) { |
int inr = sysinfo_value("klog.inr"); |
int devno = sysinfo_value("klog.devno"); |
if (ipc_register_irq(inr, devno, 0, NULL) != EOK) { |
printf(NAME ": Error registering klog notifications\n"); |
return -1; |
} |
88,7 → 97,7 |
async_set_interrupt_received(interrupt_received); |
klog_update(); |
async_manager(); |
return 0; |
} |
/branches/arm/uspace/Makefile |
---|
29,26 → 29,21 |
## Include configuration |
# |
-include ../Makefile.config |
-include Makefile.config |
DIRS = \ |
lib/libc \ |
lib/libfs \ |
lib/libblock \ |
lib/softint \ |
lib/softfloat \ |
srv/bd/ata_bd \ |
srv/bd/file_bd \ |
srv/bd/gxe_bd \ |
srv/bd/rd \ |
srv/ns \ |
srv/loader \ |
srv/fb \ |
srv/kbd \ |
srv/console \ |
srv/rd \ |
srv/fs/fat \ |
srv/fs/tmpfs \ |
srv/fs/devfs \ |
srv/vfs \ |
srv/devmap \ |
app/tetris \ |
56,34 → 51,47 |
app/trace \ |
app/klog \ |
app/init \ |
app/getvc \ |
app/bdsh |
ifeq ($(UARCH),amd64) |
ifeq ($(ARCH), amd64) |
DIRS += srv/pci |
endif |
ifeq ($(UARCH),ia32) |
ifeq ($(ARCH), ia32) |
DIRS += srv/pci |
endif |
ifeq ($(UARCH),sparc64) |
DIRS += \ |
srv/cir/fhc \ |
srv/cir/obio |
ifeq ($(ARCH), mips32) |
CFLAGS += -DCONFIG_MIPS_FPU |
endif |
ifeq ($(ARCH), mips32eb) |
CFLAGS += -DCONFIG_MIPS_FPU |
endif |
BUILDS := $(addsuffix .build,$(DIRS)) |
CLEANS := $(addsuffix .clean,$(DIRS)) |
.PHONY: all $(BUILDS) $(CLEANS) clean |
.PHONY: all config build $(BUILDS) $(CLEANS) clean distclean |
all: ../Makefile.config ../config.h ../config.defs $(BUILDS) |
all: |
../tools/config.py uspace.config default $(ARCH) $(COMPILER) $(CONFIG_DEBUG) |
$(MAKE) -C . build |
config: |
../tools/config.py uspace.config |
build: $(BUILDS) |
clean: $(CLEANS) |
find $(DIRS) -name '*.o' -follow -exec rm \{\} \; |
find lib/libc -name "_link.ld" -exec rm \{\} \; |
distclean: clean |
-rm Makefile.config |
$(CLEANS): |
-$(MAKE) -C $(basename $@) clean |
-$(MAKE) -C $(basename $@) clean ARCH=$(ARCH) |
$(BUILDS): |
$(MAKE) -C $(basename $@) all |
$(MAKE) -C $(basename $@) all ARCH=$(ARCH) COMPILER=$(COMPILER) |
/branches/arm/uspace/dist/readme |
---|
File deleted |
/branches/arm/uspace/uspace.config |
---|
0,0 → 1,68 |
# |
# Copyright (c) 2006 Ondrej Palkovsky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## General configuration directives |
# Architecture |
@ "amd64" AMD64/Intel EM64T |
@ "arm32" ARM 32-bit |
@ "ia32" Intel IA-32 |
@ "ia64" Intel IA-64 |
@ "mips32" MIPS 32-bit Little Endian |
@ "mips32eb" MIPS 32-bit Big Endian |
@ "ppc32" PowerPC 32-bit |
@ "ppc64" PowerPC 64-bit |
@ "sparc64" Sun UltraSPARC 64-bit |
! ARCH (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "icc_native" ICC Native |
@ "suncc_native" Sun Studio C Compiler |
! [ARCH=amd64|ARCH=ia32] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "icc_native" ICC Native |
! [ARCH=ia64] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
@ "suncc_native" Sun Studio C Compiler |
! [ARCH=sparc64] COMPILER (choice) |
# Compiler |
@ "gcc_cross" GCC Cross-compiler |
@ "gcc_native" GCC Native |
! [ARCH=arm32|ARCH=mips32|ARCH=mips32eb|ARCH=ppc32|ARCH=ppc64] COMPILER (choice) |
# General debuging and assert checking |
! CONFIG_DEBUG (y/n) |
/branches/arm/contrib/util/DownloadAndPatchSILO.sh |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/branches/arm/contrib/font/bdf2c.pl |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/branches/arm/contrib/font/u_vga16.bdf |
---|
File deleted |
/branches/arm/contrib/toolchain/toolchain.amd64.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
/branches/arm/contrib/toolchain/toolchain.ia32.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
/branches/arm/contrib/toolchain/toolchain.ia64.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
34,6 → 34,7 |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-pc-linux-gnu" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
INCLUDESDIR="${WORKDIR}/include" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
/branches/arm/contrib/toolchain/toolchain.arm32.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
/branches/arm/contrib/toolchain/toolchain.ppc32.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
/branches/arm/contrib/toolchain/toolchain.ppc64.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.1" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
/branches/arm/contrib/toolchain/toolchain.mipsel32.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.1" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
/branches/arm/contrib/toolchain/toolchain.mipseb32.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.1" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
32,7 → 32,7 |
PLATFORM="mips" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-linux-gnu" |
TARGET="${PLATFORM}-sgi-irix5" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
/branches/arm/contrib/toolchain/toolchain.sparc64.sh |
---|
19,8 → 19,8 |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19.1" |
GCC_VERSION="4.3.3" |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.3.1" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
/branches/arm/contrib/conf/ppc32-qe.sh |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/branches/arm/contrib/conf/arm32-gx.sh |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/branches/arm/contrib/conf/ia32-qe.sh |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/branches/arm/contrib/conf/mips32-gx.sh |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
Deleted: svn:mergeinfo |
/branches/arm/contrib/conf/msim.conf |
---|
3,7 → 3,6 |
# |
add dcpu cpu0 |
add dcpu cpu1 |
add rwm mainmem 0x00000000 |
mainmem generic 16M |
11,7 → 10,7 |
add rom bootmem 0x1fc00000 |
bootmem generic 4096k |
bootmem load "image.boot" |
bootmem load "image.boot" |
add dprinter printer 0x10000000 |
add dkeyboard keyboard 0x10000000 2 |
/branches/arm/contrib/conf/gxemul.sh |
---|
0,0 → 1,3 |
#!/bin/sh |
gxemul $@ -E testmips -C R4000 -X image.boot |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/branches/arm/contrib/conf/pearpc.conf |
---|
1,7 → 1,7 |
ppc_start_resolution = "800x600x32" |
pci_ide0_master_installed = 0 |
pci_ide0_master_installed = 1 |
pci_ide0_master_image = "image.iso" |
pci_ide0_master_type = "cdrom" |
prom_bootmethod = "force" |
prom_loadfile = "image.boot" |
key_toggle_mouse_grab = "F11" |
/branches/arm/tools/xtui.py |
---|
File deleted |
/branches/arm/tools/mkfat.py |
---|
34,276 → 34,7 |
import os |
import random |
import xstruct |
import array |
exclude_names = set(['.svn']) |
def align_up(size, alignment): |
"Return size aligned up to alignment" |
if (size % alignment == 0): |
return size |
return (((size / alignment) + 1) * alignment) |
def subtree_size(root, cluster_size, dirent_size): |
"Recursive directory walk and calculate size" |
size = 0 |
files = 2 |
for name in os.listdir(root): |
canon = os.path.join(root, name) |
if (os.path.isfile(canon) and (not name in exclude_names)): |
size += align_up(os.path.getsize(canon), cluster_size) |
files += 1 |
if (os.path.isdir(canon) and (not name in exclude_names)): |
size += subtree_size(canon, cluster_size, dirent_size) |
files += 1 |
return size + align_up(files * dirent_size, cluster_size) |
def root_entries(root): |
"Return number of root directory entries" |
return len(os.listdir(root)) |
def write_file(path, outf, cluster_size, data_start, fat, reserved_clusters): |
"Store the contents of a file" |
size = os.path.getsize(path) |
prev = -1 |
first = 0 |
inf = file(path, "r") |
rd = 0; |
while (rd < size): |
empty_cluster = fat.index(0) |
fat[empty_cluster] = 0xffff |
if (prev != -1): |
fat[prev] = empty_cluster |
else: |
first = empty_cluster |
prev = empty_cluster |
data = inf.read(cluster_size); |
outf.seek(data_start + (empty_cluster - reserved_clusters) * cluster_size) |
outf.write(data) |
rd += len(data) |
inf.close() |
return first, size |
def write_directory(directory, outf, cluster_size, data_start, fat, reserved_clusters, dirent_size, empty_cluster): |
"Store the contents of a directory" |
length = len(directory) |
size = length * dirent_size |
prev = -1 |
first = 0 |
i = 0 |
rd = 0; |
while (rd < size): |
if (prev != -1): |
empty_cluster = fat.index(0) |
fat[empty_cluster] = 0xffff |
fat[prev] = empty_cluster |
else: |
first = empty_cluster |
prev = empty_cluster |
data = '' |
data_len = 0 |
while ((i < length) and (data_len < cluster_size)): |
if (i == 0): |
directory[i].cluster = empty_cluster |
data += directory[i].pack() |
data_len += dirent_size |
i += 1 |
outf.seek(data_start + (empty_cluster - reserved_clusters) * cluster_size) |
outf.write(data) |
rd += len(data) |
return first, size |
DIR_ENTRY = """little: |
char name[8] /* file name */ |
char ext[3] /* file extension */ |
uint8_t attr /* file attributes */ |
uint8_t lcase /* file name case (NT extension) */ |
uint8_t ctime_fine /* create time (fine resolution) */ |
uint16_t ctime /* create time */ |
uint16_t cdate /* create date */ |
uint16_t adate /* access date */ |
padding[2] /* EA-index */ |
uint16_t mtime /* modification time */ |
uint16_t mdate /* modification date */ |
uint16_t cluster /* first cluster */ |
uint32_t size /* file size */ |
""" |
DOT_DIR_ENTRY = """little: |
uint8_t signature /* 0x2e signature */ |
char name[7] /* empty */ |
char ext[3] /* empty */ |
uint8_t attr /* file attributes */ |
padding[1] /* reserved for NT */ |
uint8_t ctime_fine /* create time (fine resolution) */ |
uint16_t ctime /* create time */ |
uint16_t cdate /* create date */ |
uint16_t adate /* access date */ |
padding[2] /* EA-index */ |
uint16_t mtime /* modification time */ |
uint16_t mdate /* modification date */ |
uint16_t cluster /* first cluster */ |
uint32_t size /* file size */ |
""" |
DOTDOT_DIR_ENTRY = """little: |
uint8_t signature[2] /* 0x2e signature */ |
char name[6] /* empty */ |
char ext[3] /* empty */ |
uint8_t attr /* file attributes */ |
padding[1] /* reserved for NT */ |
uint8_t ctime_fine /* create time (fine resolution) */ |
uint16_t ctime /* create time */ |
uint16_t cdate /* create date */ |
uint16_t adate /* access date */ |
padding[2] /* EA-index */ |
uint16_t mtime /* modification time */ |
uint16_t mdate /* modification date */ |
uint16_t cluster /* first cluster */ |
uint32_t size /* file size */ |
""" |
def mangle_fname(name): |
# FIXME: filter illegal characters |
parts = name.split('.') |
if (len(parts) > 0): |
fname = parts[0] |
else: |
fname = '' |
return (fname + ' ').upper()[0:8] |
def mangle_ext(name): |
# FIXME: filter illegal characters |
parts = name.split('.') |
if (len(parts) > 1): |
ext = parts[1] |
else: |
ext = '' |
return (ext + ' ').upper()[0:3] |
def create_dirent(name, directory, cluster, size): |
dir_entry = xstruct.create(DIR_ENTRY) |
dir_entry.name = mangle_fname(name) |
dir_entry.ext = mangle_ext(name) |
if (directory): |
dir_entry.attr = 0x30 |
else: |
dir_entry.attr = 0x20 |
dir_entry.lcase = 0x18 |
dir_entry.ctime_fine = 0 # FIXME |
dir_entry.ctime = 0 # FIXME |
dir_entry.cdate = 0 # FIXME |
dir_entry.adate = 0 # FIXME |
dir_entry.mtime = 0 # FIXME |
dir_entry.mdate = 0 # FIXME |
dir_entry.cluster = cluster |
if (directory): |
dir_entry.size = 0 |
else: |
dir_entry.size = size |
return dir_entry |
def create_dot_dirent(empty_cluster): |
dir_entry = xstruct.create(DOT_DIR_ENTRY) |
dir_entry.signature = 0x2e |
dir_entry.name = ' ' |
dir_entry.ext = ' ' |
dir_entry.attr = 0x10 |
dir_entry.ctime_fine = 0 # FIXME |
dir_entry.ctime = 0 # FIXME |
dir_entry.cdate = 0 # FIXME |
dir_entry.adate = 0 # FIXME |
dir_entry.mtime = 0 # FIXME |
dir_entry.mdate = 0 # FIXME |
dir_entry.cluster = empty_cluster |
dir_entry.size = 0 |
return dir_entry |
def create_dotdot_dirent(parent_cluster): |
dir_entry = xstruct.create(DOTDOT_DIR_ENTRY) |
dir_entry.signature = [0x2e, 0x2e] |
dir_entry.name = ' ' |
dir_entry.ext = ' ' |
dir_entry.attr = 0x10 |
dir_entry.ctime_fine = 0 # FIXME |
dir_entry.ctime = 0 # FIXME |
dir_entry.cdate = 0 # FIXME |
dir_entry.adate = 0 # FIXME |
dir_entry.mtime = 0 # FIXME |
dir_entry.mdate = 0 # FIXME |
dir_entry.cluster = parent_cluster |
dir_entry.size = 0 |
return dir_entry |
def recursion(head, root, outf, cluster_size, root_start, data_start, fat, reserved_clusters, dirent_size, parent_cluster): |
"Recursive directory walk" |
directory = [] |
if (not head): |
# Directory cluster preallocation |
empty_cluster = fat.index(0) |
fat[empty_cluster] = 0xffff |
directory.append(create_dot_dirent(empty_cluster)) |
directory.append(create_dotdot_dirent(parent_cluster)) |
else: |
empty_cluster = 0 |
for name in os.listdir(root): |
canon = os.path.join(root, name) |
if (os.path.isfile(canon) and (not name in exclude_names)): |
rv = write_file(canon, outf, cluster_size, data_start, fat, reserved_clusters) |
directory.append(create_dirent(name, False, rv[0], rv[1])) |
if (os.path.isdir(canon) and (not name in exclude_names)): |
rv = recursion(False, canon, outf, cluster_size, root_start, data_start, fat, reserved_clusters, dirent_size, empty_cluster) |
directory.append(create_dirent(name, True, rv[0], rv[1])) |
if (head): |
outf.seek(root_start) |
for dir_entry in directory: |
outf.write(dir_entry.pack()) |
else: |
return write_directory(directory, outf, cluster_size, data_start, fat, reserved_clusters, dirent_size, empty_cluster) |
BOOT_SECTOR = """little: |
uint8_t jmp[3] /* jump instruction */ |
char oem[8] /* OEM string */ |
331,14 → 62,6 |
uint8_t boot_signature[2] /* boot signature */ |
""" |
EMPTY_SECTOR = """little: |
padding[512] /* empty sector data */ |
""" |
FAT_ENTRY = """little: |
uint16_t next /* FAT16 entry */ |
""" |
def usage(prname): |
"Print usage syntax" |
print prname + " <PATH> <IMAGE>" |
353,59 → 76,27 |
print "<PATH> must be a directory" |
return |
fat16_clusters = 4096 |
sector_size = 512 |
cluster_size = 4096 |
dirent_size = 32 |
fatent_size = 2 |
fat_count = 2 |
reserved_clusters = 2 |
# Make sure the filesystem is large enought for FAT16 |
size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size |
while (size / cluster_size < fat16_clusters): |
if (cluster_size > sector_size): |
cluster_size /= 2 |
size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size |
else: |
size = fat16_clusters * cluster_size + reserved_clusters * cluster_size |
root_size = align_up(root_entries(path) * dirent_size, cluster_size) |
fat_size = align_up(align_up(size, cluster_size) / cluster_size * fatent_size, sector_size) |
sectors = (cluster_size + fat_count * fat_size + root_size + size) / sector_size |
root_start = cluster_size + fat_count * fat_size |
data_start = root_start + root_size |
outf = file(sys.argv[2], "w") |
boot_sector = xstruct.create(BOOT_SECTOR) |
boot_sector.jmp = [0xEB, 0x3C, 0x90] |
boot_sector.oem = "MSDOS5.0" |
boot_sector.sector = sector_size |
boot_sector.cluster = cluster_size / sector_size |
boot_sector.reserved = cluster_size / sector_size |
boot_sector.fats = fat_count |
boot_sector.rootdir = root_size / dirent_size |
if (sectors <= 65535): |
boot_sector.sectors = sectors |
else: |
boot_sector.sectors = 0 |
boot_sector.sector = 512 |
boot_sector.cluster = 8 # 4096 bytes per cluster |
boot_sector.reserved = 1 |
boot_sector.fats = 2 |
boot_sector.rootdir = 224 # FIXME: root directory should be sector aligned |
boot_sector.sectors = 0 # FIXME |
boot_sector.descriptor = 0xF8 |
boot_sector.fat_sectors = fat_size / sector_size |
boot_sector.track_sectors = 63 |
boot_sector.heads = 6 |
boot_sector.fat_sectors = 0 # FIXME |
boot_sector.track_sectors = 0 # FIXME |
boot_sector.heads = 0 # FIXME |
boot_sector.hidden = 0 |
if (sectors > 65535): |
boot_sector.sectors_big = sectors |
else: |
boot_sector.sectors_big = 0 |
boot_sector.sectors_big = 0 # FIXME |
boot_sector.drive = 0x80 |
boot_sector.drive = 0 |
boot_sector.extboot_signature = 0x29 |
boot_sector.serial = random.randint(0, 0x7fffffff) |
boot_sector.serial = random.randint(0, 0xFFFFFFFF) |
boot_sector.label = "HELENOS" |
boot_sector.fstype = "FAT16 " |
boot_sector.boot_signature = [0x55, 0xAA] |
412,39 → 103,6 |
outf.write(boot_sector.pack()) |
empty_sector = xstruct.create(EMPTY_SECTOR) |
# Reserved sectors |
for i in range(1, cluster_size / sector_size): |
outf.write(empty_sector.pack()) |
# FAT tables |
for i in range(0, fat_count): |
for j in range(0, fat_size / sector_size): |
outf.write(empty_sector.pack()) |
# Root directory |
for i in range(0, root_size / sector_size): |
outf.write(empty_sector.pack()) |
# Data |
for i in range(0, size / sector_size): |
outf.write(empty_sector.pack()) |
fat = array.array('L', [0] * (fat_size / fatent_size)) |
fat[0] = 0xfff8 |
fat[1] = 0xffff |
recursion(True, path, outf, cluster_size, root_start, data_start, fat, reserved_clusters, dirent_size, 0) |
# Store FAT |
fat_entry = xstruct.create(FAT_ENTRY) |
for i in range(0, fat_count): |
outf.seek(cluster_size + i * fat_size) |
for j in range(0, fat_size / fatent_size): |
fat_entry.next = fat[j] |
outf.write(fat_entry.pack()) |
outf.close() |
if __name__ == '__main__': |
/branches/arm/tools/mktmpfs.py |
---|
34,8 → 34,6 |
import os |
import xstruct |
exclude_names = set(['.svn']) |
HEADER = """little: |
char tag[5] /* 'TMPFS' */ |
""" |
72,7 → 70,7 |
for name in os.listdir(root): |
canon = os.path.join(root, name) |
if (os.path.isfile(canon) and (not name in exclude_names)): |
if (os.path.isfile(canon)): |
size = os.path.getsize(canon) |
dentry = xstruct.create(DENTRY_FILE % len(name)) |
91,7 → 89,7 |
rd += len(data) |
inf.close() |
if (os.path.isdir(canon) and (not name in exclude_names)): |
if (os.path.isdir(canon)): |
dentry = xstruct.create(DENTRY_DIRECTORY % len(name)) |
dentry.kind = TMPFS_DIRECTORY |
dentry.fname_len = len(name) |
/branches/arm/tools/mkfat.sh |
---|
0,0 → 1,73 |
#!/bin/bash |
# |
# Copyright (c) 2008 Jakub Jermar |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
MFORMAT=`which mformat` |
MCOPY=`which mcopy` |
if [ `which mformat` == "" ]; then |
echo "Please install mtools." |
exit 1 |
fi |
if [ `which mcopy` == "" ]; then |
echo "Please install mtools." |
exit 1 |
fi |
if [ $# -ne 2 ]; then |
echo "Usage: $0 <PATH> <IMAGE>" |
exit 1 |
fi |
if [ ! -d $1 ]; then |
echo "Usage: $0 <PATH> <IMAGE>" |
exit 1 |
fi |
BPS=512 |
SPC=4 |
FAT16_MIN_SEC=$((4085 * $SPC)) |
HEADS=2 |
TRACKS=16 |
BYTES=`du -sb $1 | cut -f 1` |
SECTORS=$(($BYTES / $BPS)) |
SPTPH=$((($SECTORS + $FAT16_MIN_SEC) / ($HEADS * $TRACKS))) |
# Format the image as FAT16 |
$MFORMAT -h $HEADS -t $TRACKS -s $SPTPH -M $BPS -c $SPC -v "FAT16HORD" -B /dev/zero -C -i $2 :: |
if [ $? -ne 0 ]; then |
echo "$MFORMAT failed: $?" |
exit $? |
fi |
# Copy the subtree to the image |
$MCOPY -vspQmi $2 $1/* :: |
exit $? |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/branches/arm/tools/config.py |
---|
1,7 → 1,6 |
#!/usr/bin/env python |
# |
# Copyright (c) 2006 Ondrej Palkovsky |
# Copyright (c) 2009 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
28,432 → 27,512 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
""" |
HelenOS configuration system |
HelenOS configuration script |
""" |
import sys |
import os |
import re |
import commands |
import xtui |
INPUT = sys.argv[1] |
MAKEFILE = 'Makefile.config' |
MACROS = 'config.h' |
DEFS = 'config.defs' |
PRECONF = 'defaults' |
OUTPUT = 'Makefile.config' |
TMPOUTPUT = 'Makefile.config.tmp' |
def read_defaults(fname, defaults): |
"Read saved values from last configuration run" |
inf = file(fname, 'r') |
for line in inf: |
res = re.match(r'^(?:#!# )?([^#]\w*)\s*=\s*(.*?)\s*$', line) |
if (res): |
defaults[res.group(1)] = res.group(2) |
inf.close() |
class DefaultDialog: |
"Wrapper dialog that tries to return default values" |
def __init__(self, dlg): |
self.dlg = dlg |
def check_condition(text, defaults, ask_names): |
"Check that the condition specified on input line is True (only CNF and DNF is supported)" |
ctype = 'cnf' |
if ((')|' in text) or ('|(' in text)): |
ctype = 'dnf' |
if (ctype == 'cnf'): |
conds = text.split('&') |
else: |
conds = text.split('|') |
for cond in conds: |
if (cond.startswith('(')) and (cond.endswith(')')): |
cond = cond[1:-1] |
inside = check_inside(cond, defaults, ctype) |
if (ctype == 'cnf') and (not inside): |
return False |
if (ctype == 'dnf') and (inside): |
return True |
if (ctype == 'cnf'): |
return True |
return False |
def set_title(self,text): |
self.dlg.set_title(text) |
def yesno(self, text, default=None): |
if default is not None: |
return default |
return self.dlg.yesno(text, default) |
def noyes(self, text, default=None): |
if default is not None: |
return default |
return self.dlg.noyes(text, default) |
def choice(self, text, choices, defopt=None): |
if defopt is not None: |
return choices[defopt][0] |
return self.dlg.choice(text, choices, defopt) |
def check_inside(text, defaults, ctype): |
"Check for condition" |
if (ctype == 'cnf'): |
conds = text.split('|') |
else: |
conds = text.split('&') |
for cond in conds: |
res = re.match(r'^(.*?)(!?=)(.*)$', cond) |
if (not res): |
raise RuntimeError("Invalid condition: %s" % cond) |
condname = res.group(1) |
oper = res.group(2) |
condval = res.group(3) |
if (not defaults.has_key(condname)): |
varval = '' |
else: |
varval = defaults[condname] |
if (varval == '*'): |
varval = 'y' |
if (ctype == 'cnf'): |
if (oper == '=') and (condval == varval): |
return True |
if (oper == '!=') and (condval != varval): |
return True |
else: |
if (oper == '=') and (condval != varval): |
return False |
if (oper == '!=') and (condval == varval): |
return False |
if (ctype == 'cnf'): |
return False |
return True |
class NoDialog: |
def __init__(self): |
self.printed = None |
self.title = 'HelenOS Configuration' |
def parse_config(fname, ask_names): |
"Parse configuration file" |
inf = file(fname, 'r') |
name = '' |
choices = [] |
for line in inf: |
if (line.startswith('!')): |
# Ask a question |
res = re.search(r'!\s*(?:\[(.*?)\])?\s*([^\s]+)\s*\((.*)\)\s*$', line) |
if (not res): |
raise RuntimeError("Weird line: %s" % line) |
cond = res.group(1) |
varname = res.group(2) |
vartype = res.group(3) |
ask_names.append((varname, vartype, name, choices, cond)) |
name = '' |
choices = [] |
continue |
if (line.startswith('@')): |
# Add new line into the 'choices' array |
res = re.match(r'@\s*(?:\[(.*?)\])?\s*"(.*?)"\s*(.*)$', line) |
if not res: |
raise RuntimeError("Bad line: %s" % line) |
choices.append((res.group(2), res.group(3))) |
continue |
if (line.startswith('%')): |
# Name of the option |
name = line[1:].strip() |
continue |
if ((line.startswith('#')) or (line == '\n')): |
# Comment or empty line |
continue |
raise RuntimeError("Unknown syntax: %s" % line) |
inf.close() |
def print_title(self): |
if not self.printed: |
sys.stdout.write("\n*** %s ***\n" % self.title) |
self.printed = True |
def yes_no(default): |
"Return '*' if yes, ' ' if no" |
if (default == 'y'): |
return '*' |
return ' ' |
def set_title(self, text): |
self.title = text |
self.printed = False |
def noyes(self, text, default=None): |
if not default: |
default = 'n' |
return self.yesno(text, default) |
def yesno(self, text, default=None): |
self.print_title() |
if default != 'n': |
default = 'y' |
while 1: |
sys.stdout.write("%s (y/n)[%s]: " % (text,default)) |
inp = sys.stdin.readline() |
if not inp: |
raise EOFError |
inp = inp.strip().lower() |
if not inp: |
return default |
if inp == 'y': |
return 'y' |
elif inp == 'n': |
return 'n' |
def subchoice(screen, name, choices, default): |
"Return choice of choices" |
maxkey = 0 |
for key, val in choices: |
length = len(key) |
if (length > maxkey): |
maxkey = length |
options = [] |
position = None |
cnt = 0 |
for key, val in choices: |
if ((default) and (key == default)): |
position = cnt |
options.append(" %-*s %s " % (maxkey, key, val)) |
cnt += 1 |
(button, value) = xtui.choice_window(screen, name, 'Choose value', options, position) |
if (button == 'cancel'): |
return None |
return choices[value][0] |
def _print_choice(self, text, choices, defopt): |
sys.stdout.write('%s:\n' % text) |
for i,(text,descr) in enumerate(choices): |
if descr is '': |
sys.stdout.write('\t%2d. %s\n' % (i, text)) |
else: |
sys.stdout.write('\t%2d. %s\n' % (i, descr)) |
if defopt is not None: |
sys.stdout.write('Enter choice number[%d]: ' % defopt) |
else: |
sys.stdout.write('Enter choice number: ') |
def check_choices(defaults, ask_names): |
"Check whether all accessible variables have a default" |
for varname, vartype, name, choices, cond in ask_names: |
if ((cond) and (not check_condition(cond, defaults, ask_names))): |
continue |
if (not defaults.has_key(varname)): |
return False |
return True |
def menu(self, text, choices, button, defopt=None): |
self.title = 'Main menu' |
menu = [] |
for key, descr in choices: |
txt = key + (45-len(key))*' ' + ': ' + descr |
menu.append((key, txt)) |
return self.choice(text, [button] + menu) |
def choice(self, text, choices, defopt=None): |
self.print_title() |
while 1: |
self._print_choice(text, choices, defopt) |
inp = sys.stdin.readline() |
if not inp: |
raise EOFError |
if not inp.strip(): |
if defopt is not None: |
return choices[defopt][0] |
continue |
try: |
number = int(inp.strip()) |
except ValueError: |
continue |
if number < 0 or number >= len(choices): |
continue |
return choices[number][0] |
def create_output(mkname, mcname, dfname, defaults, ask_names): |
"Create output configuration" |
revision = commands.getoutput('svnversion . 2> /dev/null') |
timestamp = commands.getoutput('date "+%Y-%m-%d %H:%M:%S"') |
outmk = file(mkname, 'w') |
outmc = file(mcname, 'w') |
outdf = file(dfname, 'w') |
outmk.write('#########################################\n') |
outmk.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n') |
outmk.write('#########################################\n\n') |
outmc.write('/***************************************\n') |
outmc.write(' * AUTO-GENERATED FILE, DO NOT EDIT!!! *\n') |
outmc.write(' ***************************************/\n\n') |
outdf.write('#########################################\n') |
outdf.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n') |
outdf.write('#########################################\n\n') |
outdf.write('CONFIG_DEFS =') |
for varname, vartype, name, choices, cond in ask_names: |
if ((cond) and (not check_condition(cond, defaults, ask_names))): |
continue |
if (not defaults.has_key(varname)): |
default = '' |
else: |
default = defaults[varname] |
if (default == '*'): |
default = 'y' |
outmk.write('# %s\n%s = %s\n\n' % (name, varname, default)) |
if ((vartype == "y") or (vartype == "n") or (vartype == "y/n") or (vartype == "n/y")): |
if (default == "y"): |
outmc.write('/* %s */\n#define %s\n\n' % (name, varname)) |
outdf.write(' -D%s' % varname) |
else: |
outmc.write('/* %s */\n#define %s %s\n#define %s_%s\n\n' % (name, varname, default, varname, default)) |
outdf.write(' -D%s=%s -D%s_%s' % (varname, default, varname, default)) |
outmk.write('REVISION = %s\n' % revision) |
outmk.write('TIMESTAMP = %s\n' % timestamp) |
outmc.write('#define REVISION %s\n' % revision) |
outmc.write('#define TIMESTAMP %s\n' % timestamp) |
outdf.write(' "-DREVISION=%s" "-DTIMESTAMP=%s"\n' % (revision, timestamp)) |
outmk.close() |
outmc.close() |
outdf.close() |
def sorted_dir(root): |
list = os.listdir(root) |
list.sort() |
return list |
def eof_checker(fnc): |
def wrapper(self, *args, **kw): |
try: |
return fnc(self, *args, **kw) |
except EOFError: |
return getattr(self.bckdialog,fnc.func_name)(*args, **kw) |
return wrapper |
def read_preconfigured(root, fname, screen, defaults): |
options = [] |
opt2path = {} |
cnt = 0 |
# Look for profiles |
for name in sorted_dir(root): |
path = os.path.join(root, name) |
canon = os.path.join(path, fname) |
if ((os.path.isdir(path)) and (os.path.exists(canon)) and (os.path.isfile(canon))): |
subprofile = False |
# Look for subprofiles |
for subname in sorted_dir(path): |
subpath = os.path.join(path, subname) |
subcanon = os.path.join(subpath, fname) |
if ((os.path.isdir(subpath)) and (os.path.exists(subcanon)) and (os.path.isfile(subcanon))): |
subprofile = True |
options.append("%s (%s)" % (name, subname)) |
opt2path[cnt] = (canon, subcanon) |
cnt += 1 |
if (not subprofile): |
options.append(name) |
opt2path[cnt] = (canon, None) |
cnt += 1 |
(button, value) = xtui.choice_window(screen, 'Load preconfigured defaults', 'Choose configuration profile', options, None) |
if (button == 'cancel'): |
return None |
read_defaults(opt2path[value][0], defaults) |
if (opt2path[value][1] != None): |
read_defaults(opt2path[value][1], defaults) |
class Dialog(NoDialog): |
def __init__(self): |
NoDialog.__init__(self) |
self.dlgcmd = os.environ.get('DIALOG','dialog') |
self.title = '' |
self.backtitle = 'HelenOS Configuration' |
if os.system('%s --print-maxsize >/dev/null 2>&1' % self.dlgcmd) != 0: |
raise NotImplementedError |
self.bckdialog = NoDialog() |
def set_title(self,text): |
self.title = text |
self.bckdialog.set_title(text) |
def calldlg(self,*args,**kw): |
"Wrapper for calling 'dialog' program" |
indesc, outdesc = os.pipe() |
pid = os.fork() |
if not pid: |
os.close(2) |
os.dup(outdesc) |
os.close(indesc) |
dlgargs = [self.dlgcmd,'--title',self.title, |
'--backtitle', self.backtitle] |
for key,val in kw.items(): |
dlgargs.append('--'+key) |
dlgargs.append(val) |
dlgargs += args |
os.execlp(self.dlgcmd,*dlgargs) |
os.close(outdesc) |
try: |
errout = os.fdopen(indesc,'r') |
data = errout.read() |
errout.close() |
pid,status = os.wait() |
except: |
os.system('reset') # Reset terminal |
raise |
if not os.WIFEXITED(status): |
os.system('reset') # Reset terminal |
raise EOFError |
status = os.WEXITSTATUS(status) |
if status == 255: |
raise EOFError |
return status,data |
def yesno(self, text, default=None): |
if text[-1] not in ('?',':'): |
text = text + ':' |
width = '50' |
height = '5' |
if len(text) < 48: |
text = ' '*int(((48-len(text))/2)) + text |
else: |
width = '0' |
height = '0' |
if default == 'n': |
res,data = self.calldlg('--defaultno','--yesno',text,height,width) |
else: |
res,data = self.calldlg('--yesno',text,height,width) |
if res == 0: |
return 'y' |
return 'n' |
yesno = eof_checker(yesno) |
def menu(self, text, choices, button, defopt=None): |
self.title = 'Main menu' |
text = text + ':' |
width = '70' |
height = str(8 + len(choices)) |
args = [] |
for key,val in choices: |
args.append(key) |
args.append(val) |
kw = {} |
if defopt: |
kw['default-item'] = choices[defopt][0] |
res,data = self.calldlg('--ok-label','Change', |
'--extra-label',button[1], |
'--extra-button', |
'--menu',text,height,width, |
str(len(choices)),*args,**kw) |
if res == 3: |
return button[0] |
if res == 1: # Cancel |
sys.exit(1) |
elif res: |
print data |
raise EOFError |
return data |
menu = eof_checker(menu) |
def choice(self, text, choices, defopt=None): |
text = text + ':' |
width = '50' |
height = str(8 + len(choices)) |
args = [] |
for key,val in choices: |
args.append(key) |
args.append(val) |
kw = {} |
if defopt: |
kw['default-item'] = choices[defopt][0] |
res,data = self.calldlg('--nocancel','--menu',text,height,width, |
str(len(choices)),*args, **kw) |
if res: |
print data |
raise EOFError |
return data |
choice = eof_checker(choice) |
def read_defaults(fname,defaults): |
"Read saved values from last configuration run" |
f = file(fname,'r') |
for line in f: |
res = re.match(r'^(?:#!# )?([^#]\w*)\s*=\s*(.*?)\s*$', line) |
if res: |
defaults[res.group(1)] = res.group(2) |
f.close() |
def check_condition(text, defaults, asked_names): |
seen_vars = [ x[0] for x in asked_names ] |
ctype = 'cnf' |
if ')|' in text or '|(' in text: |
ctype = 'dnf' |
if ctype == 'cnf': |
conds = text.split('&') |
else: |
conds = text.split('|') |
for cond in conds: |
if cond.startswith('(') and cond.endswith(')'): |
cond = cond[1:-1] |
inside = check_inside(cond, defaults, ctype, seen_vars) |
if ctype == 'cnf' and not inside: |
return False |
if ctype == 'dnf' and inside: |
return True |
if ctype == 'cnf': |
return True |
return False |
def check_inside(text, defaults, ctype, seen_vars): |
""" |
Check that the condition specified on input line is True |
only CNF is supported |
""" |
if ctype == 'cnf': |
conds = text.split('|') |
else: |
conds = text.split('&') |
for cond in conds: |
res = re.match(r'^(.*?)(!?=)(.*)$', cond) |
if not res: |
raise RuntimeError("Invalid condition: %s" % cond) |
condname = res.group(1) |
oper = res.group(2) |
condval = res.group(3) |
if condname not in seen_vars: |
varval = '' |
## raise RuntimeError("Variable %s not defined before being asked." %\ |
## condname) |
elif not defaults.has_key(condname): |
raise RuntimeError("Condition var %s does not exist: %s" % \ |
(condname,text)) |
else: |
varval = defaults[condname] |
if ctype == 'cnf': |
if oper == '=' and condval == varval: |
return True |
if oper == '!=' and condval != varval: |
return True |
else: |
if oper== '=' and condval != varval: |
return False |
if oper== '!=' and condval == varval: |
return False |
if ctype=='cnf': |
return False |
return True |
def parse_config(input, output, dlg, defaults={}, askonly=None): |
"Parse configuration file and create Makefile.config on the fly" |
def ask_the_question(dialog): |
"Ask question based on the type of variables to ask" |
# This is quite a hack, this thingy is written just to |
# have access to local variables.. |
if vartype == 'y/n': |
return dialog.yesno(comment, default) |
elif vartype == 'n/y': |
return dialog.noyes(comment, default) |
elif vartype == 'choice': |
defopt = None |
if default is not None: |
for i,(key,val) in enumerate(choices): |
if key == default: |
defopt = i |
break |
return dialog.choice(comment, choices, defopt) |
else: |
raise RuntimeError("Bad method: %s" % vartype) |
f = file(input, 'r') |
outf = file(output, 'w') |
outf.write('#########################################\n') |
outf.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n') |
outf.write('#########################################\n\n') |
asked_names = [] |
comment = '' |
default = None |
choices = [] |
for line in f: |
if line.startswith('%'): |
res = re.match(r'^%\s*(?:\[(.*?)\])?\s*(.*)$', line) |
if not res: |
raise RuntimeError('Invalid command: %s' % line) |
if res.group(1): |
if not check_condition(res.group(1), defaults, |
asked_names): |
continue |
args = res.group(2).strip().split(' ') |
cmd = args[0].lower() |
args = args[1:] |
if cmd == 'saveas': |
outf.write('%s = %s\n' % (args[1],defaults[args[0]])) |
elif cmd == 'shellcmd': |
varname = args[0] |
args = args[1:] |
for i,arg in enumerate(args): |
if arg.startswith('$'): |
args[i] = defaults[arg[1:]] |
data,status = commands.getstatusoutput(' '.join(args)) |
if status: |
raise RuntimeError('Error running: %s' % ' '.join(args)) |
outf.write('%s = %s\n' % (varname,data.strip())) |
continue |
if line.startswith('!'): |
# Ask a question |
res = re.search(r'!\s*(?:\[(.*?)\])?\s*([^\s]+)\s*\((.*)\)\s*$', line) |
if not res: |
raise RuntimeError("Weird line: %s" % line) |
varname = res.group(2) |
vartype = res.group(3) |
default = defaults.get(varname,None) |
if res.group(1): |
if not check_condition(res.group(1), defaults, |
asked_names): |
if default is not None: |
outf.write('#!# %s = %s\n' % (varname, default)) |
# Clear cumulated values |
comment = '' |
default = None |
choices = [] |
continue |
asked_names.append((varname,comment)) |
if default is None or not askonly or askonly == varname: |
default = ask_the_question(dlg) |
else: |
default = ask_the_question(DefaultDialog(dlg)) |
outf.write('%s = %s\n' % (varname, default)) |
# Remeber the selected value |
defaults[varname] = default |
# Clear cumulated values |
comment = '' |
default = None |
choices = [] |
continue |
if line.startswith('@'): |
# Add new line into the 'choice array' |
res = re.match(r'@\s*(?:\[(.*?)\])?\s*"(.*?)"\s*(.*)$', line) |
if not res: |
raise RuntimeError("Bad line: %s" % line) |
if res.group(1): |
if not check_condition(res.group(1),defaults, |
asked_names): |
continue |
choices.append((res.group(2), res.group(3))) |
continue |
# All other things print to output file |
outf.write(line) |
if re.match(r'^#[^#]', line): |
# Last comment before question will be displayed to the user |
comment = line[1:].strip() |
elif line.startswith('## '): |
# Set title of the dialog window |
dlg.set_title(line[2:].strip()) |
outf.write('\n') |
outf.write('REVISION = %s\n' % commands.getoutput('svnversion . 2> /dev/null')) |
outf.write('TIMESTAMP = %s\n' % commands.getoutput('date "+%Y-%m-%d %H:%M:%S"')) |
outf.close() |
f.close() |
return asked_names |
def main(): |
defaults = {} |
ask_names = [] |
defaults = {} |
try: |
dlg = Dialog() |
except NotImplementedError: |
dlg = NoDialog() |
if len(sys.argv) >= 3 and sys.argv[2]=='default': |
defmode = True |
else: |
defmode = False |
# Default run will update the configuration file |
# with newest options |
if os.path.exists(OUTPUT): |
read_defaults(OUTPUT, defaults) |
# Get ARCH from command line if specified |
if len(sys.argv) >= 4: |
defaults['ARCH'] = sys.argv[3] |
defaults['PLATFORM'] = sys.argv[3] |
# Parse configuration file |
parse_config(INPUT, ask_names) |
# Get COMPILER from command line if specified |
if len(sys.argv) >= 5: |
defaults['COMPILER'] = sys.argv[4] |
# Read defaults from previous run |
if os.path.exists(MAKEFILE): |
read_defaults(MAKEFILE, defaults) |
# Get CONFIG_DEBUG from command line if specified |
if len(sys.argv) >= 6: |
defaults['CONFIG_DEBUG'] = sys.argv[5] |
# Default mode: only check defaults and regenerate configuration |
if ((len(sys.argv) >= 3) and (sys.argv[2] == 'default')): |
if (check_choices(defaults, ask_names)): |
create_output(MAKEFILE, MACROS, DEFS, defaults, ask_names) |
return 0 |
# Check mode: only check defaults |
if ((len(sys.argv) >= 3) and (sys.argv[2] == 'check')): |
if (check_choices(defaults, ask_names)): |
return 0 |
return 1 |
screen = xtui.screen_init() |
try: |
selname = None |
position = None |
while True: |
# Cancel out all defaults which have to be deduced |
for varname, vartype, name, choices, cond in ask_names: |
if ((vartype == 'y') and (defaults.has_key(varname)) and (defaults[varname] == '*')): |
defaults[varname] = None |
options = [] |
opt2row = {} |
cnt = 1 |
options.append(" --- Load preconfigured defaults ... ") |
for varname, vartype, name, choices, cond in ask_names: |
if ((cond) and (not check_condition(cond, defaults, ask_names))): |
continue |
if (varname == selname): |
position = cnt |
if (not defaults.has_key(varname)): |
default = None |
else: |
default = defaults[varname] |
if (vartype == 'choice'): |
# Check if the default is an acceptable value |
if ((default) and (not default in [choice[0] for choice in choices])): |
default = None |
defaults.pop(varname) |
# If there is just one option, use it |
if (len(choices) == 1): |
defaults[varname] = choices[0][0] |
continue |
if (default == None): |
options.append("? %s --> " % name) |
else: |
options.append(" %s [%s] --> " % (name, default)) |
elif (vartype == 'y'): |
defaults[varname] = '*' |
continue |
elif (vartype == 'n'): |
defaults[varname] = 'n' |
continue |
elif (vartype == 'y/n'): |
if (default == None): |
default = 'y' |
defaults[varname] = default |
options.append(" <%s> %s " % (yes_no(default), name)) |
elif (vartype == 'n/y'): |
if (default == None): |
default = 'n' |
defaults[varname] = default |
options.append(" <%s> %s " % (yes_no(default), name)) |
else: |
raise RuntimeError("Unknown variable type: %s" % vartype) |
opt2row[cnt] = (varname, vartype, name, choices) |
cnt += 1 |
if (position >= options): |
position = None |
(button, value) = xtui.choice_window(screen, 'HelenOS configuration', 'Choose configuration option', options, position) |
if (button == 'cancel'): |
return 'Configuration canceled' |
if (button == 'done'): |
if (check_choices(defaults, ask_names)): |
break |
else: |
xtui.error_dialog(screen, 'Error', 'Some options have still undefined values. These options are marked with the "?" sign.') |
continue |
if (value == 0): |
read_preconfigured(PRECONF, MAKEFILE, screen, defaults) |
position = 1 |
continue |
position = None |
if (not opt2row.has_key(value)): |
raise RuntimeError("Error selecting value: %s" % value) |
(selname, seltype, name, choices) = opt2row[value] |
if (not defaults.has_key(selname)): |
default = None |
else: |
default = defaults[selname] |
if (seltype == 'choice'): |
defaults[selname] = subchoice(screen, name, choices, default) |
elif ((seltype == 'y/n') or (seltype == 'n/y')): |
if (defaults[selname] == 'y'): |
defaults[selname] = 'n' |
else: |
defaults[selname] = 'y' |
finally: |
xtui.screen_done(screen) |
create_output(MAKEFILE, MACROS, DEFS, defaults, ask_names) |
return 0 |
# Get MACHINE/IMAGE from command line if specified |
if len(sys.argv) >= 7: |
defaults['MACHINE'] = sys.argv[6] |
defaults['IMAGE'] = sys.argv[6] |
# Dry run only with defaults |
varnames = parse_config(INPUT, TMPOUTPUT, DefaultDialog(dlg), defaults) |
# If not in default mode, present selection of all possibilities |
if not defmode: |
defopt = 0 |
while 1: |
# varnames contains variable names that were in the |
# last question set |
choices = [ (x[1],defaults[x[0]]) for x in varnames ] |
res = dlg.menu('Configuration',choices,('save','Save'),defopt) |
if res == 'save': |
parse_config(INPUT, TMPOUTPUT, DefaultDialog(dlg), defaults) |
break |
# transfer description back to varname |
for i,(vname,descr) in enumerate(varnames): |
if res == descr: |
defopt = i |
break |
# Ask the user a simple question, produce output |
# as if the user answered all the other questions |
# with default answer |
varnames = parse_config(INPUT, TMPOUTPUT, dlg, defaults, |
askonly=varnames[i][0]) |
if os.path.exists(OUTPUT): |
os.unlink(OUTPUT) |
os.rename(TMPOUTPUT, OUTPUT) |
if not defmode and dlg.yesno('Rebuild everything?') == 'y': |
os.execlp('make','make','clean','build') |
if __name__ == '__main__': |
sys.exit(main()) |
main() |
/branches/arm/version |
---|
1,42 → 1,8 |
# |
# Copyright (c) 2006 Martin Decky |
# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions |
# are met: |
# |
# - Redistributions of source code must retain the above copyright |
# notice, this list of conditions and the following disclaimer. |
# - Redistributions in binary form must reproduce the above copyright |
# notice, this list of conditions and the following disclaimer in the |
# documentation and/or other materials provided with the distribution. |
# - The name of the author may not be used to endorse or promote products |
# derived from this software without specific prior written permission. |
# |
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
## This file defines the release information of HelenOS. |
# |
# The release string RELEASE consists of three or four components |
# (version, patch level, sublevel and optionally an extra level). |
# |
# The NAME string is the code name of the given release. |
# |
VERSION = 0 |
PATCHLEVEL = 4 |
PATCHLEVEL = 3 |
SUBLEVEL = 0 |
#EXTRAVERSION = 0 |
NAME = Tartare |
ifdef EXTRAVERSION |
RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION) |
43,5 → 9,3 |
else |
RELEASE = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) |
endif |
NAME = Sinister Valentine |
/branches/arm/. |
---|
Property changes: |
Added: svn:mergeinfo |