OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [hal-porting-structure.html] - Blame information for rev 588

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>HAL Structure</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE=" Porting Guide"
23
HREF="hal-porting-guide.html"><LINK
24
REL="PREVIOUS"
25
TITLE=" Porting Guide"
26
HREF="hal-porting-guide.html"><LINK
27
REL="NEXT"
28
TITLE="Virtual Vectors (eCos/ROM Monitor Calling Interface)"
29
HREF="hal-calling-if.html"></HEAD
30
><BODY
31
CLASS="SECTION"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="hal-porting-guide.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Chapter 11. Porting Guide</TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="hal-calling-if.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="SECTION"
82
><H1
83
CLASS="SECTION"
84
><A
85
NAME="HAL-PORTING-STRUCTURE">HAL Structure</H1
86
><P
87
>In order to write an eCos HAL it's a good idea to have at least a
88
passing understanding of how the HAL interacts with the rest of the
89
system.</P
90
><DIV
91
CLASS="SECTION"
92
><H2
93
CLASS="SECTION"
94
><A
95
NAME="AEN8659">HAL Classes</H2
96
><P
97
>The eCos HAL consists of four HAL sub-classes. This table gives a
98
brief description of each class and partly reiterates the description
99
in <A
100
HREF="hal-architecture-variant-and-platform.html"
101
>Chapter 7</A
102
>. The links
103
refer to the on-line CVS tree (specifically to the sub-HALs used by
104
the PowerPC MBX target).</P
105
><DIV
106
CLASS="INFORMALTABLE"
107
><A
108
NAME="AEN8663"><P
109
></P
110
><TABLE
111
BORDER="1"
112
CLASS="CALSTABLE"
113
><THEAD
114
><TR
115
><TH
116
ALIGN="LEFT"
117
VALIGN="TOP"
118
>HAL type</TH
119
><TH
120
ALIGN="LEFT"
121
VALIGN="TOP"
122
>Description</TH
123
><TH
124
ALIGN="LEFT"
125
VALIGN="TOP"
126
>Functionality Overview</TH
127
></TR
128
></THEAD
129
><TBODY
130
><TR
131
><TD
132
ALIGN="LEFT"
133
VALIGN="TOP"
134
>Common HAL <A
135
HREF="http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/ecos/packages/hal/common/current?cvsroot=ecos"
136
TARGET="_top"
137
>(hal/common)</A
138
></TD
139
><TD
140
ALIGN="LEFT"
141
VALIGN="TOP"
142
>Configuration options and functionality shared by all HALs.</TD
143
><TD
144
ALIGN="LEFT"
145
VALIGN="TOP"
146
>Generic debugging functionality, driver API, eCos/ROM monitor
147
      calling interface, and tests.</TD
148
></TR
149
><TR
150
><TD
151
ALIGN="LEFT"
152
VALIGN="TOP"
153
>Architecture HAL <A
154
HREF="http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/ecos/packages/hal/powerpc/arch/current?cvsroot=ecos"
155
TARGET="_top"
156
>(hal/&lt;architecture&gt;/arch)</A
157
></TD
158
><TD
159
ALIGN="LEFT"
160
VALIGN="TOP"
161
>Functionality specific to the given architecture. Also default
162
  implementations of some functionality which can be overridden by
163
  variant or platform HALs.</TD
164
><TD
165
ALIGN="LEFT"
166
VALIGN="TOP"
167
>Architecture specific debugger functionality (handles single
168
     stepping, exception-to-signal conversion, etc.),
169
     exception/interrupt vector definitions and handlers, cache
170
     definition and control macros, context switching code, assembler
171
     functions for early system initialization, configuration options,
172
     and possibly tests. </TD
173
></TR
174
><TR
175
><TD
176
ALIGN="LEFT"
177
VALIGN="TOP"
178
>Variant HAL <A
179
HREF="http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/ecos/packages/hal/powerpc/mpc8xx/current?cvsroot=ecos"
180
TARGET="_top"
181
>(hal/&lt;architecture&gt;/&lt;variant&gt;)</A
182
></TD
183
><TD
184
ALIGN="LEFT"
185
VALIGN="TOP"
186
>Some CPU architectures consist of a number variants, for example
187
     MIPS CPUs come in both 32 and 64 bit versions, and some variants
