URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/rtos/ecos-2.0/packages/hal/i386/pc/v2_0/include
- from Rev 27 to Rev 174
- ↔ Reverse comparison
Rev 27 → Rev 174
/plf_misc.h
0,0 → 1,84
#ifndef CYGONCE_PLF_MISC_H |
#define CYGONCE_PLF_MISC_H |
|
//========================================================================== |
// |
// plf_misc.h |
// |
// HAL platform miscellaneous functions |
// |
//========================================================================== |
//####ECOSGPLCOPYRIGHTBEGIN#### |
// ------------------------------------------- |
// This file is part of eCos, the Embedded Configurable Operating System. |
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
// |
// eCos 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 or (at your option) any later version. |
// |
// eCos 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 eCos; if not, write to the Free Software Foundation, Inc., |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
// |
// As a special exception, if other files instantiate templates or use macros |
// or inline functions from this file, or you compile this file and link it |
// with other works to produce a work based on this file, this file does not |
// by itself cause the resulting work to be covered by the GNU General Public |
// License. However the source code for this file must still be made available |
// in accordance with section (3) of the GNU General Public License. |
// |
// This exception does not invalidate any other reasons why a work based on |
// this file might be covered by the GNU General Public License. |
// |
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
// at http://sources.redhat.com/ecos/ecos-license/ |
// ------------------------------------------- |
//####ECOSGPLCOPYRIGHTEND#### |
//========================================================================== |
//#####DESCRIPTIONBEGIN#### |
// |
// Author(s): nickg |
// Contributors: nickg, jlarmour, pjo |
// Date: 1999-01-21 |
// Purpose: HAL miscellaneous functions |
// Description: This file contains miscellaneous functions provided by the |
// HAL. |
// |
//####DESCRIPTIONEND#### |
// |
//========================================================================*/ |
|
#include <pkgconf/hal.h> |
|
#include <cyg/infra/cyg_type.h> // Base types |
#include <cyg/infra/cyg_trac.h> // tracing macros |
#include <cyg/infra/cyg_ass.h> // assertion macros |
|
#include <cyg/hal/hal_arch.h> // architectural definitions |
|
#include <cyg/hal/hal_intr.h> // Interrupt handling |
|
#include <cyg/hal/hal_cache.h> // Cache handling |
|
/*------------------------------------------------------------------------*/ |
|
extern void patch_dbg_syscalls(void * vector); |
|
/*------------------------------------------------------------------------*/ |
|
void hal_platform_init(void) ; |
|
void hal_pc_reset(void) ; |
|
externC void cyg_hal_pc_set_idt_entry(CYG_ADDRESS routine,short *idtEntry); |
|
|
/*------------------------------------------------------------------------*/ |
/* End of plf_misc.h */ |
#endif //CYGONCE_PLF_MISC_H |
/plf_intr.h
0,0 → 1,89
#ifndef CYGONCE_HAL_PLF_INTR_H |
#define CYGONCE_HAL_PLF_INTR_H |
//========================================================================== |
// |
// plf_intr.h |
// |
// i386/PC Interrupt and clock support |
// |
//========================================================================== |
//####ECOSGPLCOPYRIGHTBEGIN#### |
// ------------------------------------------- |
// This file is part of eCos, the Embedded Configurable Operating System. |
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
// |
// eCos 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 or (at your option) any later version. |
// |
// eCos 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 eCos; if not, write to the Free Software Foundation, Inc., |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
// |
// As a special exception, if other files instantiate templates or use macros |
// or inline functions from this file, or you compile this file and link it |
// with other works to produce a work based on this file, this file does not |
// by itself cause the resulting work to be covered by the GNU General Public |
// License. However the source code for this file must still be made available |
// in accordance with section (3) of the GNU General Public License. |
// |
// This exception does not invalidate any other reasons why a work based on |
// this file might be covered by the GNU General Public License. |
// |
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
// at http://sources.redhat.com/ecos/ecos-license/ |
// ------------------------------------------- |
//####ECOSGPLCOPYRIGHTEND#### |
//========================================================================== |
//#####DESCRIPTIONBEGIN#### |
// |
// Author(s): proven |
// Contributors: proven, jskov, pjo |
// Date: 1999-10-15 |
// Purpose: Define Interrupt support |
// Description: The macros defined here provide the HAL APIs for handling |
// interrupts and the clock. |
// This file contains info about interrupts and |
// peripherals that are common on all PCs; for example, |
// the clock always activates irq 0 and would therefore |
// be listed here; an ethernet card is configured for |
// the individual system and would be in plf_intr.h |
// instead. |
// |
// Usage: |
// #include <cyg/hal/plf_intr.h> |
// ... |
// |
//####DESCRIPTIONEND#### |
// |
//========================================================================== |
|
#include <pkgconf/hal.h> |
#include <pkgconf/hal_i386.h> |
|
#include <cyg/infra/cyg_type.h> |
|
#include <cyg/hal/pcmb_intr.h> |
|
//---------------------------------------------------------------------------- |
// Reset. |
|
#define HAL_PLATFORM_RESET() hal_pc_reset() |
|
#define HAL_PLATFORM_RESET_ENTRY &hal_pc_reset |
|
//--------------------------------------------------------------------------- |
// Microsecond delay |
|
__externC void hal_delay_us(int us); |
|
#define HAL_DELAY_US(_us) hal_delay_us(_us) |
|
//--------------------------------------------------------------------------- |
#endif // ifndef CYGONCE_HAL_PLF_INTR_H |
// End of plf_intr.h |
/plf_arch.h
0,0 → 1,63
#ifndef CYGONCE_HAL_PLF_ARCH_H |
#define CYGONCE_HAL_PLF_ARCH_H |
|
//============================================================================= |
// |
// plf_arch.h |
// |
// PC platform specific abstractions |
// |
//============================================================================= |
//####ECOSGPLCOPYRIGHTBEGIN#### |
// ------------------------------------------- |
// This file is part of eCos, the Embedded Configurable Operating System. |
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
// |
// eCos 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 or (at your option) any later version. |
// |
// eCos 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 eCos; if not, write to the Free Software Foundation, Inc., |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
// |
// As a special exception, if other files instantiate templates or use macros |
// or inline functions from this file, or you compile this file and link it |
// with other works to produce a work based on this file, this file does not |
// by itself cause the resulting work to be covered by the GNU General Public |
// License. However the source code for this file must still be made available |
// in accordance with section (3) of the GNU General Public License. |
// |
// This exception does not invalidate any other reasons why a work based on |
// this file might be covered by the GNU General Public License. |
// |
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
// at http://sources.redhat.com/ecos/ecos-license/ |
// ------------------------------------------- |
//####ECOSGPLCOPYRIGHTEND#### |
//============================================================================= |
//#####DESCRIPTIONBEGIN#### |
// |
// Author(s): proven |
// Contributors:proven, pjo, nickg |
// Date: 1998-10-05 |
// Purpose: Define architecture abstractions |
// Usage: #include <cyg/hal/plf_arch.h> |
// |
//####DESCRIPTIONEND#### |
// |
//============================================================================= |
|
#include <pkgconf/hal.h> |
#include <cyg/infra/cyg_type.h> |
|
//#include <cyg/hal/pcmb_arch.h> |
|
//-------------------------------------------------------------------------- |
#endif // CYGONCE_HAL_PLF_ARCH_H |
// End of plf_arch.h |
/plf_stub.h
0,0 → 1,97
#ifndef CYGONCE_HAL_PLF_STUB_H |
#define CYGONCE_HAL_PLF_STUB_H |
//============================================================================= |
// |
// plf_stub.h |
// |
// Platform header for GDB stub support. |
// |
//============================================================================= |
//####ECOSGPLCOPYRIGHTBEGIN#### |
// ------------------------------------------- |
// This file is part of eCos, the Embedded Configurable Operating System. |
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
// |
// eCos 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 or (at your option) any later version. |
// |
// eCos 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 eCos; if not, write to the Free Software Foundation, Inc., |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
// |
// As a special exception, if other files instantiate templates or use macros |
// or inline functions from this file, or you compile this file and link it |
// with other works to produce a work based on this file, this file does not |
// by itself cause the resulting work to be covered by the GNU General Public |
// License. However the source code for this file must still be made available |
// in accordance with section (3) of the GNU General Public License. |
// |
// This exception does not invalidate any other reasons why a work based on |
// this file might be covered by the GNU General Public License. |
// |
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
// at http://sources.redhat.com/ecos/ecos-license/ |
// ------------------------------------------- |
//####ECOSGPLCOPYRIGHTEND#### |
//============================================================================= |
//#####DESCRIPTIONBEGIN#### |
// |
// Author(s): jskov |
// Contributors:jskov, gthomas, pjo, nickg |
// Date: 1999-02-15 |
// Purpose: Platform HAL stub support for ARM/AEB boards. |
// Usage: #include <cyg/hal/plf_stub.h> |
// |
//####DESCRIPTIONEND#### |
// |
//============================================================================= |
|
#include <pkgconf/hal.h> |
#include <pkgconf/hal_i386_pc.h> |
|
#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
|
#include <cyg/infra/cyg_type.h> // CYG_UNUSED_PARAM |
|
#include <cyg/hal/i386_stub.h> // architecture stub support |
|
//---------------------------------------------------------------------------- |
// Define serial stuff. |
|
externC void hal_pc_init_serial(void); |
externC int hal_pc_get_char(void); |
externC void hal_pc_put_char(int c); |
externC int hal_pc_interruptable(int); |
externC void hal_pc_stubs_init(void) ; |
externC void hal_pc_reset(void) ; |
|
externC void cyg_hal_plf_comms_init(void); |
|
// #define HAL_STUB_PLATFORM_INIT_SERIAL() hal_pc_init_serial() |
#define HAL_STUB_PLATFORM_INIT_SERIAL() cyg_hal_plf_comms_init() |
|
#define HAL_STUB_PLATFORM_GET_CHAR() hal_pc_get_char() |
#define HAL_STUB_PLATFORM_PUT_CHAR(c) hal_pc_put_char((c)) |
#define HAL_STUB_PLATFORM_SET_BAUD_RATE(baud) CYG_UNUSED_PARAM(int, (baud)) |
#define HAL_STUB_PLATFORM_INTERRUPTABLE (&hal_pc_interruptable) |
#define HAL_STUB_PLATFORM_INTERRUPTIBLE HAL_STUB_PLATFORM_INTERRUPTABLE |
#define HAL_STUB_PLATFORM_INIT_BREAK_IRQ() CYG_EMPTY_STATEMENT |
|
//---------------------------------------------------------------------------- |
// Stub initializer. |
|
#define HAL_STUB_PLATFORM_INIT() hal_pc_stubs_init() |
|
//----------------------------------------------------------------------------- |
|
#endif // ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
|
//----------------------------------------------------------------------------- |
#endif // CYGONCE_HAL_PLF_STUB_H |
// End of plf_stub.h |
/pkgconf/mlt_i386_pc_grub.mlt
0,0 → 1,15
version 0 |
region ram 0 1000000 0 ! |
section vectors 0 1 0 1 1 1 1 1 108000 10000 text text ! |
section text 0 4 0 1 0 1 0 1 fini fini ! |
section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 ! |
section rodata1 0 8 0 1 0 1 0 1 rodata rodata ! |
section rodata 0 8 0 1 0 1 0 1 fixup fixup ! |
section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table ! |
section gcc_except_table 0 1 0 1 0 1 0 1 rel.got rel.got ! |
section rel.got 0 1 0 1 0 1 0 1 data data ! |
section data 0 8 0 1 0 1 0 1 sbss sbss ! |
section sbss 0 4 0 1 0 1 0 1 bss bss ! |
section bss 0 10 0 1 0 1 0 1 pci_window pci_window ! |
section pci_window 64000 10 0 0 0 1 0 1 heap1 heap1 ! |
section heap1 0 8 0 0 0 0 0 0 ! |
/pkgconf/mlt_i386_pc_ram.mlt
0,0 → 1,15
version 0 |
region ram 0 1000000 0 ! |
section vectors 0 1 0 1 1 1 1 1 108000 10000 text text ! |
section text 0 4 0 1 0 1 0 1 fini fini ! |
section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 ! |
section rodata1 0 8 0 1 0 1 0 1 rodata rodata ! |
section rodata 0 8 0 1 0 1 0 1 fixup fixup ! |
section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table ! |
section gcc_except_table 0 1 0 1 0 1 0 1 rel.got rel.got ! |
section rel.got 0 1 0 1 0 1 0 1 data data ! |
section data 0 8 0 1 0 1 0 1 sbss sbss ! |
section sbss 0 4 0 1 0 1 0 1 bss bss ! |
section bss 0 10 0 1 0 1 0 1 pci_window pci_window ! |
section pci_window 64000 10 0 0 0 1 0 1 heap1 heap1 ! |
section heap1 0 8 0 0 0 0 0 0 ! |
/pkgconf/mlt_i386_pc_floppy.h
0,0 → 1,22
// eCos memory layout - Fri Oct 20 08:16:03 2000 |
|
// This is a generated file - do not edit |
|
#ifndef __ASSEMBLER__ |
#include <cyg/infra/cyg_type.h> |
#include <stddef.h> |
|
#endif |
#define CYGMEM_REGION_ram (0) |
#define CYGMEM_REGION_ram_SIZE (0xa0000) |
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) |
#ifndef __ASSEMBLER__ |
extern char CYG_LABEL_NAME (__heap1) []; |
#endif |
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) |
#define CYGMEM_SECTION_heap1_SIZE (0xa0000 - (size_t) CYG_LABEL_NAME (__heap1)) |
#ifndef __ASSEMBLER__ |
extern char CYG_LABEL_NAME (__pci_window) []; |
#endif |
#define CYGMEM_SECTION_pci_window (CYG_LABEL_NAME (__pci_window)) |
#define CYGMEM_SECTION_pci_window_SIZE (0x64000) |
/pkgconf/mlt_i386_pc_floppy.ldi
0,0 → 1,29
// eCos memory layout - Fri Oct 20 08:16:03 2000 |
|
// This is a generated file - do not edit |
|
#include <cyg/infra/cyg_type.inc> |
|
MEMORY |
{ |
ram : ORIGIN = 0, LENGTH = 0xa0000 |
} |
|
SECTIONS |
{ |
SECTIONS_BEGIN |
SECTION_vectors (ram, 0x3000, LMA_EQ_VMA) |
SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA) |
SECTION_rel__got (ram, ALIGN (0x1), LMA_EQ_VMA) |
SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA) |
CYG_LABEL_DEFN(__pci_window) = ALIGN(0x10); . = CYG_LABEL_DEFN(__pci_window) + 0x64000; |
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); |
SECTIONS_END |
} |
/pkgconf/mlt_i386_pc_rom.h
0,0 → 1,25
// eCos memory layout - Fri Oct 20 08:16:03 2000 |
|
// This is a generated file - do not edit |
|
#ifndef __ASSEMBLER__ |
#include <cyg/infra/cyg_type.h> |
#include <stddef.h> |
|
#endif |
#define CYGMEM_REGION_ram (0) |
#define CYGMEM_REGION_ram_SIZE (0xa0000) |
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) |
#define CYGMEM_REGION_rom (0xe0000) |
#define CYGMEM_REGION_rom_SIZE (0x20000) |
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R) |
#ifndef __ASSEMBLER__ |
extern char CYG_LABEL_NAME (__heap1) []; |
#endif |
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) |
#define CYGMEM_SECTION_heap1_SIZE (0xa0000 - (size_t) CYG_LABEL_NAME (__heap1)) |
#ifndef __ASSEMBLER__ |
extern char CYG_LABEL_NAME (__pci_window) []; |
#endif |
#define CYGMEM_SECTION_pci_window (CYG_LABEL_NAME (__pci_window)) |
#define CYGMEM_SECTION_pci_window_SIZE (0x64000) |
/pkgconf/mlt_i386_pc_floppy.mlt
0,0 → 1,16
version 0 |
region ram 0 a0000 0 ! |
section vectors 0 1 0 1 1 1 1 1 3000 3000 text text ! |
section text 0 4 0 1 0 1 0 1 fini fini ! |
section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 ! |
section rodata1 0 8 0 1 0 1 0 1 rodata rodata ! |
section rodata 0 8 0 1 0 1 0 1 fixup fixup ! |
section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table ! |
section gcc_except_table 0 1 0 1 0 1 0 1 rel.got rel.got ! |
section rel.got 0 1 0 1 0 1 0 1 data data ! |
section data 0 8 0 1 0 1 0 1 sbss sbss ! |
section sbss 0 4 0 1 0 1 0 1 bss bss ! |
section bss 0 10 0 1 0 1 0 1 pci_window pci_window ! |
section pci_window 64000 10 0 0 0 1 0 1 heap1 heap1 ! |
section heap1 0 8 0 0 0 0 0 0 ! |
section rom 60000 1 0 0 1 0 1 0 a0000 a0000 ! |
/pkgconf/mlt_i386_pc_rom.ldi
0,0 → 1,30
// eCos memory layout - Fri Oct 20 08:16:03 2000 |
|
// This is a generated file - do not edit |
|
#include <cyg/infra/cyg_type.inc> |
|
MEMORY |
{ |
ram : ORIGIN = 0x00000, LENGTH = 0xa0000 |
rom : ORIGIN = 0xf0000, LENGTH = 0x0ff00 |
} |
|
SECTIONS |
{ |
SECTIONS_BEGIN |
SECTION_vectors (rom, 0xf0000, LMA_EQ_VMA) |
SECTION_text (rom, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_rodata1 (rom, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_rodata (rom, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_data (ram, 0x02000, FOLLOWING(.rodata)) |
SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA) |
SECTION_rel__got (ram, ALIGN (0x1), LMA_EQ_VMA) |
SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA) |
CYG_LABEL_DEFN(__pci_window) = ALIGN(0x10); . = CYG_LABEL_DEFN(__pci_window) + 0x64000; |
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); |
SECTIONS_END |
} |
/pkgconf/mlt_i386_pc_grub.h
0,0 → 1,22
// eCos memory layout - Fri Oct 20 08:15:20 2000 |
|
// This is a generated file - do not edit |
|
#ifndef __ASSEMBLER__ |
#include <cyg/infra/cyg_type.h> |
#include <stddef.h> |
|
#endif |
#define CYGMEM_REGION_ram (0x00100000) |
#define CYGMEM_REGION_ram_SIZE (0x01000000) |
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) |
#ifndef __ASSEMBLER__ |
extern char CYG_LABEL_NAME (__heap1) []; |
#endif |
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) |
#define CYGMEM_SECTION_heap1_SIZE (0x01000000 - (size_t) CYG_LABEL_NAME (__heap1)) |
#ifndef __ASSEMBLER__ |
extern char CYG_LABEL_NAME (__pci_window) []; |
#endif |
#define CYGMEM_SECTION_pci_window (CYG_LABEL_NAME (__pci_window)) |
#define CYGMEM_SECTION_pci_window_SIZE (0x64000) |
/pkgconf/mlt_i386_pc_ram.h
0,0 → 1,22
// eCos memory layout - Fri Oct 20 08:15:20 2000 |
|
// This is a generated file - do not edit |
|
#ifndef __ASSEMBLER__ |
#include <cyg/infra/cyg_type.h> |
#include <stddef.h> |
|
#endif |
#define CYGMEM_REGION_ram (0x00100000) |
#define CYGMEM_REGION_ram_SIZE (0x01000000) |
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) |
#ifndef __ASSEMBLER__ |
extern char CYG_LABEL_NAME (__heap1) []; |
#endif |
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) |
#define CYGMEM_SECTION_heap1_SIZE (0x01000000 - (size_t) CYG_LABEL_NAME (__heap1)) |
#ifndef __ASSEMBLER__ |
extern char CYG_LABEL_NAME (__pci_window) []; |
#endif |
#define CYGMEM_SECTION_pci_window (CYG_LABEL_NAME (__pci_window)) |
#define CYGMEM_SECTION_pci_window_SIZE (0x64000) |
/pkgconf/mlt_i386_pc_ram.ldi
0,0 → 1,29
// eCos memory layout - Fri Oct 20 08:15:20 2000 |
|
// This is a generated file - do not edit |
|
#include <cyg/infra/cyg_type.inc> |
|
MEMORY |
{ |
ram : ORIGIN = 0x0, LENGTH = 0x1000000 |
} |
|
SECTIONS |
{ |
SECTIONS_BEGIN |
SECTION_vectors (ram, 0x108000, LMA_EQ_VMA) |
SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA) |
SECTION_rel__got (ram, ALIGN (0x1), LMA_EQ_VMA) |
SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA) |
CYG_LABEL_DEFN(__pci_window) = ALIGN(0x10); . = CYG_LABEL_DEFN(__pci_window) + 0x64000; |
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); |
SECTIONS_END |
} |
/pkgconf/mlt_i386_pc_grub.ldi
0,0 → 1,29
// eCos memory layout - Fri Oct 20 08:15:20 2000 |
|
// This is a generated file - do not edit |
|
#include <cyg/infra/cyg_type.inc> |
|
MEMORY |
{ |
ram : ORIGIN = 0x0, LENGTH = 0x1000000 |
} |
|
SECTIONS |
{ |
SECTIONS_BEGIN |
SECTION_vectors (ram, 0x108000, LMA_EQ_VMA) |
SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA) |
SECTION_rel__got (ram, ALIGN (0x1), LMA_EQ_VMA) |
SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA) |
SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA) |
SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA) |
CYG_LABEL_DEFN(__pci_window) = ALIGN(0x10); . = CYG_LABEL_DEFN(__pci_window) + 0x64000; |
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); |
SECTIONS_END |
} |
/platform.inc
0,0 → 1,301
#ifndef CYGONCE_HAL_PLATFORM_INC |
#define CYGONCE_HAL_PLATFORM_INC |
##============================================================================= |
## |
## platform.inc |
## |
## PC platform support |
## |
##============================================================================= |
#####ECOSGPLCOPYRIGHTBEGIN#### |
## ------------------------------------------- |
## This file is part of eCos, the Embedded Configurable Operating System. |
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
## |
## eCos 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 or (at your option) any later version. |
## |
## eCos 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 eCos; if not, write to the Free Software Foundation, Inc., |
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
## |
## As a special exception, if other files instantiate templates or use macros |
## or inline functions from this file, or you compile this file and link it |
## with other works to produce a work based on this file, this file does not |
## by itself cause the resulting work to be covered by the GNU General Public |
## License. However the source code for this file must still be made available |
## in accordance with section (3) of the GNU General Public License. |
## |
## This exception does not invalidate any other reasons why a work based on |
## this file might be covered by the GNU General Public License. |
## |
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
## at http://sources.redhat.com/ecos/ecos-license/ |
## ------------------------------------------- |
#####ECOSGPLCOPYRIGHTEND#### |
##============================================================================= |
#######DESCRIPTIONBEGIN#### |
## |
## Author(s): jskov |
## Contributors:jskov, pjo, nickg |
## Date: 1999-01-07 |
## Purpose: PC platform support |
## Description: This file contains any PC specific assembler macros needed to |
## run eCos on a standard i386 PC. |
## |
## |
######DESCRIPTIONEND#### |
## |
##============================================================================= |
|
#include <cyg/hal/i386.inc> |
|
#include <cyg/hal/pcmb.inc> |
|
##============================================================================= |
## CPU initialization |
|
#ifndef CYGPKG_HAL_I386_CPU_INIT_DEFINED |
|
#define CYGPKG_HAL_I386_CPU_INIT_DEFINED |
|
##============================================================================= |
## ROM and GRUB startup |
## |
## Although these two startup types are, on the face of it, very different, |
## the actual work that needs to be done here for them both is much the same. |
## In both cases the system has been initialized in real mode and the transition |
## to 32 bit protected mode has been done. Here all we need to do is set up |
## our own GDT and IDT, reload the segment registers and proceed. |
|
#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_GRUB) |
|
.macro hal_cpu_init |
|
hal_cpu_init_start: |
|
# Disable interrupt handling. |
cli |
|
# Make a GDT pointer in location 0 and load new GDTR |
movw $(gdtEnd - gdtStart),%ax |
movw %ax,0 |
leal gdtStart,%eax |
movl %eax,2 |
lgdt 0 |
|
# Make an IDT pointer in location 0 and load new LDTR |
movw $0x77F,%ax |
movw %ax,0 |
leal idtStart,%eax |
movl %eax,2 |
lidt 0 |
|
# Jump long to reload CS |
jmpl $8,$3f |
|
.align 4, 0xFF |
gdtStart: |
/* Selector 0x00 == invalid. */ |
.word 0x0000 |
.word 0x0000 |
.byte 0x00 |
.byte 0x00 |
.byte 0x00 |
.byte 0x00 |
|
/* Selector 0x08 == code. */ |
.word 0xFFFF |
.word 0x0000 |
.byte 0x00 |
.byte 0x9B |
.byte 0xCF |
.byte 0x00 |
|
/* Selector 0x10 == data. */ |
.word 0xFFFF |
.word 0x0000 |
.byte 0x00 |
.byte 0x93 |
.byte 0xCF |
.byte 0x00 |
|
/* Selector 0x18 == shorter code: faults any code |
* access 0xF0000000-0xFFFFFFFF. |
*/ |
.word 0xFFFF |
.word 0x0000 |
.byte 0x00 |
.byte 0x9B |
.byte 0xC7 |
.byte 0x00 |
|
/* Selector 0x20 == data; faults any access 0xF0000000-0xFFFFFFFF. */ |
.word 0xFFFF |
.word 0x0000 |
.byte 0x00 |
.byte 0x93 |
.byte 0xC7 |
.byte 0x00 |
|
.align 4, 0xFF |
gdtEnd: |
|
#if defined(CYG_HAL_STARTUP_GRUB) |
# Multiboot header -- this must be in the first 8k |
# of the image file. |
|
#define GRUB_MAGIC 0x1BADB002 /* Magic number */ |
#define GRUB_FLAGS 0x00000000 /* Flags */ |
|
.align 4, 0xFF |
.long GRUB_MAGIC |
.long GRUB_FLAGS |
.long 0-GRUB_MAGIC-GRUB_FLAGS /* Checksum */ |
#endif |
|
3: |
# Set up data selectors |
movw $0x10, %ax |
movw %ax, %ds |
movw %ax, %es |
movw %ax, %fs |
movw %ax, %gs |
|
movw %ax, %ss |
|
# Set up SP |
movl $__interrupt_stack,%esp |
|
/* Reset the flags register. */ |
push $0 |
popf |
|
#if defined(CYG_HAL_STARTUP_GRUB) |
# Save the multiboot info passed in %EBX away into a |
# global variable for later use. |
.data |
.global hal_multiboot_info |
hal_multiboot_info: |
.long 0 |
.text |
movl %ebx,hal_multiboot_info |
#endif |
|
hal_cpu_init_end: |
nop |
|
.endm |
#endif |
|
|
##============================================================================= |
## RAM startup |
|
#ifdef CYG_HAL_STARTUP_RAM |
|
.macro hal_cpu_init |
.endm |
|
#endif /* CYG_HAL_STARTUP_RAM */ |
|
#endif // CYGPKG_HAL_I386_CPU_INIT_DEFINED |
|
##============================================================================= |
## IDT support |
|
.macro set_IDT_entry idx,addr |
pushl $(idtStart+8*\idx) |
pushl $\addr |
.extern cyg_hal_pc_set_idt_entry |
call cyg_hal_pc_set_idt_entry |
addl $8,%esp |
.endm |
|
|
|
.macro hal_idt_init |
.text |
hal_idt_init: |
set_IDT_entry 0, hal_pc_exception_0 |
set_IDT_entry 1, hal_pc_exception_1 |
set_IDT_entry 2, hal_pc_exception_2 |
set_IDT_entry 3, hal_pc_exception_3 |
set_IDT_entry 4, hal_pc_exception_4 |
set_IDT_entry 5, hal_pc_exception_5 |
set_IDT_entry 6, hal_pc_exception_6 |
set_IDT_entry 7, hal_pc_exception_7 |
set_IDT_entry 8, hal_pc_exception_8 |
set_IDT_entry 9, hal_pc_exception_9 |
set_IDT_entry 10, hal_pc_exception_10 |
set_IDT_entry 11, hal_pc_exception_11 |
set_IDT_entry 12, hal_pc_exception_12 |
set_IDT_entry 13, hal_pc_exception_13 |
set_IDT_entry 14, hal_pc_exception_14 |
set_IDT_entry 15, hal_pc_exception_15 |
set_IDT_entry 16, hal_pc_exception_16 |
set_IDT_entry 17, hal_pc_exception_17 |
set_IDT_entry 18, hal_pc_exception_18 |
set_IDT_entry 19, hal_pc_exception_19 |
set_IDT_entry 20, hal_pc_exception_20 |
set_IDT_entry 21, hal_pc_exception_21 |
set_IDT_entry 22, hal_pc_exception_22 |
set_IDT_entry 23, hal_pc_exception_23 |
set_IDT_entry 24, hal_pc_exception_24 |
set_IDT_entry 25, hal_pc_exception_25 |
set_IDT_entry 26, hal_pc_exception_26 |
set_IDT_entry 27, hal_pc_exception_27 |
set_IDT_entry 28, hal_pc_exception_28 |
set_IDT_entry 29, hal_pc_exception_29 |
set_IDT_entry 30, hal_pc_exception_30 |
set_IDT_entry 31, hal_pc_exception_31 |
set_IDT_entry 32, hal_pc_irq_32 |
set_IDT_entry 33, hal_pc_irq_33 |
set_IDT_entry 34, hal_pc_irq_34 |
set_IDT_entry 35, hal_pc_irq_35 |
set_IDT_entry 36, hal_pc_irq_36 |
set_IDT_entry 37, hal_pc_irq_37 |
set_IDT_entry 38, hal_pc_irq_38 |
set_IDT_entry 39, hal_pc_irq_39 |
set_IDT_entry 40, hal_pc_irq_40 |
set_IDT_entry 41, hal_pc_irq_41 |
set_IDT_entry 42, hal_pc_irq_42 |
set_IDT_entry 43, hal_pc_irq_43 |
set_IDT_entry 44, hal_pc_irq_44 |
set_IDT_entry 45, hal_pc_irq_45 |
set_IDT_entry 46, hal_pc_irq_46 |
set_IDT_entry 47, hal_pc_irq_47 |
#ifdef CYGPKG_HAL_SMP_SUPPORT |
set_IDT_entry 48, hal_pc_irq_48 |
set_IDT_entry 49, hal_pc_irq_49 |
set_IDT_entry 50, hal_pc_irq_50 |
set_IDT_entry 51, hal_pc_irq_51 |
set_IDT_entry 52, hal_pc_irq_52 |
set_IDT_entry 53, hal_pc_irq_53 |
set_IDT_entry 54, hal_pc_irq_54 |
set_IDT_entry 55, hal_pc_irq_55 |
set_IDT_entry 56, hal_pc_irq_56 |
set_IDT_entry 57, hal_pc_irq_57 |
set_IDT_entry 58, hal_pc_irq_58 |
set_IDT_entry 59, hal_pc_irq_59 |
set_IDT_entry 60, hal_pc_irq_60 |
set_IDT_entry 61, hal_pc_irq_61 |
set_IDT_entry 62, hal_pc_irq_62 |
set_IDT_entry 63, hal_pc_irq_63 |
|
set_IDT_entry 64, hal_pc_irq_64 |
set_IDT_entry 65, hal_pc_irq_65 |
set_IDT_entry 66, hal_pc_irq_66 |
set_IDT_entry 67, hal_pc_irq_67 |
#endif |
.endm |
|
##============================================================================= |
#endif // ifndef CYGONCE_HAL_PLATFORM_INC |
## end of platform.inc |
/hal_diag.h
0,0 → 1,90
#ifndef CYGONCE_HAL_HAL_DIAG_H |
#define CYGONCE_HAL_HAL_DIAG_H |
//============================================================================= |
// |
// hal_diag.h |
// |
// HAL Support for Kernel Diagnostic Routines |
// |
//============================================================================= |
//####ECOSGPLCOPYRIGHTBEGIN#### |
// ------------------------------------------- |
// This file is part of eCos, the Embedded Configurable Operating System. |
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
// |
// eCos 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 or (at your option) any later version. |
// |
// eCos 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 eCos; if not, write to the Free Software Foundation, Inc., |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
// |
// As a special exception, if other files instantiate templates or use macros |
// or inline functions from this file, or you compile this file and link it |
// with other works to produce a work based on this file, this file does not |
// by itself cause the resulting work to be covered by the GNU General Public |
// License. However the source code for this file must still be made available |
// in accordance with section (3) of the GNU General Public License. |
// |
// This exception does not invalidate any other reasons why a work based on |
// this file might be covered by the GNU General Public License. |
// |
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
// at http://sources.redhat.com/ecos/ecos-license/ |
// ------------------------------------------- |
//####ECOSGPLCOPYRIGHTEND#### |
//============================================================================= |
//#####DESCRIPTIONBEGIN#### |
// |
// Author(s): proven |
// Contributors:proven |
// Date: 1998-10-05 |
// Purpose: HAL Support for Kernel Diagnostic Routines |
// Description: Diagnostic routines for use during kernel development. |
// Usage: #include "cyg/hal/hal_diag.h" |
// |
//####DESCRIPTIONEND#### |
// |
//============================================================================= |
|
#include <pkgconf/hal.h> |
|
#include <cyg/infra/cyg_type.h> |
|
#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG) |
|
#include <cyg/hal/hal_if.h> |
|
#define HAL_DIAG_INIT() hal_if_diag_init() |
#define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_) |
#define HAL_DIAG_READ_CHAR(_c_) hal_if_diag_read_char(&_c_) |
|
#else // everything by steam |
|
//----------------------------------------------------------------------------- |
// functions implemented in hal_diag.c |
|
externC void hal_diag_init( void ); |
|
externC void hal_diag_read_char(char *c); |
|
externC void hal_diag_write_char(char c); |
|
//----------------------------------------------------------------------------- |
|
#define HAL_DIAG_INIT() hal_diag_init() |
|
#define HAL_DIAG_READ_CHAR(_c_) hal_diag_read_char(&_c_) |
|
#define HAL_DIAG_WRITE_CHAR(_c_) hal_diag_write_char(_c_) |
|
#endif |
//----------------------------------------------------------------------------- |
// end of hal_diag.h |
#endif // CYGONCE_HAL_HAL_DIAG_H |
/plf_io.h
0,0 → 1,66
#ifndef CYGONCE_PLF_IO_H |
#define CYGONCE_PLF_IO_H |
|
//============================================================================= |
// |
// plf_io.h |
// |
// Platform specific IO support |
// |
//============================================================================= |
//####ECOSGPLCOPYRIGHTBEGIN#### |
// ------------------------------------------- |
// This file is part of eCos, the Embedded Configurable Operating System. |
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
// |
// eCos 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 or (at your option) any later version. |
// |
// eCos 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 eCos; if not, write to the Free Software Foundation, Inc., |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
// |
// As a special exception, if other files instantiate templates or use macros |
// or inline functions from this file, or you compile this file and link it |
// with other works to produce a work based on this file, this file does not |
// by itself cause the resulting work to be covered by the GNU General Public |
// License. However the source code for this file must still be made available |
// in accordance with section (3) of the GNU General Public License. |
// |
// This exception does not invalidate any other reasons why a work based on |
// this file might be covered by the GNU General Public License. |
// |
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
// at http://sources.redhat.com/ecos/ecos-license/ |
// ------------------------------------------- |
//####ECOSGPLCOPYRIGHTEND#### |
//========================================================================== |
//#####DESCRIPTIONBEGIN#### |
// |
// Author(s): proven |
// Contributors: proven, jskov, pjo |
// Date: 1999-10-15 |
// Purpose: Platform IO support |
// Description: The macros defined here provide the HAL APIs for handling |
// basic IO - specifically PCI config access. |
// |
//####DESCRIPTIONEND#### |
// |
//========================================================================== |
|
#include <pkgconf/hal_i386_pc.h> |
|
//----------------------------------------------------------------------------- |
// All we do here is include the PC Motherboard header |
|
#include <cyg/hal/pcmb_io.h> |
|
//----------------------------------------------------------------------------- |
// end of plf_io.h |
#endif // CYGONCE_PLF_IO_H |