arm_arch.h revision 1.2
11.2Such/* -*-C++-*- $NetBSD: arm_arch.h,v 1.2 2004/08/06 18:33:09 uch 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.1Suchprivate: 491.1Such int _kmode; 501.1Such // test routine for SA-1100 peripherals. 511.1Such void testFramebuffer(void); 521.1Such void testUART(void); 531.1Such 541.1Suchpublic: 551.1Such ARMArchitecture(Console *&, MemoryManager *&); 561.1Such virtual ~ARMArchitecture(void); 571.1Such 581.1Such BOOL init(void); 591.1Such BOOL setupLoader(void); 601.1Such void systemInfo(void); 611.1Such void jump(paddr_t info, paddr_t pvce); 621.1Such}; 631.1Such 641.1Such__BEGIN_DECLS 651.1Such// Coprocessor 15 661.1Suchu_int32_t GetCop15Reg0(void); 671.1Suchu_int32_t GetCop15Reg1(void); void SetCop15Reg1(u_int32_t); 681.1Suchu_int32_t GetCop15Reg2(void); void SetCop15Reg2(u_int32_t); 691.1Suchu_int32_t GetCop15Reg3(void); void SetCop15Reg3(u_int32_t); 701.1Suchu_int32_t GetCop15Reg5(void); 711.1Suchu_int32_t GetCop15Reg6(void); 721.1Suchu_int32_t GetCop15Reg13(void); void SetCop15Reg13(u_int32_t); 731.1Suchu_int32_t GetCop15Reg14(void); 741.1Such 751.2Such// Interrupt 761.1Suchvoid EI(void); 771.1Suchvoid DI(void); 781.1Such 791.1Such// Write-Back I/D-separate Cache 801.1Suchvoid InvalidateICache(void); 811.1Suchvoid WritebackDCache(void); 821.1Suchvoid InvalidateDCache(void); 831.1Suchvoid WritebackInvalidateDCache(void); 841.1Such 851.1Such// MMU TLB access 861.1Suchvoid FlushIDTLB(void); 871.1Suchvoid FlushITLB(void); 881.1Suchvoid FlushDTLB(void); 891.1Suchvoid FlushDTLBS(vaddr_t); 901.1Such 911.1Suchu_int32_t GetCPSR(void); 921.1Suchvoid SetCPSR(u_int32_t); 931.1Suchvoid SetSVCMode(void); 941.1Suchvoid SetSystemMode(void); 951.1Such 961.1Such// 2nd bootloader 971.1Suchvoid boot_func(kaddr_t, kaddr_t, kaddr_t, kaddr_t); 981.1Suchextern char boot_func_end[]; 991.2Such#define BOOT_FUNC_START reinterpret_cast <vaddr_t>(boot_func) 1001.2Such#define BOOT_FUNC_END reinterpret_cast <vaddr_t>(boot_func_end) 1011.1Such 1021.1Such/* jump to 2nd loader */ 1031.1Suchvoid FlatJump(kaddr_t, kaddr_t, kaddr_t, kaddr_t); 1041.1Such__END_DECLS 1051.1Such 1061.1Such#endif // _HPCBOOT_ARM_ARCH_H_ 107