188
     have embedded features additional to the CPU core.</TD
189
><TD
190
ALIGN="LEFT"
191
VALIGN="TOP"
192
>Variant extensions to the architecture code (cache,
193
     exception/interrupt), configuration options, possibly drivers for
194
     variant on-core devices, and possibly tests.</TD
195
></TR
196
><TR
197
><TD
198
ALIGN="LEFT"
199
VALIGN="TOP"
200
>Platform HAL <A
201
HREF="http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/ecos/packages/hal/powerpc/mbx/current?cvsroot=ecos"
202
TARGET="_top"
203
>(hal/&lt;architecture&gt;/&lt;platform&gt;)</A
204
></TD
205
><TD
206
ALIGN="LEFT"
207
VALIGN="TOP"
208
>Contains functionality and configuration options specific to the
209
      platform.</TD
210
><TD
211
ALIGN="LEFT"
212
VALIGN="TOP"
213
>Early platform initialization code, platform memory layout
214
     specification, configuration options (processor speed, compiler
215
     options), diagnostic IO functions, debugger IO functions,
216
     platform specific extensions to architecture or variant code
217
     (off-core interrupt controller), and possibly tests.</TD
218
></TR
219
><TR
220
><TD
221
ALIGN="LEFT"
222
VALIGN="TOP"
223
>Auxiliary HAL <A
224
HREF="http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/ecos/packages/hal/powerpc/quicc/current?cvsroot=ecos"
225
TARGET="_top"
226
>(hal/&lt;architecture&gt;/&lt;module&gt;)</A
227
></TD
228
><TD
229
ALIGN="LEFT"
230
VALIGN="TOP"
231
>Some variants share common modules on the core. Motorola's PowerPC
232
      QUICC is an example of such a module.</TD
233
><TD
234
ALIGN="LEFT"
235
VALIGN="TOP"
236
>Module specific functionality (interrupt controller, simple
237
      device drivers), possibly tests.</TD
238
></TR
239
></TBODY
240
></TABLE
241
><P
242
></P
243
></DIV
244
></DIV
245
><DIV
246
CLASS="SECTION"
247
><H2
248
CLASS="SECTION"
249
><A
250
NAME="AEN8696">File Descriptions</H2
251
><P
252
>Listed below are the files found in various HALs, with a short
253
description of what each file contains. When looking in existing HALs
254
beware that they do not necessarily follow this naming scheme.
255
If you are writing a new HAL, please try to follow it as
256
closely as possible. Still, no two targets are the same, so sometimes
257
it makes sense to use additional files.</P
258
><DIV
259
CLASS="SECTION"
260
><H3
261
CLASS="SECTION"
262
><A
263
NAME="AEN8699">Common HAL</H3
264
><DIV
265
CLASS="INFORMALTABLE"
266
><A
267
NAME="AEN8701"><P
268
></P
269
><TABLE
270
BORDER="1"
271
CLASS="CALSTABLE"
272
><THEAD
273
><TR
274
><TH
275
ALIGN="LEFT"
276
VALIGN="TOP"
277
>File</TH
278
><TH
279
ALIGN="LEFT"
280
VALIGN="TOP"
281
>Description</TH
282
></TR
283
></THEAD
284
><TBODY
285
><TR
286
><TD
287
ALIGN="LEFT"
288
VALIGN="TOP"
289
><TT
290
CLASS="FILENAME"
291
>include/dbg-thread-syscall.h</TT
292
></TD
293
><TD
294
ALIGN="LEFT"
295
VALIGN="TOP"
296
>Defines the thread debugging syscall function. This is used by
297
  the ROM monitor to access the thread debugging API in the RAM
298
  application.  .</TD
