[ECOS] Some patches

Fabrice Gautier Fabrice_Gautier@sdesigns.com
Fri Oct 27 11:13:00 GMT 2000


Hi,

Here are some patches:

1/ redboot:

Some change to allow floppy startup and eliminate some warnings. 

* cdl/redboot.cdl:
  modifed some requirement for CYG_HAL_STARTUP_FLOPPY
* include/net/net.h:
  added declaration of __arp_lookup
* src/net/enet.c and net_io.c
  added include of eth_drv.h

2/ kernel

Some additions to the C API.

* include/kapi.h src/kapi.cxx
  added a C API for the clock conversation:
    a new type:
      cyg_clock_converter
    3 new functions:
      cyg_clock_get_other_to_clock_converter
      cyg_clock_get_clock_to_other_converter
      cyg_clock_convert
  added a C API for getting thread state:
      cyg_thread_get_state function and associated constants

3/ io

* include/eth_drv.h
  included cyg/hal/drv_api.h to suppress warning

4/ hal/common

* include/hal_if.h
  modifed some #ifdef for Floppy Startup
* src/hal_if.c
  HAL_SavedRegisters typo
    

In addition to those ones, I've a much bigger patch for the i386-pc HAL and
the intel PRO100 ethernet driver for i386.
The only reason there are not here is because I can't get cvs generate
proper patch with new files (cvs diff -N doesn't work). If I - or someone
else- don't figure out another way I will probably send a tarball with the
new files.

Meanwhile a word about my patch on the i386 HAL:

1/ There are changes both in arch files and in platform (PC) files, but i
didn't test anything for the linux generic target. So i suspect this patch
will badly broke the linux target.

2/ The patch enable the virtual vectors interface. In the process hal_diag.c
has been heavily modified. In fact I did a huge copy paste from the the
arm-PID hal. The previous code is still in the file but enclosed between a
"#if 0" and "#endif". This means my patch disable the nice diag output on
screen feature. (But I guess this can be worked so that the screen +
keyboard would be another channel managed by the virtual vector interface) I
didn't remobed the configuration options in the CDL but they are not used.

3/ There are radical changes in the way exception and interupt are dealt
with. I located the IDT and the vsr_table in the .vectors section (with the
virtual vectors table). There are now 48 "trampolines" (32 for CPU
exceptions and 16 for IRQs). Each trampoline save the exception error code
(if any) push the vector number and then fall into a common routine that
call the actual vsr through the hal_vsr_table. The former hal_pc_generic_irq
is now in fact the vsr for IRQs.

4/ TODO: There is few thing that are not quitte correct:
* The exception vectors (0-31) are initialized only when the stub is
included. They should routed to cyg_hal_exception_handler whatever occurs to
be delivered to the kernel. By the wy this function
(cyg_hal_exception_handler) was copied from the PID HAL and may be not all
correct.
* The exception and  interrupts doesn't use separates stack. They use the
thread stack or the main/startup stack. By the way the startup task is still
in an awfull place (ahead of _start) and I had to move the text section to
0x2000 for Floppy Startup. RAM applications start at 0x108000.

Well that's all for the moment.

Thanks
-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 






 <<ecos-ng-packages_redboot-diff.patch.txt>>  
<<ecos-ng-packages_kernel-diff.patch.txt>>  
<<ecos-ng-packages_io-diff.patch.txt>>  
<<ecos-ng-packages_hal_common-diff.patch.txt>> 


More information about the Ecos-discuss mailing list