arm_arch.h revision 1.5
11.5Srafal/* -*-C++-*-	$NetBSD: arm_arch.h,v 1.5 2008/03/08 02:26:03 rafal Exp $	*/
21.1Such
31.1Such/*-
41.1Such * Copyright (c) 2001 The NetBSD Foundation, Inc.
51.1Such * All rights reserved.
61.1Such *
71.1Such * This code is derived from software contributed to The NetBSD Foundation
81.1Such * by UCHIYAMA Yasushi.
91.1Such *
101.1Such * Redistribution and use in source and binary forms, with or without
111.1Such * modification, are permitted provided that the following conditions
121.1Such * are met:
131.1Such * 1. Redistributions of source code must retain the above copyright
141.1Such *    notice, this list of conditions and the following disclaimer.
151.1Such * 2. Redistributions in binary form must reproduce the above copyright
161.1Such *    notice, this list of conditions and the following disclaimer in the
171.1Such *    documentation and/or other materials provided with the distribution.
181.1Such * 3. All advertising materials mentioning features or use of this software
191.1Such *    must display the following acknowledgement:
201.1Such *        This product includes software developed by the NetBSD
211.1Such *        Foundation, Inc. and its contributors.
221.1Such * 4. Neither the name of The NetBSD Foundation nor the names of its
231.1Such *    contributors may be used to endorse or promote products derived
241.1Such *    from this software without specific prior written permission.
251.1Such *
261.1Such * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
271.1Such * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
281.1Such * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
291.1Such * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
301.1Such * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
311.1Such * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
321.1Such * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
331.1Such * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
341.1Such * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
351.1Such * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
361.1Such * POSSIBILITY OF SUCH DAMAGE.
371.1Such */
381.1Such
391.1Such#ifndef _HPCBOOT_ARM_ARCH_H_
401.2Such#define	_HPCBOOT_ARM_ARCH_H_
411.1Such
421.1Such#include <hpcboot.h>
431.1Such#include <arch.h>
441.1Such
451.1Suchclass Console;
461.1Such
471.1Suchclass ARMArchitecture : public Architecture {
481.5Srafalprotected:
491.1Such	int _kmode;
501.1Such	// test routine for SA-1100 peripherals.
511.5Srafal	virtual void testFramebuffer(void) = 0;
521.5Srafal	virtual void testUART(void) = 0;
531.1Such
541.1Suchpublic:
551.1Such	ARMArchitecture(Console *&, MemoryManager *&);
561.1Such	virtual ~ARMArchitecture(void);
571.1Such
581.5Srafal	virtual BOOL init(void) = 0;
591.1Such	void systemInfo(void);
601.5Srafal
611.5Srafal	virtual BOOL setupLoader(void) = 0;
621.5Srafal	virtual void jump(paddr_t info, paddr_t pvec) = 0;
631.1Such};
641.1Such
651.1Such__BEGIN_DECLS
661.1Such// Coprocessor 15
671.4Suweuint32_t GetCop15Reg0(void);
681.4Suweuint32_t GetCop15Reg1(void);	void SetCop15Reg1(uint32_t);
691.4Suweuint32_t GetCop15Reg2(void);	void SetCop15Reg2(uint32_t);
701.4Suweuint32_t GetCop15Reg3(void);	void SetCop15Reg3(uint32_t);
711.4Suweuint32_t GetCop15Reg5(void);
721.4Suweuint32_t GetCop15Reg6(void);
731.4Suweuint32_t GetCop15Reg13(void);	void SetCop15Reg13(uint32_t);
741.4Suweuint32_t GetCop15Reg14(void);
751.1Such
761.2Such// Interrupt
771.1Suchvoid EI(void);
781.1Suchvoid DI(void);
791.1Such
801.1Such// Write-Back I/D-separate Cache
811.1Suchvoid InvalidateICache(void);
821.1Suchvoid WritebackDCache(void);
831.1Suchvoid InvalidateDCache(void);
841.1Suchvoid WritebackInvalidateDCache(void);
851.1Such
861.1Such// MMU TLB access
871.1Suchvoid FlushIDTLB(void);
881.1Suchvoid FlushITLB(void);
891.1Suchvoid FlushDTLB(void);
901.1Suchvoid FlushDTLBS(vaddr_t);
911.1Such
921.4Suweuint32_t GetCPSR(void);
931.4Suwevoid SetCPSR(uint32_t);
941.1Suchvoid SetSVCMode(void);
951.1Suchvoid SetSystemMode(void);
961.1Such
971.1Such__END_DECLS
981.1Such
991.1Such#endif // _HPCBOOT_ARM_ARCH_H_
100