299
></TR
300
><TR
301
><TD
302
ALIGN="LEFT"
303
VALIGN="TOP"
304
><TT
305
CLASS="FILENAME"
306
>include/dbg-threads-api.h</TT
307
></TD
308
><TD
309
ALIGN="LEFT"
310
VALIGN="TOP"
311
>Defines the thread debugging API. .</TD
312
></TR
313
><TR
314
><TD
315
ALIGN="LEFT"
316
VALIGN="TOP"
317
><TT
318
CLASS="FILENAME"
319
>include/drv_api.h</TT
320
></TD
321
><TD
322
ALIGN="LEFT"
323
VALIGN="TOP"
324
>Defines the driver API.</TD
325
></TR
326
><TR
327
><TD
328
ALIGN="LEFT"
329
VALIGN="TOP"
330
><TT
331
CLASS="FILENAME"
332
>include/generic-stub.h</TT
333
></TD
334
><TD
335
ALIGN="LEFT"
336
VALIGN="TOP"
337
>Defines the generic stub features.</TD
338
></TR
339
><TR
340
><TD
341
ALIGN="LEFT"
342
VALIGN="TOP"
343
><TT
344
CLASS="FILENAME"
345
>include/hal_if.h</TT
346
></TD
347
><TD
348
ALIGN="LEFT"
349
VALIGN="TOP"
350
>Defines the ROM/RAM calling interface API.</TD
351
></TR
352
><TR
353
><TD
354
ALIGN="LEFT"
355
VALIGN="TOP"
356
><TT
357
CLASS="FILENAME"
358
>include/hal_misc.h</TT
359
></TD
360
><TD
361
ALIGN="LEFT"
362
VALIGN="TOP"
363
>Defines miscellaneous helper functions shared by all HALs.</TD
364
></TR
365
><TR
366
><TD
367
ALIGN="LEFT"
368
VALIGN="TOP"
369
><TT
370
CLASS="FILENAME"
371
>include/hal_stub.h</TT
372
></TD
373
><TD
374
ALIGN="LEFT"
375
VALIGN="TOP"
376
>Defines eCos mappings of GDB stub features.</TD
377
></TR
378
><TR
379
><TD
380
ALIGN="LEFT"
381
VALIGN="TOP"
382
><TT
383
CLASS="FILENAME"
384
>src/dbg-threads-syscall.c</TT
385
></TD
386
><TD
387
ALIGN="LEFT"
388
VALIGN="TOP"
389
>Thread debugging implementation.</TD
390
></TR
391
><TR
392
><TD
393
ALIGN="LEFT"
394
VALIGN="TOP"
395
><TT
396
CLASS="FILENAME"
397
>src/drv_api.c</TT
398
></TD
399
><TD
400
ALIGN="LEFT"
401
VALIGN="TOP"
402
>Driver API implementation. Depending on configuration this
403
  provides either wrappers for the kernel API, or a minimal
404
  implementation of these features. This allows drivers to be written
405
  relying only on HAL features.</TD
406
></TR
407
><TR
408
><TD
409
ALIGN="LEFT"
410
VALIGN="TOP"
411
><TT
412
CLASS="FILENAME"
413
>src/dummy.c</TT
414
></TD
415
><TD
416
ALIGN="LEFT"
417
VALIGN="TOP"
418
>Empty dummy file ensuring creation of libtarget.a.</TD
419
></TR
420
><TR
421
><TD
422
ALIGN="LEFT"
423
VALIGN="TOP"
424
><TT
425
CLASS="FILENAME"
426
>src/generic-stub.c</TT
427
></TD
428
><TD
429
ALIGN="LEFT"
430
VALIGN="TOP"
431
>Generic GDB stub implementation. This provides the
432
  communication protocol used to communicate with GDB over a serial
433
  device or via the network.</TD
434
></TR
435
><TR
436
><TD
437
ALIGN="LEFT"
438
VALIGN="TOP"
439
><TT
440
CLASS="FILENAME"
441
>src/hal_if.c</TT
442
></TD
443
><TD
444
ALIGN="LEFT"
445
VALIGN="TOP"
446
>ROM/RAM calling interface implementation. Provides wrappers from
447
  the calling interface API to the eCos features used for the
448
  implementation.</TD
449
></TR
450
><TR
451
><TD
452
ALIGN="LEFT"
453
VALIGN="TOP"
454
><TT
455
CLASS="FILENAME"
456
>src/hal_misc.c</TT
457
></TD
458
><TD
459
ALIGN="LEFT"
460
VALIGN="TOP"
461
>Various helper functions shared by all platforms and
462
  architectures.</TD
