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
- from Rev 27 to Rev 174
- ↔ Reverse comparison
Rev 27 → Rev 174
/v2_0/cdl/hal_i386_pc.cdl
0,0 → 1,391
# ==================================================================== |
# |
# hal_i386_pc.cdl |
# |
# PC/i386 target HAL package configuration data |
# |
# ==================================================================== |
#####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 |
# Original data: jskov |
# Contributors: |
# Date: 1999-11-01 |
# |
#####DESCRIPTIONEND#### |
# |
# ==================================================================== |
|
cdl_package CYGPKG_HAL_I386_PC { |
display "i386 PC Target" |
parent CYGPKG_HAL_I386 |
define_header hal_i386_pc.h |
include_dir cyg/hal |
description " |
The i386 PC Target HAL package provides the |
support needed to run eCos binaries on an i386 PC." |
|
compile hal_diag.c plf_misc.c plf_stub.c |
|
implements CYGINT_HAL_DEBUG_GDB_STUBS |
implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK |
implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT |
implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT_GUARANTEED |
|
define_proc { |
puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_i386.h>" |
puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_i386_pc.h>" |
puts $::cdl_header "" |
puts $::cdl_header "#define HAL_PLATFORM_CPU \"I386\"" |
puts $::cdl_header "#define HAL_PLATFORM_BOARD \"PC\"" |
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\"" |
puts $::cdl_header "#include <pkgconf/hal_i386_pcmb.h>" |
puts $::cdl_header "" |
} |
|
cdl_component CYG_HAL_STARTUP { |
display "Startup type" |
flavor data |
legal_values {"RAM" "FLOPPY" "ROM" "GRUB"} |
default_value {"RAM"} |
no_define |
define -file system.h CYG_HAL_STARTUP |
description " |
It is possible to configure eCos for the PC target to build for: |
RAM startup (generally when being run under an existing |
Monitor program like RedBoot); FLOPPY startup (for writing |
to a floppy disk, which can then be used for booting |
on PCs with a standard BIOS), GRUB startup (for being booted |
by the GRUB bootloader) ROM startup (for writing |
straight to a boot ROM/Flash). ROM startup is experimental |
at this time." |
} |
|
cdl_option CYGDBG_HAL_DEBUG_GDB_INITIAL_BREAK { |
display "Enable initial breakpoint" |
parent CYGPKG_HAL_DEBUG |
active_if CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
default_value { !CYGPKG_REDBOOT } |
description " |
This option causes an application that has GDB stubs built in |
to take a breakpoint immediately before calling cyg_start(). |
This gives the developer a chance to set any breakpoints or |
inspect the system state before it proceeds." |
} |
|
cdl_option CYGBLD_BUILD_I386_ROMBOOT { |
display "Build ROM bootstrap code" |
calculated { CYG_HAL_STARTUP == "ROM" } |
|
make { |
<PREFIX>/lib/romboot.ld: <PACKAGE>/src/romboot.ld |
cp $< $@ |
} |
|
make { |
<PREFIX>/bin/romboot.elf : <PACKAGE>/src/romboot.S |
@sh -c "mkdir -p $(dir $@)" |
$(CC) -Wp,-MD,romboot.tmp $(INCLUDE_PATH) -nostdlib -Wl,-static -T$(PREFIX)/lib/romboot.ld -o $@ $< |
@echo $@ ": \\" > $(notdir $@).deps |
@tail +2 romboot.tmp >> $(notdir $@).deps |
@echo >> $(notdir $@).deps |
@rm romboot.tmp |
} |
} |
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD { |
display "Diagnostic serial port baud rate" |
flavor data |
legal_values 9600 19200 38400 57600 115200 |
default_value 38400 |
description " |
This option selects the baud rate used for the diagnostic port. |
Note: this should match the value chosen for the GDB port if the |
diagnostic and GDB port are the same." |
} |
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD { |
display "GDB serial port baud rate" |
flavor data |
legal_values 9600 19200 38400 57600 115200 |
default_value 38400 |
description " |
This option controls the baud rate used for the GDB connection." |
} |
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS { |
display "Number of communication channels on the board" |
flavor data |
legal_values 1 to 3 |
default_value { CYGSEM_HAL_I386_PC_DIAG_SCREEN ? 3 : 2 } |
description " |
This define the number of serial ports that will be used by the HAL. |
Ports 0 and 1 equate to COM1 and COM2 and port 2 is the PC screen and |
keyboard." |
} |
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL { |
display "Debug serial port" |
flavor data |
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1 |
default_value 0 |
description " |
On PCs with two serial ports, this option |
chooses which port will be used to connect to a host |
running GDB." |
} |
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT { |
display "Default console channel." |
flavor data |
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1 |
default_value 0 |
} |
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL { |
display "Diagnostic serial port" |
flavor data |
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1 |
default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT |
description " |
On PCs with two serial ports, this option |
chooses which port will be used for diagnostic output. |
Selecting port 2 will cause the PC screen to be used." |
} |
|
cdl_option CYGSEM_HAL_I386_PC_DIAG_SCREEN { |
display "Output to PC screen" |
flavor bool |
default_value 1 |
implements CYGINT_HAL_I386_PCMB_SCREEN_SUPPORT |
description "This option enables use of the PC screen and keyboard as a |
third virtual serial device." |
} |
|
cdl_component CYGBLD_GLOBAL_OPTIONS { |
display "Global build options" |
flavor none |
parent CYGPKG_NONE |
description " |
Global build options including control over |
compiler flags, linker flags and choice of toolchain." |
|
|
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX { |
display "Global command prefix" |
flavor data |
no_define |
default_value { "i386-elf" } |
description " |
This option specifies the command prefix used when |
invoking the build tools. If your host operating system |
is Linux you can set this to empty to use your native tools. |
If so, your native gcc must be gcc-2.95.2 or later, and |
\"ld -v\" must report a version more recent than 2.9.1." |
} |
|
cdl_option CYGBLD_GLOBAL_CFLAGS { |
display "Global compiler flags" |
flavor data |
no_define |
default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" } |
description " |
This option controls the global compiler flags which |
are used to compile all packages by |
default. Individual packages may define |
options which override these global flags." |
} |
|
cdl_option CYGBLD_GLOBAL_LDFLAGS { |
display "Global linker flags" |
flavor data |
no_define |
default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static" } |
description " |
This option controls the global linker flags. Individual |
packages may define options which override these global flags." |
} |
|
cdl_option CYGBLD_BUILD_GDB_STUBS { |
display "Build GDB stub loader image" |
default_value 0 |
requires { CYG_HAL_STARTUP == "FLOPPY" } |
requires CYGSEM_HAL_ROM_MONITOR |
requires CYGBLD_BUILD_COMMON_GDB_STUBS |
requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT |
requires ! CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT |
requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT |
requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT |
requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM |
no_define |
description " |
This option enables the building of the GDB stubs for the |
board. The common HAL controls takes care of most of the |
build process, but the final conversion from ELF image to |
binary data is handled by the platform CDL, allowing |
relocation of the data if necessary." |
|
make -priority 320 { |
<PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img |
$(OBJCOPY) -O binary $< $@ |
} |
} |
} |
|
cdl_component CYGHWR_MEMORY_LAYOUT { |
display "Memory layout" |
flavor data |
no_define |
calculated { CYG_HAL_STARTUP == "RAM" ? "i386_pc_ram" : \ |
CYG_HAL_STARTUP == "ROM" ? "i386_pc_rom" : \ |
CYG_HAL_STARTUP == "GRUB" ? "i386_pc_grub" : \ |
"i386_pc_floppy" } |
|
cdl_option CYGHWR_MEMORY_LAYOUT_LDI { |
display "Memory layout linker script fragment" |
flavor data |
no_define |
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI |
calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_i386_pc_ram.ldi>" : \ |
CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_i386_pc_rom.ldi>" : \ |
CYG_HAL_STARTUP == "GRUB" ? "<pkgconf/mlt_i386_pc_grub.ldi>" : \ |
"<pkgconf/mlt_i386_pc_floppy.ldi>" } |
} |
|
cdl_option CYGHWR_MEMORY_LAYOUT_H { |
display "Memory layout header file" |
flavor data |
no_define |
define -file system.h CYGHWR_MEMORY_LAYOUT_H |
calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_i386_pc_ram.h>" : \ |
CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_i386_pc_rom.h>" : \ |
CYG_HAL_STARTUP == "GRUB" ? "<pkgconf/mlt_i386_pc_grub.h>" : \ |
"<pkgconf/mlt_i386_pc_floppy.h>" } |
} |
} |
|
cdl_option CYGSEM_HAL_ROM_MONITOR { |
display "Behave as a ROM monitor" |
flavor bool |
default_value 0 |
|
parent CYGPKG_HAL_ROM_MONITOR |
requires { CYG_HAL_STARTUP == "FLOPPY" || CYG_HAL_STARTUP == "ROM" } |
requires { !CYGHWR_HAL_I386_FPU_SWITCH_LAZY } |
description " |
Enable this option if this program is to be used as a ROM monitor, |
i.e. applications will be loaded into RAM on the board, and this |
ROM monitor may process exceptions or interrupts generated from the |
application. This enables features such as utilizing a separate |
interrupt stack when exceptions are generated." |
} |
|
cdl_option CYGSEM_HAL_USE_ROM_MONITOR { |
display "Work with a ROM monitor" |
flavor booldata |
legal_values { "Generic" "GDB_stubs" } |
default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 } |
parent CYGPKG_HAL_ROM_MONITOR |
requires { CYG_HAL_STARTUP == "RAM" } |
description " |
Support can be enabled for different varieties of ROM monitor. |
This support changes various eCos semantics such as the encoding |
of diagnostic output, or the overriding of hardware interrupt |
vectors. |
Firstly there is \"Generic\" support which prevents the HAL |
from overriding the hardware vectors that it does not use, to |
instead allow an installed ROM monitor to handle them. This is |
the most basic support which is likely to be common to most |
implementations of ROM monitor. |
\"GDB_stubs\" provides support when GDB stubs are included in |
the ROM monitor or boot ROM." |
} |
|
cdl_component CYGPKG_REDBOOT_HAL_OPTIONS { |
display "Redboot HAL options" |
flavor none |
no_define |
parent CYGPKG_REDBOOT |
active_if CYGPKG_REDBOOT |
description " |
This option lists the target's requirements for a valid Redboot |
configuration." |
|
cdl_component CYGBLD_BUILD_REDBOOT_BIN { |
display "Build RedBoot binary image" |
no_define |
default_value 1 |
|
cdl_option CYGBLD_BUILD_REDBOOT_BIN_FLOPPY { |
display "Build Redboot FLOPPY binary image" |
active_if CYGBLD_BUILD_REDBOOT |
active_if { CYG_HAL_STARTUP == "FLOPPY" } |
calculated 1 |
no_define |
description "This option enables the conversion of the Redboot |
ELF image to a binary image suitable for |
copying to a floppy disk." |
|
make -priority 325 { |
<PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf |
$(OBJCOPY) -O binary $< $@ |
} |
} |
|
cdl_option CYGBLD_BUILD_REDBOOT_BIN_ROM { |
display "Build Redboot ROM binary image" |
active_if CYGBLD_BUILD_REDBOOT |
active_if { CYG_HAL_STARTUP == "ROM" } |
calculated 1 |
no_define |
description "This option enables the conversion of the Redboot |
ELF image to a binary image suitable for ROM |
programming." |
|
make -priority 325 { |
<PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf |
$(OBJCOPY) -O binary $< $(@:.bin=.img) |
$(OBJCOPY) -O binary $(PREFIX)/bin/romboot.elf $(PREFIX)/bin/romboot.img |
dd if=/dev/zero of=$@ bs=1024 count=64 conv=sync |
dd if=$(@:.bin=.img) of=$@ bs=512 conv=notrunc,sync |
dd if=$(PREFIX)/bin/romboot.img of=$@ bs=256 count=1 seek=255 conv=notrunc |
} |
} |
} |
} |
} |
|
/v2_0/include/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 |
/v2_0/include/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 |
/v2_0/include/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 |
/v2_0/include/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 |
/v2_0/include/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 ! |
/v2_0/include/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 ! |
/v2_0/include/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) |
/v2_0/include/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 |
} |
/v2_0/include/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) |
/v2_0/include/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 ! |
/v2_0/include/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 |
} |
/v2_0/include/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) |
/v2_0/include/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) |
/v2_0/include/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 |
} |
/v2_0/include/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 |
} |
/v2_0/include/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 |
/v2_0/include/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 |
/v2_0/include/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 |
/v2_0/doc/RELEASENOTES.txt
0,0 → 1,42
|
Functionality of eCos on the PC |
------------------------------- |
|
This release of eCos for the PC target is based on the code |
contributed by Patrick O'Grady (patrick@softprocess.com). With the |
exception of some minor reorganization it is essentially the same as |
Patrick's release. |
|
There are a number of things that are currently incomplete and are |
listed here to indicate where this code is expected to change in the |
future. These include: |
|
- The current exception handling code is derived from the original GDB |
stubs and is only really adequate for handling debugging |
requirements. We will need to provide full support for exception |
delivery to applications. As a result of this, nearly all of the |
related code will need to be rewritten. |
|
- Currently the GDB stub monitor is used just as a loader, once the |
program is running any debug duties are taken by a separate set of |
GDB stubs in the loaded image. To make this image smaller it is |
desirable to use the GDB stubs already present in the monitor. This |
requires some reorganization of the VSR table and the addition of a |
vector table for calls between the two pieces of code. |
|
- Related to the previous item, support for using Ctrl-C when there |
are no stubs present in the executable need to be added. This |
differs from the current support that interacts with the included |
stubs since it must interact with the monitor via the vector table. |
|
- At present the stub monitor can only boot from floppy disk. It |
should be possible to make this code more generic so that it can |
boot from hard disk and CD too. Support for applications that can |
boot in this way should also be possible, as is booting via |
BOOTP/TFTP from a network interface. |
|
- Complete the HAL port, including addition of cache control macros |
and a cleaner distinction between architecture, variant and |
platform. |
|
|
/v2_0/src/romboot.ld
0,0 → 1,11
|
|
MEMORY |
{ |
rom : ORIGIN = 0x00000, LENGTH = 0x100 |
} |
|
SECTIONS |
{ |
.text : { *(.text) *(.data) *(.bss) } > rom |
} |
/v2_0/src/plf_stub.c
0,0 → 1,93
//============================================================================= |
// |
// plf_stub.c |
// |
// Platform specific code for GDB stub support. |
// |
//============================================================================= |
|
// - pjo, 28 sep 1999 |
// - Copied ARM version for use with i386/pc. |
|
//####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): gthomas (based on the old ARM/AEB hal_stub.c) |
// Contributors:gthomas, jskov, pjo, nickg |
// Date: 1999-02-15 |
// Purpose: Platform specific code for GDB stub support. |
// |
//####DESCRIPTIONEND#### |
// |
//============================================================================= |
|
#include <pkgconf/hal.h> |
|
#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
|
#ifdef CYGPKG_REDBOOT |
#include <pkgconf/redboot.h> |
#endif |
|
#include <cyg/hal/hal_stub.h> |
|
#include <cyg/hal/hal_io.h> // HAL IO macros |
#include <cyg/hal/hal_intr.h> // HAL interrupt macros |
|
#include <cyg/hal/plf_misc.h> |
|
//----------------------------------------------------------------------------- |
// Connect our VSR to the exception vectors. |
|
externC void __default_exception_vsr(void); |
|
#if defined(CYGSEM_REDBOOT_BSP_SYSCALLS) |
externC void __syscall_tramp(void); |
externC char idtStart[]; |
#endif // CYGSEM_REDBOOT_BSP_SYSCALLS |
|
|
void hal_pc_stubs_init(void) |
{ |
#if defined(CYGSEM_REDBOOT_BSP_SYSCALLS) |
cyg_hal_pc_set_idt_entry((CYG_ADDRESS)__syscall_tramp, (short *)(idtStart + (0x80 * 8))); |
#endif // CYGSEM_REDBOOT_BSP_SYSCALLS |
} |
|
|
//----------------------------------------------------------------------------- |
|
#endif // ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
// End of plf_stub.c |
/v2_0/src/romboot.S
0,0 → 1,195
##============================================================================= |
## |
## romboot.S |
## |
## x86 romboot |
## |
##============================================================================= |
#####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 |
## Date: 1999-01-07 |
## Purpose: x86 romboot |
## Description: When booting from ROM we need to run a short sequence of real |
## mode code before jumping into 32 bit protected mode. There are |
## problems in GAS with mixing all this code together, and it is |
## easier to just move this bit of code out to a separate file. |
## |
## |
######DESCRIPTIONEND#### |
## |
##============================================================================= |
|
|
#include <pkgconf/system.h> |
#include <pkgconf/hal.h> |
|
#include <cyg/hal/arch.inc> |
|
#============================================================================== |
|
// .file "romboot.S" |
|
#------------------------------------------------------------------------------ |
|
.code16 |
|
romboot_start: |
/* Disable interrupt handling. */ |
cli |
|
# Set DS == CS |
movw %cs,%ax |
movw %ax,%ds |
# set ES == 0 |
movw $0,%ax |
movw %ax,%es |
|
# Call video bios to init display |
movw $0xc000,%bx |
movw %bx,%ds |
movw 0x0000,%ax |
movw $0x0000,%bx |
movw %bx,%ds |
cmpw $0xAA55,%ax |
jne 1f |
.byte 0x9a # lcall |
.word 0x0003 # offset |
.word 0xc000 # segment |
1: |
|
movw %cs,%ax |
movw %ax,%ds |
# set ES == 0 |
movw $0,%ax |
movw %ax,%es |
|
# build a GDT descriptor in memory at location zero |
movw $(gdtEnd - gdtStart),%ax |
movw %ax,%es:0 |
lea gdtStart,%ax |
addw $0xFF00,%ax |
movw %ax,%es:2 |
movw $0x000F,%ax |
movw %ax,%es:4 |
|
# load GDTR |
lgdt %es:0 |
|
# Switch to protected mode. |
movl %cr0,%eax |
orb $1, %al |
movl %eax,%cr0 |
|
# and do a jump to flush instruction prefetch |
jmp romboot_pm |
|
hlt |
|
.align 4, 0xCC |
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, 0xCC |
gdtEnd: |
|
# We arrive here in protected mode |
romboot_pm: |
|
# Load data selectors |
movw $0x10, %ax |
movw %ax, %ds |
movw %ax, %es |
movw %ax, %fs |
movw %ax, %gs |
|
# jump to start of ROM, where the PM code starts |
# ljmp $8,$0xF0000 |
.byte 0x66,0xea # opsize + ljmp opcode |
.long 0x000F0000 # destination address |
.word 0x0008 # code selector |
|
.code16 |
|
.org 0xF0 |
romboot_reset: |
jmp romboot_start |
|
.org 0x100 |
|
#------------------------------------------------------------------------------ |
# end of romboot.S |
/v2_0/src/hal_diag.c
0,0 → 1,140
//============================================================================= |
// |
// hal_diag.c |
// |
// HAL diagnostic output code |
// |
//============================================================================= |
//####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 diagnostic output |
// Description: Implementations of HAL diagnostic output support. |
// |
//####DESCRIPTIONEND#### |
// |
//============================================================================= |
|
#include <pkgconf/hal.h> |
|
#include <cyg/infra/cyg_type.h> // base types |
|
#include <cyg/hal/hal_diag.h> |
|
#include <cyg/hal/plf_misc.h> |
|
//----------------------------------------------------------------------------- |
// New Hal_Diag init to comply with the eCos/ROM Calling Interface. |
|
#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT |
|
#include <cyg/hal/hal_arch.h> // basic machine info |
#include <cyg/hal/hal_intr.h> // interrupt macros |
#include <cyg/hal/hal_io.h> // IO macros |
#include <cyg/hal/drv_api.h> |
#include <cyg/hal/hal_if.h> // interface API |
#include <cyg/hal/hal_misc.h> // Helper functions |
|
#include <cyg/hal/pcmb_serial.h> |
|
//============================================================================= |
|
#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG) \ |
|| defined(CYGPRI_HAL_IMPLEMENTS_IF_SERVICES) |
|
channel_data_t pc_ser_channels[CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS]; |
|
void |
cyg_hal_plf_comms_init(void) |
{ |
static int initialized = 0; |
int num_serial; |
|
if (initialized) |
return; |
|
initialized = 1; |
|
num_serial = CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS; |
#ifdef CYGSEM_HAL_I386_PC_DIAG_SCREEN |
--num_serial; |
#endif |
if (num_serial > 0) { |
// COM1 |
pc_ser_channels[0].base = 0x3F8; |
pc_ser_channels[0].msec_timeout = 1000; |
pc_ser_channels[0].isr_vector = 36; |
} |
if (num_serial > 1) { |
// COM2 |
pc_ser_channels[1].base = 0x2F8; |
pc_ser_channels[1].msec_timeout = 1000; |
pc_ser_channels[1].isr_vector = 35; |
} |
|
cyg_hal_plf_serial_init(); |
|
#ifdef CYGSEM_HAL_I386_PC_DIAG_SCREEN |
|
pc_ser_channels[num_serial].base = 0x060; |
pc_ser_channels[num_serial].msec_timeout = 1000; |
pc_ser_channels[num_serial].isr_vector = 33; |
|
cyg_hal_plf_screen_init(); |
|
#endif |
} |
|
//============================================================================= |
|
#endif //defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG) |
// || defined(CYGPRI_HAL_IMPLEMENTS_IF_SERVICES) |
|
#endif |
|
//============================================================================= |
|
#ifndef CYGSEM_HAL_VIRTUAL_VECTOR_DIAG |
|
// TODO: add stand-alone code |
|
#endif // CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT |
|
//----------------------------------------------------------------------------- |
// End of hal_diag.c |
|
/v2_0/src/plf_misc.c
0,0 → 1,245
//========================================================================== |
// |
// plf_misc.c |
// |
// 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 |
|
#include <cyg/hal/plf_misc.h> |
|
#include <cyg/hal/hal_io.h> |
|
#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT |
#include <cyg/hal/hal_if.h> |
#endif |
|
#ifdef CYGPKG_KERNEL |
#include <pkgconf/kernel.h> |
#include <cyg/kernel/ktypes.h> |
#include <cyg/kernel/kapi.h> |
#endif /* CYGPKG_KERNEL */ |
|
/*------------------------------------------------------------------------*/ |
|
extern void patch_dbg_syscalls(void * vector); |
|
extern void hal_pcmb_init(void); |
|
#ifdef CYGPKG_HAL_SMP_SUPPORT |
__externC void cyg_hal_smp_init(void); |
#endif |
|
//---------------------------------------------------------------------------- |
// ISR tables |
|
volatile CYG_ADDRESS hal_interrupt_handlers[CYGNUM_HAL_ISR_COUNT]; |
volatile CYG_ADDRWORD hal_interrupt_data[CYGNUM_HAL_ISR_COUNT]; |
volatile CYG_ADDRESS hal_interrupt_objects[CYGNUM_HAL_ISR_COUNT]; |
|
//----------------------------------------------------------------------------- |
// IDT interrupt gate initialization |
|
externC void cyg_hal_pc_set_idt_entry(CYG_ADDRESS routine,short *idtEntry) |
{ |
|
idtEntry[0]=routine & 0xFFFF; |
idtEntry[1]=8; |
idtEntry[2]=0x8E00; |
idtEntry[3]=routine >> 16; |
} |
|
/*------------------------------------------------------------------------*/ |
|
void hal_platform_init(void) |
{ |
int vector; |
|
HAL_ICACHE_INVALIDATE_ALL(); |
HAL_ICACHE_ENABLE(); |
HAL_DCACHE_INVALIDATE_ALL(); |
HAL_DCACHE_ENABLE(); |
|
// Call motherboard init function |
hal_pcmb_init(); |
|
// ISR table setup: plant the default ISR in all interrupt handlers |
// and the default interrupt VSR in the equivalent VSR table slots. |
for (vector = CYGNUM_HAL_ISR_MIN; vector <= CYGNUM_HAL_ISR_MAX; vector++) |
{ |
cyg_uint32 index; |
HAL_TRANSLATE_VECTOR( vector, index ); |
hal_interrupt_handlers[index] = (CYG_ADDRESS) HAL_DEFAULT_ISR; |
HAL_VSR_SET( vector, &__default_interrupt_vsr, NULL ); |
} |
|
#if !defined(CYG_HAL_STARTUP_RAM) |
for (vector = CYGNUM_HAL_EXCEPTION_MIN; |
vector <= CYGNUM_HAL_EXCEPTION_MAX; |
vector++) |
{ |
#if defined(CYGHWR_HAL_I386_FPU_SWITCH_LAZY) |
// If we are doing lazy FPU switching, the FPU switch VSR has |
// already been installed, so avoid overwriting it. |
if( vector != CYGNUM_HAL_VECTOR_NO_DEVICE ) |
#endif |
{ |
HAL_VSR_SET( vector, &__default_exception_vsr, NULL ); |
} |
} |
#endif |
|
#ifdef CYGPKG_REDBOOT |
|
// Start the timer device running if we are in a RedBoot |
// configuration. |
|
HAL_CLOCK_INITIALIZE( CYGNUM_HAL_RTC_PERIOD ); |
|
#endif |
|
hal_if_init(); |
|
#if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) || \ |
defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT) |
{ |
void hal_ctrlc_isr_init(void); |
hal_ctrlc_isr_init(); |
} |
|
#endif |
|
#ifdef CYGPKG_HAL_SMP_SUPPORT |
|
cyg_hal_smp_init(); |
|
#endif |
|
} |
|
/*------------------------------------------------------------------------*/ |
|
void hal_pc_reset(void) |
{ |
/* Use Intel's IDT triple-fault trick. */ |
asm("movl $badIdt, %eax\n" |
"lidt (%eax)\n" |
"int $3\n" |
"hlt\n" |
|
".align 4\n" |
|
"badIdt:\n" |
".word 0\n" |
".long 0\n" |
) ; |
} |
|
/*------------------------------------------------------------------------*/ |
|
void |
hal_delay_us(int us) |
{ |
while( us > 0 ) |
{ |
cyg_uint32 us1 = us; |
cyg_int32 ticks; |
cyg_uint32 cval1, cval2; |
|
// Wait in bursts of 1s to avoid overflow problems with the |
// multiply by 1000 below. |
|
if( us1 > 1000000 ) |
us1 = 1000000; |
|
us -= us1; |
|
// The PC clock ticks at 838ns per tick. So we convert the us |
// value we were given to clock ticks and wait for that many |
// to pass. |
|
ticks = (us1 * 1000UL) / 838UL; |
|
HAL_CLOCK_READ( &cval1 ); |
|
// We just loop, waiting for clock ticks to happen, |
// and subtracting them from ticks when they do. |
|
while( ticks > 0 ) |
{ |
cyg_int32 diff; |
HAL_CLOCK_READ( &cval2 ); |
|
diff = cval2 - cval1; |
|
// Cope with counter wrap-around. |
if( diff < 0 ) |
diff += CYGNUM_HAL_RTC_PERIOD; |
|
ticks -= diff; |
cval1 = cval2; |
|
} |
} |
} |
|
|
/*------------------------------------------------------------------------*/ |
/* End of plf_misc.c */ |
/v2_0/src/PKGconf.mak
0,0 → 1,56
#============================================================================== |
# |
# makefile |
# |
# hal/i386/pc/src |
# |
#============================================================================== |
#####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#### |
#============================================================================== |
|
|
PACKAGE := hal_i386_pc |
include ../../../../../pkgconf/pkgconf.mak |
|
LIBRARY := libtarget.a |
COMPILE := hal_diag.c hal_startup.c var_misc.c plf_misc.c plf_stub.c |
OTHER_OBJS := |
OTHER_TARGETS := |
OTHER_CLEAN := |
|
OTHER_TARGETS := |
OTHER_CLEAN := |
OTHER_DEPS := |
|
include $(COMPONENT_REPOSITORY)/pkgconf/makrules.src |
/v2_0/ChangeLog
0,0 → 1,485
2003-04-10 Nick Garnett <nickg@balti.calivar.com> |
|
* include/pkgconf/mlt_i386_pc_rom.ldi: Brought list of sections up |
to date with other files. |
|
2003-01-22 Jonathan Larmour <jifl@eCosCentric.com> |
|
* include/pkgconf/hal_i386_pc.h: Old file. Remove. |
|
2002-11-28 Nick Garnett <nickg@ecoscentric.com> |
|
* src/plf_stub.c: Removed redundant reinitialization of VSR table |
in hal_pc_stubs_init(). This has already been done in |
hal_platform_init() and reinitializing here destroys the FPU |
switch VSR. |
|
* src/plf_misc.c (hal_platform_init): |
Added configuration and test to avoid overwriting the FPU switch |
VSR with the default VSR. This caused problems with stand-alone |
application that use lazy FPU switching. |
Moved call to hal_ctrlc_isr_init() to after call to |
hal_if_init(). Previously, stand-alone applications had problems |
with ctrl-c handling because the CALL_HACK stuff didn't work. |
|
* cdl/hal_i386_pc.cdl: |
Added GRUB startup option. This enables support for booting from |
the GRUB bootloader. |
Added CYGDBG_HAL_DEBUG_GDB_INITIAL_BREAK option to force a |
breakpoint just before calling cyg_start(). This is insinuated |
into the CYGPKG_HAL_DEBUG part of the tree, and conditioned to |
only work for stand-alone apps with the stubs included. |
|
* include/platform.inc: Added GRUB startup support. |
|
* include/pkgconf/mlt_i386_pc_grub.mlt: |
* include/pkgconf/mlt_i386_pc_grub.ldi: |
* include/pkgconf/mlt_i386_pc_grub.h: |
Added these MLT files to support the new GRUB startup option. |
|
* misc/menu.lst: Added this example GRUB menu configuration file. |
|
2002-05-07 Gary Thomas <gthomas@redhat.com> |
|
* cdl/hal_i386_pc.cdl: |
Standardize CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT usage. |
|
2002-04-29 Jonathan Larmour <jlarmour@redhat.com> |
|
* src/romboot.S: |
Don't use .file as it can confuse debugging since the .file |
doesn't contain the path and therefore the debugger will never |
know where it lives! This conflicts with using -Wa,--gstabs. |
|
2002-04-23 Jonathan Larmour <jlarmour@redhat.com> |
|
* cdl/hal_i386_pc.cdl: Remove unused compile line. |
|
2001-12-07 Nick Garnett <nickg@redhat.com> |
|
* include/plf_intr.h: Added definition of HAL_DELAY_US() so that |
this is used instead of the delay loop in delay_us(). This is |
necessary to handle fast Pentiums and Athlons. |
|
* misc/redboot_FLOPPY_D850GB.ecm: Removed reference to SMP. |
|
2001-10-16 Mark Salter <msalter@redhat.com> |
|
* misc/redboot_FLOPPY_D850GB.ecm: New file. RedBoot config for |
Intel D850GB motherboard. |
|
* src/hal_diag.c: Setup pc_ser_channels based on CDL. |
|
2001-10-12 Jonathan Larmour <jlarmour@redhat.com> |
|
* cdl/hal_i386_pc.cdl: Parent CYGBLD_BUILD_REDBOOT_BIN_ROM and |
CYGBLD_BUILD_REDBOOT_BIN_FLOPPY under a CYGBLD_BUILD_REDBOOT_BIN_ROM |
component for better cross-platform consistency. |
|
2001-10-08 Ian Campbell <icampbell@arcom.co.uk> |
|
* cdl/hal_i386_pc.cdl: CYGBLD_BUILD_I386_ROMBOOT and |
CYGBLD_BUILD_REDBOOT_BIN_ROM moved here from hal_i386.cdl in the |
arch package. Rename CYGBLD_BUILD_REDBOOT_BIN to |
CYGBLD_BUILD_REDBOOT_BIN_FLOPPY for consistency. |
* src/romboot.S: Moved from arch package. |
* src/romboot.ld: Moved from arch package. |
|
2001-10-05 Mark Salter <msalter@redhat.com> |
|
* src/plf_stub.c (hal_pc_stubs_init): Install idt entry for GNUPro |
syscalls. |
|
* misc/redboot_FLOPPY.ecm: Turn on CYGSEM_REDBOOT_BSP_SYSCALLS. |
|
* include/plf_misc.h: Add extern decl for cyg_hal_pc_set_idt_entry. |
|
2001-10-02 Jonathan Larmour <jlarmour@redhat.com> |
|
* cdl/hal_i386_pc.cdl |
(CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT): Allow user to |
change value. |
|
2001-09-28 Ian Campbell <icampbell@arcom.co.uk> |
|
* include/platform.inc (hal_cpu_init): Initialise %ss. |
Be more pedantic about register names matching opcode suffixes. |
|
2001-09-07 Jonathan Larmour <jlarmour@redhat.com> |
|
* misc/redboot_FLOPPY.ecm: Disable |
CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS |
* misc/redboot_ROM.ecm: Ditto. |
* misc/redboot_FLOPPY_SMP.ecm: Ditto. |
|
2001-09-05 Jonathan Larmour <jlarmour@redhat.com> |
|
* src/plf_misc.c (hal_platform_init): If not RAM startup, install |
exception VSRs. |
|
2001-08-22 Nick Garnett <nickg@redhat.com> |
|
* include/pkgconf/mlt_i386_pc_floppy.ldi: |
* include/pkgconf/mlt_i386_pc_floppy.mlt: |
Moved load base address from 0x2000 to 0x3000. |
We now use page 0x2000 for SMP related data including the slave |
CPU startup trampoline and various data structures that need to be |
shared between RedBoot and the application. |
|
* misc/redboot_FLOPPY_SMP.ecm: Added this file to configure an |
SMP-aware RedBoot floppy. If SMP applications are to be run it is |
essential that this version of RedBoot be used because a degree of |
cooperation is required to get the CPUs going, and to handle |
exceptions cleanly. |
|
* src/plf_misc.c (hal_platform_init): Added call to cyg_hal_smp_init(). |
|
|
* include/platform.inc (hal_idt_init): Added entries to set up IDT |
entries 48..67. |
|
2001-08-13 Jonathan Larmour <jlarmour@redhat.com> |
|
* cdl/hal_i386_pc.cdl: Fix CYG_HAL_STARTUP description. |
|
2001-07-13 Nick Garnett <nickg@redhat.com> |
|
* cdl/hal_i386_pc.cdl: Added requires statement to |
CYGSEM_HAL_ROM_MONITOR option to turn off lazy FPU switching. ROM |
monitors should not be playing these kinds of games. |
|
2001-05-22 Jonathan Larmour <jlarmour@redhat.com> |
|
* include/pkgconf/mlt_i386_pc_ram.mlt: Fix pci_window description. |
|
2001-05-03 Nick Garnett <nickg@cygnus.co.uk> |
|
* cdl/hal_i386_pc.cdl: Changed option |
CYGIMP_HAL_I386_PCMB_SCREEN_SUPPORT to interface |
CYGINT_HAL_I386_PCMB_SCREEN_SUPPORT. |
|
2001-04-30 Nick Garnett <nickg@cygnus.co.uk> |
|
[x86 branch] |
* cdl/hal_i386_pc.cdl: Added options to convert ELF file to binary |
for copying to a floppy disc. |
|
2001-03-16 Nick Garnett <nickg@cygnus.co.uk> |
|
[x86 branch] |
* misc/redboot_ROM.ecm: |
Removed ETH_DRIVERS package for initial work. |
(This is work in progress and is not yet complete.) |
|
* include/pkgconf/mlt_i386_pc_rom.ldi: |
* include/pkgconf/mlt_i386_pc_rom.h: |
Added these files to enable building of ROM images. |
(This is work in progress and is not yet complete.) |
|
* include/platform.inc: Modified ROM startup to work with romboot.S. |
|
* cdl/hal_i386_pc.cdl: Modified options to allow for ROM startup. |
|
* include/pkgconf/mlt_i386_pc_ram.mlt: |
* include/pkgconf/mlt_i386_pc_ram.ldi: |
* include/pkgconf/mlt_i386_pc_ram.h: |
Fixed some bugs in these files with the size and layout of |
RAM. This was causing the heap to be badly mangled. |
|
2001-03-14 Nick Garnett <nickg@cygnus.co.uk> |
|
[x86 branch] |
* src/plf_misc.c (hal_platform_init): Added call to |
hal_pcmb_init(). |
|
* include/platform.inc: Removed memory size stuff. |
|
2001-03-13 Nick Garnett <nickg@cygnus.co.uk> |
|
[x86 branch] |
* src/plf_misc.c: Deleted old FP context switch code. |
|
* include/platform.inc: Removed some now redundant code. |
|
2001-03-08 Nick Garnett <nickg@cygnus.co.uk> |
|
[x86 branch] |
* src/plf_misc.c: ISR tables and cyg_hal_pc_set_idt_entry() moved |
here from hal_startup.c. ISR table setup code tidied. |
hal_delay_us() now works in 1s bursts to avoid arithmetic |
overflow. |
|
* src/hal_diag.c: Most of contents of file moved out to |
pcmb_serial.c and pcmb_screen.c. This remains as an intialization |
interface for those. |
|
* include/plf_io.h: Move contents out to pcmb_io.h. |
|
* include/plf_intr.h: Added include of pcmb_intr.h and other |
headers. |
|
* include/plf_arch.h: File added. Currently contains nothing. |
|
* include/platform.inc: floppy boot code moved to PCMB HAL. FPU |
support moved to architectural HAL. Various tidies. |
|
* cdl/hal_i386_pc.cdl: Many changes to bring this HAL in line with |
reorganization of whole i386 HAL. Lots of stuff deleted, and other |
things moved out to PCMB package. |
|
* misc/redboot_FLOPPY.ecm: Added setting of CYGSEM_HAL_ROM_MONITOR |
to 1. |
|
* include/var_intr.h: |
* include/variant.inc: |
* src/hal_intr.c: |
* src/hal_startup.c: |
* src/var_misc.c: |
Files removed. Most of the contents of these files has become |
redundant. Those parts that are not have been moved to more |
appropriate places. |
|
2001-03-06 Nick Garnett <nickg@cygnus.co.uk> |
|
[x86 branch] |
* src/var_misc.c: Rewrote clock init and access functions in terms |
of HAL IO macros. |
|
* src/plf_misc.c: |
Added call to HAL_CLOCK_INITIALIZE() to hal_platform_init() when |
in RedBoot configurations. |
Rewrote hal_delay_us() to use timer 0. |
|
* misc/redboot_FLOPPY.ecm: Added ETH drivers to configuration. |
|
* include/pkgconf/mlt_i386_pc_floppy.ldi: |
* include/pkgconf/mlt_i386_pc_floppy.h: |
Added __pci_window label for use with PCI devices. |
|
* include/plf_misc.h: Removed unnecessary port IO functions. |
|
* include/plf_io.h: |
Gave correct values to HAL_PCI_PHYSICAL_MEMORY_BASE and friends. |
Tidied up a bit. |
|
2001-03-05 Nick Garnett <nickg@cygnus.co.uk> |
|
[x86 branch] |
Some of these changes were initially made by Fabrice Gautier and |
then liberally modified by me. |
|
* src/var_misc.c: Miscellaneous tidies. |
|
* src/plf_misc.c (hal_platform_init): Some redundant stuff |
removed. |
|
* src/plf_stub.c: |
* src/hal_startup.c: |
* src/hal_intr.c: |
Lots of stuff removed from these files. When we reorganise the |
HAL, these files should be eliminated. |
|
* src/hal_diag.c: |
Lots of changes to support IF vectors for both serial ports and |
screen/keyboard. |
|
* misc/redboot_FLOPPY.ecm: |
* misc/redboot_ROM.ecm: |
ecosconfig import files to generate Redboot configs. |
|
* include/pkgconf/mlt_i386_pc_floppy.ldi: |
* include/pkgconf/mlt_i386_pc_floppy.mlt: |
* include/pkgconf/mlt_i386_pc_ram.ldi: |
* include/pkgconf/mlt_i386_pc_ram.mlt: |
Updated to reflect new memory layout for Redboot and RAM apps. |
|
* include/var_intr.h: Tidied up and made consistent with rest of |
HAL. HAL_TRANSLATE_VECTOR() used where necessary. |
|
* include/plf_stub.h: Some minor changes and tidies. |
|
* include/plf_misc.h: Tidied up. This file should eventually |
become redundant. |
|
* include/plf_io.h: New file - contains PCI support code. |
|
* include/plf_intr.h: Added HAL_PLATFORM_RESET_ENTRY. |
|
* include/platform.inc: |
Better separation of startup types, added start of ROM startup. |
Added IDT initialization. Various tidies. |
|
* include/hal_diag.h: Added virtual vector support. |
|
* cdl/hal_i386_pc.cdl: Many changes to support Redboot. |
|
2001-01-26 Jesper Skov <jskov@redhat.com> |
|
* include/plf_stub.h: Reset macros moved |
* include/plf_intr.h: to this file. |
|
2000-12-05 Hugo Tyson <hmt@redhat.com> |
|
* src/plf_misc.c (hal_pc_fpe_dsr): Raise the base stack address by |
CYGNUM_KERNEL_THREADS_STACK_CHECK_DATA_SIZE if that is defined; |
otherwise a stack overflow would immediately be reported. |
|
2000-11-02 Fabrice Gautier <Fabrice_Gautier@sdesigns.com> |
|
* src/platform.inc (hal_cpu_init): Load image from floppy one |
sector at a time to avoid "DMA access across 64k boundary" error. |
|
2000-10-20 Jonathan Larmour <jlarmour@redhat.com> |
|
* include/pkgconf/mlt_i386_pc_floppy.mlt: |
Add heap1 section |
|
* include/pkgconf/mlt_i386_pc_floppy.h: |
* include/pkgconf/mlt_i386_pc_ram.h: |
* include/pkgconf/mlt_i386_pc_floppy.ldi: |
* include/pkgconf/mlt_i386_pc_ram.ldi: |
Regenerated |
|
2000-10-19 Jesper Skov <jskov@redhat.com> |
|
* include/pkgconf/mlt_i386_pc_ram.h: Added heap1 label. |
* include/pkgconf/mlt_i386_pc_ram.mlt: Same. |
* include/pkgconf/mlt_i386_pc_ram.ldi: Same. |
|
2000-08-18 Nick Garnett <nickg@cygnus.co.uk> |
|
* include/platform.inc: |
* include/var_intr.h: |
Fixed code to acknowledge interrupts to always ack on the master |
controller and ack the slave controller when it is INT8 or higher. |
|
2000-06-20 Nick Garnett <nickg@cygnus.co.uk> |
|
* include/var_intr.h: Added cast to _data_ argument in |
HAL_INTERRUPT_ATTACH() to prevent compiler errors. |
|
2000-03-23 Nick Garnett <nickg@cygnus.co.uk> |
|
* doc/RELEASENOTES.txt: Added this file to contain release notes. |
|
2000-03-15 Nick Garnett <nickg@cygnus.co.uk> |
|
* src/hal_diag.c: Added code to handle keyboard input on PC when |
using SCREEN diagnostics. This is as much for completeness and |
future use than for any pressing current need. |
|
* include/platform.inc: Fixed some mismatches between instruction |
suffixes and operand sizes that the latest i386 assembler now |
warns about. Also tidied up GDT and IDT load code and protected |
mode switch because of warnings from assembler. |
|
2000-03-09 Jesper Skov <jskov@redhat.com> |
|
* include/platform.inc: |
* cdl/hal_i386_pc.cdl: Rename CYGHWR_HAL_STARTUP to |
CYG_HAL_STARTUP for consistency with other HALs (and tools). |
|
2000-03-02 Jonathan Larmour <jlarmour@redhat.co.uk> |
|
* cdl/hal_i386_pc.cdl (CYGBLD_GLOBAL_COMMAND_PREFIX): |
Use i386-elf toolchain by default, although add a note in the |
description that appropriate versions of native linux tools can |
also be used. |
|
2000-03-01 Nick Garnett <nickg@cygnus.co.uk> |
|
* src/plf_stub.c (cyg_hal_gdb_isr): Added check for a character |
being available at the serial line. With the introduction of GDB O |
packet debugging, it is possible for this code to see a spurious |
interrupt and get stuck in hal_pc_get_char(). |
|
* include/var_intr.h: |
Modified interrupt enable/disable code so that it is closer in |
behavior to other HALs. |
|
* include/platform.inc: |
Changed floppy bootstrap code so it can load binaries greater than |
64k and only loads the .text+.data parts, not the .bss. |
|
2000-02-18 Jonathan Larmour <jlarmour@redhat.co.uk> |
|
* cdl/hal_i386_pc.cdl (CYGBLD_BUILD_GDB_STUBS): When |
building stubs, define every dependency required here rather than |
in the template |
|
2000-02-18 John Dallaway <jld@cygnus.co.uk> |
|
* include/pkgconf/mlt_i386_pc_ram.mlt, |
include/pkgconf/mlt_i386_pc_floppy.mlt: |
|
Add/update memory layout save files to match the corresponding |
linker script fragments. |
|
2000-02-16 Nick Garnett <nickg@cygnus.co.uk> |
|
* src/hal_diag.c: Added support for generating GDB O packets when |
diagnosing to serial0. |
|
* include/plf_intr.h: Added missed copyright notice. |
|
2000-02-15 Nick Garnett <nickg@cygnus.co.uk> |
|
* cdl/hal_i386_pc.cdl: |
* include/hal_diag.h: |
* include/platform.inc: |
* include/plf_intr.h: |
* include/plf_misc.h: |
* include/plf_stub.h: |
* include/var_intr.h: |
* include/variant.inc: |
* include/pkgconf/hal_i386_pc.h: |
* include/pkgconf/mlt_i386_pc_floppy.h: |
* include/pkgconf/mlt_i386_pc_floppy.ldi: |
* include/pkgconf/mlt_i386_pc_ram.h: |
* include/pkgconf/mlt_i386_pc_ram.ldi: |
* include/pkgconf/mlt_i386_pc_ram.mlt: |
* src/PKGconf.mak: |
* src/hal_diag.c: |
* src/hal_intr.c: |
* src/hal_startup.c: |
* src/plf_misc.c: |
* src/plf_stub.c: |
* src/var_misc.c: |
Files added to provide PC support. Most of these are based on code |
contributed by Patrick O'Grady (patrick@softprocess.com). |
|
|
//=========================================================================== |
//####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#### |
//=========================================================================== |
/v2_0/misc/redboot_FLOPPY_D850GB.ecm
0,0 → 1,65
cdl_savefile_version 1; |
cdl_savefile_command cdl_savefile_version {}; |
cdl_savefile_command cdl_savefile_command {}; |
cdl_savefile_command cdl_configuration { description hardware template package }; |
cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value }; |
|
cdl_configuration eCos { |
# package CYGPKG_IO_FLASH v2_0 ; |
package CYGPKG_IO_ETH_DRIVERS v2_0 ; |
}; |
|
cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { |
user_value 0 |
}; |
|
cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM { |
user_value 0 |
}; |
|
cdl_option CYGSEM_HAL_ROM_MONITOR { |
user_value 1 |
}; |
|
cdl_component CYG_HAL_STARTUP { |
user_value FLOPPY |
}; |
|
cdl_option CYGBLD_BUILD_REDBOOT { |
user_value 1 |
}; |
|
cdl_option CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS { |
user_value 0 |
}; |
|
#cdl_option CYGSEM_REDBOOT_FLASH_CONFIG { |
# user_value 1 |
#}; |
# |
#cdl_option CYGBLD_REDBOOT_FLASH_BOOT_OFFSET { |
# inferred_value 0x1C00000 |
#}; |
|
cdl_option CYGSEM_REDBOOT_BSP_SYSCALLS { |
user_value 1 |
}; |
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS { |
user_value 2 |
}; |
|
cdl_component CYGHWR_HAL_I386_PENTIUM { |
user_value 1 |
}; |
|
cdl_option CYGHWR_HAL_I386_PENTIUM_SSE { |
user_value 1 |
}; |
|
cdl_option CYGHWR_HAL_I386_PENTIUM_GDB_REGS { |
user_value 1 |
}; |
/v2_0/misc/menu.lst
0,0 → 1,38
# Example GRUB boot menu configuration file for eCos |
|
default 0 |
timeout 30 |
|
# eCos tm_basic test from dd0 |
title eCos - tm_basic fd0 |
root (fd0) |
kernel /boot/tm_basic |
|
# eCos tm_basic test from hd0 |
title eCos - tm_basic hd0 |
root (hd0,0) |
kernel /boot/tm_basic |
|
# eCos tcp_echo test from fd0 |
title eCos - tcp_echo fd0 |
root (fd0) |
kernel /boot/tcp_echo |
|
# eCos tcp_echo test from hd0 |
title eCos - tcp_echo hd0 |
root (hd0) |
kernel /boot/tcp_echo |
|
# eCos nc_test_slave test from fd0 |
title eCos - nc_test_slave fd0 |
root (fd0) |
kernel /boot/nc_test_slave |
|
# eCos nc_test_slave test from hd0 |
title eCos - nc_test_slave hd0 |
root (hd0) |
kernel /boot/nc_test_slave |
|
#end |
|
|
/v2_0/misc/redboot_FLOPPY_SMP.ecm
0,0 → 1,44
cdl_savefile_version 1; |
cdl_savefile_command cdl_savefile_version {}; |
cdl_savefile_command cdl_savefile_command {}; |
cdl_savefile_command cdl_configuration { description hardware template package }; |
cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value }; |
|
cdl_configuration eCos { |
package CYGPKG_IO_ETH_DRIVERS v2_0 ; |
}; |
|
cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { |
user_value 0 |
}; |
|
cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM { |
user_value 0 |
}; |
|
cdl_option CYGSEM_HAL_ROM_MONITOR { |
user_value 1 |
}; |
|
cdl_component CYG_HAL_STARTUP { |
user_value FLOPPY |
}; |
|
cdl_option CYGBLD_BUILD_REDBOOT { |
user_value 1 |
}; |
|
cdl_option CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS { |
user_value 0 |
}; |
|
cdl_component CYGPKG_HAL_SMP_SUPPORT { |
user_value 1 |
}; |
|
cdl_component CYGHWR_HAL_I386_FPU_SWITCH_LAZY { |
user_value 0 |
}; |
/v2_0/misc/redboot_FLOPPY.ecm
0,0 → 1,50
cdl_savefile_version 1; |
cdl_savefile_command cdl_savefile_version {}; |
cdl_savefile_command cdl_savefile_command {}; |
cdl_savefile_command cdl_configuration { description hardware template package }; |
cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value }; |
|
cdl_configuration eCos { |
# package CYGPKG_IO_FLASH v2_0 ; |
package CYGPKG_IO_ETH_DRIVERS v2_0 ; |
}; |
|
cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { |
user_value 0 |
}; |
|
cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM { |
user_value 0 |
}; |
|
cdl_option CYGSEM_HAL_ROM_MONITOR { |
user_value 1 |
}; |
|
cdl_component CYG_HAL_STARTUP { |
user_value FLOPPY |
}; |
|
cdl_option CYGBLD_BUILD_REDBOOT { |
user_value 1 |
}; |
|
cdl_option CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS { |
user_value 0 |
}; |
|
#cdl_option CYGSEM_REDBOOT_FLASH_CONFIG { |
# user_value 1 |
#}; |
# |
#cdl_option CYGBLD_REDBOOT_FLASH_BOOT_OFFSET { |
# inferred_value 0x1C00000 |
#}; |
|
cdl_option CYGSEM_REDBOOT_BSP_SYSCALLS { |
user_value 1 |
}; |
|
/v2_0/misc/redboot_ROM.ecm
0,0 → 1,45
cdl_savefile_version 1; |
cdl_savefile_command cdl_savefile_version {}; |
cdl_savefile_command cdl_savefile_command {}; |
cdl_savefile_command cdl_configuration { description hardware template package }; |
cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value }; |
cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value }; |
|
cdl_configuration eCos { |
# package CYGPKG_IO_FLASH v2_0 ; |
# package CYGPKG_IO_ETH_DRIVERS v2_0 ; |
}; |
|
cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { |
user_value 0 |
}; |
|
cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM { |
user_value 0 |
}; |
|
cdl_option CYGSEM_HAL_ROM_MONITOR { |
user_value 1 |
}; |
|
cdl_component CYG_HAL_STARTUP { |
user_value ROM |
}; |
|
cdl_option CYGBLD_BUILD_REDBOOT { |
user_value 1 |
}; |
|
cdl_option CYGSEM_REDBOOT_VALIDATE_USER_RAM_LOADS { |
user_value 0 |
}; |
|
#cdl_option CYGSEM_REDBOOT_FLASH_CONFIG { |
# user_value 1 |
#}; |
# |
#cdl_option CYGBLD_REDBOOT_FLASH_BOOT_OFFSET { |
# inferred_value 0x1C00000 |
#}; |