463
></TR
464
><TR
465
><TD
466
ALIGN="LEFT"
467
VALIGN="TOP"
468
><TT
469
CLASS="FILENAME"
470
>src/hal_stub.c</TT
471
></TD
472
><TD
473
ALIGN="LEFT"
474
VALIGN="TOP"
475
>Wrappers from eCos HAL features to the features required by the
476
  generic GDB stub.</TD
477
></TR
478
><TR
479
><TD
480
ALIGN="LEFT"
481
VALIGN="TOP"
482
><TT
483
CLASS="FILENAME"
484
>src/stubrom/stubrom.c</TT
485
></TD
486
><TD
487
ALIGN="LEFT"
488
VALIGN="TOP"
489
>The file used to build eCos GDB stub images. Basically a
490
  cyg_start function with a hard coded breakpoint.</TD
491
></TR
492
><TR
493
><TD
494
ALIGN="LEFT"
495
VALIGN="TOP"
496
><TT
497
CLASS="FILENAME"
498
>src/thread-packets.c</TT
499
></TD
500
><TD
501
ALIGN="LEFT"
502
VALIGN="TOP"
503
>More thread debugging related functions.</TD
504
></TR
505
><TR
506
><TD
507
ALIGN="LEFT"
508
VALIGN="TOP"
509
><TT
510
CLASS="FILENAME"
511
>src/thread-pkts.h</TT
512
></TD
513
><TD
514
ALIGN="LEFT"
515
VALIGN="TOP"
516
>Defines more thread debugging related function.</TD
517
></TR
518
></TBODY
519
></TABLE
520
><P
521
></P
522
></DIV
523
></DIV
524
><DIV
525
CLASS="SECTION"
526
><H3
527
CLASS="SECTION"
528
><A
529
NAME="AEN8776">Architecture HAL</H3
530
><P
531
>Some architecture HALs may add extra files for architecture
532
specific serial drivers, or for handling interrupts and exceptions if it
533
makes sense.</P
534
><P
535
>Note that many of the definitions in these files are only
536
conditionally defined - if the equivalent variant or platform headers
537
provide the definitions, those override the generic architecture
538
definitions.</P
539
><DIV
540
CLASS="INFORMALTABLE"
541
><A
542
NAME="AEN8780"><P
543
></P
544
><TABLE
545
BORDER="1"
546
CLASS="CALSTABLE"
547
><THEAD
548
><TR
549
><TH
550
ALIGN="LEFT"
551
VALIGN="TOP"
552
>File</TH
553
><TH
554
ALIGN="LEFT"
555
VALIGN="TOP"
556
>Description</TH
557
></TR
558
></THEAD
559
><TBODY
560
><TR
561
><TD
562
ALIGN="LEFT"
563
VALIGN="TOP"
564
><TT
565
CLASS="FILENAME"
566
>include/arch.inc</TT
567
></TD
568
><TD
569
ALIGN="LEFT"
570
VALIGN="TOP"
571
>Various assembly macros used during system initialization.</TD
572
></TR
573
><TR
574
><TD
575
ALIGN="LEFT"
576
VALIGN="TOP"
577
><TT
578
CLASS="FILENAME"
579
>include/basetype.h</TT
580
></TD
581
><TD
582
ALIGN="LEFT"
583
VALIGN="TOP"
584
>Endian, label, alignment, and type size definitions. These
585
  override common defaults in CYGPKG_INFRA.</TD
586
></TR
587
><TR
588
><TD
589
ALIGN="LEFT"
590
VALIGN="TOP"
591
><TT
592
CLASS="FILENAME"
593
>include/hal_arch.h</TT
594
></TD
595
><TD
596
ALIGN="LEFT"
597
VALIGN="TOP"
598
>Saved register frame format, various thread, register and stack
599
  related macros.</TD
600
></TR
601
><TR
602
><TD
603
ALIGN="LEFT"
604
VALIGN="TOP"
605
><TT
606
CLASS="FILENAME"
607
>include/hal_cache.h</TT
608
></TD
609
><TD
610
ALIGN="LEFT"
611
VALIGN="TOP"
612
>Cache definitions and cache control macros.</TD
613
></TR
614
><TR
615
><TD
616
ALIGN="LEFT"
617
VALIGN="TOP"
618
><TT
619
CLASS="FILENAME"
620
>include/hal_intr.h</TT
621
></TD
622
><TD
623
ALIGN="LEFT"
624
VALIGN="TOP"
625
>Exception and interrupt definitions. Macros for configuring and
626
  controlling interrupts. eCos real-time clock control macros.</TD
627
></TR
628
><TR
629
><TD
630
ALIGN="LEFT"
631
VALIGN="TOP"
632
><TT
633
CLASS="FILENAME"
634
>include/hal_io.h</TT
635
></TD
636
><TD
637
ALIGN="LEFT"
638
VALIGN="TOP"
639
>Macros for accessing IO devices.</TD
640
></TR
641
><TR
642
><TD
643
ALIGN="LEFT"
644
VALIGN="TOP"
645
><TT
646
CLASS="FILENAME"
647
>include/&lt;arch&gt;_regs.h</TT
648
></TD
649
><TD
650
ALIGN="LEFT"
651
VALIGN="TOP"
652
>Architecture register definitions.</TD
653
></TR
654
><TR
655
><TD
656
ALIGN="LEFT"
657
VALIGN="TOP"
658
><TT
659
CLASS="FILENAME"
660
>include/&lt;arch&gt;_stub.h</TT
661
></TD
662
><TD
663
ALIGN="LEFT"
664
VALIGN="TOP"
665
>Architecture stub definitions. In particular the register frame
666
  layout used by GDB. This may differ from the one used by eCos.</TD
667
></TR
668
><TR
669
><TD
670
ALIGN="LEFT"
671
VALIGN="TOP"
672
><TT
673
CLASS="FILENAME"
674
>include/&lt;arch&gt;.inc</TT
675
></TD
676
><TD
677
ALIGN="LEFT"
678
VALIGN="TOP"
679
>Architecture convenience assembly macros.</TD
680
></TR
681
><TR
682
><TD
683
ALIGN="LEFT"
684
VALIGN="TOP"
685
><TT
686
CLASS="FILENAME"
687
>src/&lt;arch&gt;.ld</TT
688
></TD
689
><TD
690
ALIGN="LEFT"
691
VALIGN="TOP"
692
>Linker macros.</TD
693
></TR
694
><TR
695
><TD
696
ALIGN="LEFT"
697
VALIGN="TOP"
698
><TT
699
CLASS="FILENAME"
700
>src/context.S</TT
701
></TD
702
><TD
703
ALIGN="LEFT"
704
VALIGN="TOP"
705
>Functions handling context switching and setjmp/longjmp.</TD
706
></TR
707
><TR
708
><TD
709
ALIGN="LEFT"
710
VALIGN="TOP"
711
><TT
712
CLASS="FILENAME"
713
>src/hal_misc.c</TT
714
></TD
715
><TD
716
ALIGN="LEFT"
717
VALIGN="TOP"
718
>Exception and interrupt handlers in C. Various other utility
719
  functions.</TD
720
></TR
721
><TR
722
><TD
723
ALIGN="LEFT"
724
VALIGN="TOP"
725
><TT
726
CLASS="FILENAME"
727
>src/hal_mk_defs.c</TT
728
></TD
729
><TD
730
ALIGN="LEFT"
731
VALIGN="TOP"
732
>Used to export definitions from C header files to assembler
733
  header files.</TD
734
></TR
735
><TR
736
><TD
737
ALIGN="LEFT"
738
VALIGN="TOP"
739
><TT
740
CLASS="FILENAME"
741
>src/hal_intr.c</TT
742
></TD
743
><TD
744
ALIGN="LEFT"
745
VALIGN="TOP"
746
>Any necessary interrupt handling functions.</TD
747
></TR
748
><TR
749
><TD
750
ALIGN="LEFT"
751
VALIGN="TOP"
752
><TT
753
CLASS="FILENAME"
754
>src/&lt;arch&gt;stub.c</TT
755
></TD
756
><TD
757
ALIGN="LEFT"
758
VALIGN="TOP"
759
>Architecture stub code. Contains functions for translating eCos
760
  exceptions to UNIX signals and functions for single-stepping.</TD
761
></TR
762
><TR
763
><TD
764
ALIGN="LEFT"
765
VALIGN="TOP"
766
><TT
767
CLASS="FILENAME"
768
>src/vectors.S</TT
769
></TD
770
><TD
771
ALIGN="LEFT"
772
VALIGN="TOP"
773
>Exception, interrupt and early initialization code.</TD
774
></TR
775
></TBODY
776
></TABLE
777
><P
778
></P
779
></DIV
780
></DIV
781
><DIV
782
CLASS="SECTION"
783
><H3
784
CLASS="SECTION"
785
><A
786
NAME="AEN8851">Variant HAL</H3
787
><P
788
>Some variant HALs may add extra files for variant specific serial
789
drivers, or for handling interrupts/exceptions if it makes sense.</P
790
><P
791
>Note that these files may be mostly empty if the CPU variant can be
792
controlled by the generic architecture macros. The definitions present
793
are only conditionally defined - if the equivalent platform headers
794
provide the definitions, those override the variant definitions.</P
795
><DIV
796
CLASS="INFORMALTABLE"
797
><A
798
NAME="AEN8855"><P
799
></P
800
><TABLE
801
BORDER="1"
802
CLASS="CALSTABLE"
803
><THEAD
804
><TR
805
><TH
806
ALIGN="LEFT"
807
VALIGN="TOP"
808
>File</TH
809
><TH
810
ALIGN="LEFT"
811
VALIGN="TOP"
812
>Description</TH
813
></TR
814
></THEAD
815
><TBODY
816
><TR
817
><TD
818
ALIGN="LEFT"
819
VALIGN="TOP"
820
><TT
821
CLASS="FILENAME"
822
>include/var_arch.h</TT
823
></TD
824
><TD
825
ALIGN="LEFT"
826
VALIGN="TOP"
827
>Saved register frame format, various thread, register and stack
828
  related macros.</TD
829
></TR
830
><TR
831
><TD
832
ALIGN="LEFT"
833
VALIGN="TOP"
834
><TT
835
CLASS="FILENAME"
836
>include/var_cache.h</TT
837
></TD
838
><TD
839
ALIGN="LEFT"
840
VALIGN="TOP"
841
>Cache related macros.</TD
842
></TR
843
><TR
844
><TD
845
ALIGN="LEFT"
846
VALIGN="TOP"
847
><TT
848
CLASS="FILENAME"
849
>include/var_intr.h</TT
850
></TD
851
><TD
852
ALIGN="LEFT"
853
VALIGN="TOP"
854
>Interrupt related macros.</TD
855
></TR
856
><TR
857
><TD
858
ALIGN="LEFT"
859
VALIGN="TOP"
860
><TT
861
CLASS="FILENAME"
862
>include/var_regs.h</TT
863
></TD
864
><TD
865
ALIGN="LEFT"
866
VALIGN="TOP"
867
>Extra register definitions for the CPU variant.</TD
868
></TR
869
><TR
870
><TD
871
ALIGN="LEFT"
872
VALIGN="TOP"
873
><TT
874
CLASS="FILENAME"
875
>include/variant.inc</TT
876
></TD
877
><TD
878
ALIGN="LEFT"
879
VALIGN="TOP"
880
>Various assembly macros used during system initialization.</TD
881
></TR
882
><TR
883
><TD
884
ALIGN="LEFT"
885
VALIGN="TOP"
886
><TT
887
CLASS="FILENAME"
888
>src/var_intr.c</TT
889
></TD
890
><TD
891
ALIGN="LEFT"
892
VALIGN="TOP"
893
>Interrupt functions if necessary.</TD
894
></TR
895
><TR
896
><TD
897
ALIGN="LEFT"
898
VALIGN="TOP"
899
><TT
900
CLASS="FILENAME"
901
>src/var_misc.c</TT
902
></TD
903
><TD
904
ALIGN="LEFT"
905
VALIGN="TOP"
906
>hal_variant_init function and any necessary extra functions.</TD
907
></TR
908
><TR
909
><TD
910
ALIGN="LEFT"
911
VALIGN="TOP"
912
><TT
913
CLASS="FILENAME"
914
>src/variant.S</TT
915
></TD
916
><TD
917
ALIGN="LEFT"
918
VALIGN="TOP"
919
>Interrupt handler table definition.</TD
920
></TR
921
><TR
922
><TD
923
ALIGN="LEFT"
924
VALIGN="TOP"
925
><TT
926
CLASS="FILENAME"
927
>src/&lt;arch&gt;_&lt;variant&gt;.ld</TT
928
></TD
929
><TD
930
ALIGN="LEFT"
931
VALIGN="TOP"
932
>Linker macros.</TD
933
></TR
934
></TBODY
935
></TABLE
936
><P
937
></P
938
></DIV
939
></DIV
940
><DIV
941
CLASS="SECTION"
942
><H3
943
CLASS="SECTION"
944
><A
945
NAME="AEN8898">Platform HAL</H3
946
><P
947
>Extras files may be added for platform specific serial
948
drivers. Extra files for handling interrupts and exceptions will be
949
present if it makes sense.</P
950
><DIV
951
CLASS="INFORMALTABLE"
952
><A
953
NAME="AEN8901"><P
954
></P
955
><TABLE
956
BORDER="1"
957
CLASS="CALSTABLE"
958
><THEAD
959
><TR
960
><TH
961
ALIGN="LEFT"
962
VALIGN="TOP"
963
>File</TH
964
><TH
965
ALIGN="LEFT"
966
VALIGN="TOP"
967
>Description</TH
968
></TR
969
></THEAD
970
><TBODY
971
><TR
972
><TD
973
ALIGN="LEFT"
974
VALIGN="TOP"
975
><TT
976
CLASS="FILENAME"
977
>include/hal_diag.h</TT
978
></TD
979
><TD
980
ALIGN="LEFT"
981
VALIGN="TOP"
982
>Defines functions used for HAL diagnostics output. This would
983
  normally be the ROM calling interface wrappers, but may also be the
984
  low-level IO functions themselves, saving a little overhead.</TD
985
></TR
986
><TR
987
><TD
988
ALIGN="LEFT"
989
VALIGN="TOP"
990
><TT
991
CLASS="FILENAME"
992
>include/platform.inc</TT
993
></TD
994
><TD
995
ALIGN="LEFT"
996
VALIGN="TOP"
997
>Platform initialization code. This includes memory controller,
998
  vectors, and monitor initialization. Depending on the architecture,
999
  other things may need defining here as well: interrupt decoding,
1000
  status register initialization value, etc.</TD
1001
></TR
1002
><TR
1003
><TD
1004
ALIGN="LEFT"
1005
VALIGN="TOP"
1006
><TT
1007
CLASS="FILENAME"
1008
>include/plf_cache.h</TT
1009
></TD
1010
><TD
1011
ALIGN="LEFT"
1012
VALIGN="TOP"
1013
>Platform specific cache handling.</TD
1014
></TR
1015
><TR
1016
><TD
1017
ALIGN="LEFT"
1018
VALIGN="TOP"
1019
><TT
1020
CLASS="FILENAME"
1021
>include/plf_intr.h</TT
1022
></TD
1023
><TD
1024
ALIGN="LEFT"
1025
VALIGN="TOP"
1026
>Platform specific interrupt handling.</TD
1027
></TR
1028
><TR
1029
><TD
1030
ALIGN="LEFT"
1031
VALIGN="TOP"
1032
><TT
1033
CLASS="FILENAME"
1034
>include/plf_io.h</TT
1035
></TD
1036
><TD
1037
ALIGN="LEFT"
1038
VALIGN="TOP"
1039
>PCI IO definitions and macros. May also be used to override
1040
  generic HAL IO macros if the platform endianness differs from that of
1041
  the CPU.</TD
1042
></TR
1043
><TR
1044
><TD
1045
ALIGN="LEFT"
1046
VALIGN="TOP"
1047
><TT
1048
CLASS="FILENAME"
1049
>include/plf_stub.h</TT
1050
></TD
1051
><TD
1052
ALIGN="LEFT"
1053
VALIGN="TOP"
1054
>Defines stub initializer and board reset details.</TD
1055
></TR
1056
><TR
1057
><TD
1058
ALIGN="LEFT"
1059
VALIGN="TOP"
1060
><TT
1061
CLASS="FILENAME"
1062
>src/hal_diag.c</TT
1063
></TD
1064
><TD
1065
ALIGN="LEFT"
1066
VALIGN="TOP"
1067
>May contain the low-level device drivers. But these may also
1068
  reside in plf_stub.c</TD
1069
></TR
1070
><TR
1071
><TD
1072
ALIGN="LEFT"
1073
VALIGN="TOP"
1074
><TT
1075
CLASS="FILENAME"
1076
>src/platform.S</TT
1077
></TD
1078
><TD
1079
ALIGN="LEFT"
1080
VALIGN="TOP"
1081
>Memory controller setup macro, and if necessary interrupt
1082
  springboard code.</TD
1083
></TR
1084
><TR
1085
><TD
1086
ALIGN="LEFT"
1087
VALIGN="TOP"
1088
><TT
1089
CLASS="FILENAME"
1090
>src/plf_misc.c</TT
1091
></TD
1092
><TD
1093
ALIGN="LEFT"
1094
VALIGN="TOP"
1095
>Platform initialization code.</TD
1096
></TR
1097
><TR
1098
><TD
1099
ALIGN="LEFT"
1100
VALIGN="TOP"
1101
><TT
1102
CLASS="FILENAME"
1103
>src/plf_mk_defs.c</TT
1104
></TD
1105
><TD
1106
ALIGN="LEFT"
1107
VALIGN="TOP"
1108
>Used to export definitions from C header files to assembler
1109
  header files.</TD
1110
></TR
1111
><TR
1112
><TD
1113
ALIGN="LEFT"
1114
VALIGN="TOP"
1115
><TT
1116
CLASS="FILENAME"
1117
>src/plf_stub.c</TT
1118
></TD
1119
><TD
1120
ALIGN="LEFT"
1121
VALIGN="TOP"
1122
>Platform specific stub initialization and possibly the low-level
1123
  device driver.</TD
1124
></TR
1125
></TBODY
1126
></TABLE
1127
><P
1128
></P
1129
></DIV
1130
><P
1131
>The platform HAL also contains files specifying the platform's
1132
memory layout. These files are located in
1133
<TT
1134
CLASS="FILENAME"
1135
>include/pkgconf</TT
1136
>.</P
1137
></DIV
1138
><DIV
1139
CLASS="SECTION"
1140
><H3
1141
CLASS="SECTION"
1142
><A
1143
NAME="AEN8954">Auxiliary HAL</H3
1144
><P
1145
>Auxiliary HALs contain whatever files are necessary to provide the
1146
required functionality. There are no predefined set of files required
1147
in an auxiliary HAL.</P
1148
></DIV
1149
></DIV
1150
></DIV
1151
><DIV
1152
CLASS="NAVFOOTER"
1153
><HR
1154
ALIGN="LEFT"
1155
WIDTH="100%"><TABLE
1156
SUMMARY="Footer navigation table"
1157
WIDTH="100%"
1158
BORDER="0"
1159
CELLPADDING="0"
1160
CELLSPACING="0"
1161
><TR
1162
><TD
1163
WIDTH="33%"
1164
ALIGN="left"
1165
VALIGN="top"
1166
><A
1167
HREF="hal-porting-guide.html"
1168
ACCESSKEY="P"
1169
>Prev</A
1170
></TD
1171
><TD
1172
WIDTH="34%"
1173
ALIGN="center"
1174
VALIGN="top"
1175
><A
1176
HREF="ecos-ref.html"
1177
ACCESSKEY="H"
1178
>Home</A
1179
></TD
1180
><TD
1181
WIDTH="33%"
1182
ALIGN="right"
1183
VALIGN="top"
1184
><A
1185
HREF="hal-calling-if.html"
1186
ACCESSKEY="N"
1187
>Next</A
1188
></TD
1189
></TR
1190
><TR
1191
><TD
1192
WIDTH="33%"
1193
ALIGN="left"
1194
VALIGN="top"
1195
>Porting Guide</TD
1196
><TD
1197
WIDTH="34%"
1198
ALIGN="center"
1199
VALIGN="top"
1200
><A
1201
HREF="hal-porting-guide.html"
1202
ACCESSKEY="U"
1203
>Up</A
1204
></TD
1205
><TD
1206
WIDTH="33%"
1207
ALIGN="right"
1208
VALIGN="top"
1209
>Virtual Vectors (eCos/ROM Monitor Calling Interface)</TD
1210
></TR
1211
></TABLE
1212
></DIV
1213
></BODY
1214
></HTML
1215
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.