1 1.2 skrll /* $NetBSD: cyclone_boot.h,v 1.2 2021/08/22 07:00:41 skrll Exp $ */ 2 1.1 chris 3 1.1 chris /* 4 1.1 chris * Copyright (c) 1997,1998 Mark Brinicombe. 5 1.1 chris * Copyright (c) 1997,1998 Causality Limited. 6 1.1 chris * All rights reserved. 7 1.1 chris * 8 1.1 chris * Redistribution and use in source and binary forms, with or without 9 1.1 chris * modification, are permitted provided that the following conditions 10 1.1 chris * are met: 11 1.1 chris * 1. Redistributions of source code must retain the above copyright 12 1.1 chris * notice, this list of conditions and the following disclaimer. 13 1.1 chris * 2. Redistributions in binary form must reproduce the above copyright 14 1.1 chris * notice, this list of conditions and the following disclaimer in the 15 1.1 chris * documentation and/or other materials provided with the distribution. 16 1.1 chris * 3. All advertising materials mentioning features or use of this software 17 1.1 chris * must display the following acknowledgement: 18 1.1 chris * This product includes software developed by Mark Brinicombe. 19 1.1 chris * 4. The name of the company nor the name of the author may be used to 20 1.1 chris * endorse or promote products derived from this software without specific 21 1.1 chris * prior written permission. 22 1.1 chris * 23 1.1 chris * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 24 1.1 chris * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 1.1 chris * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26 1.1 chris * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 27 1.1 chris * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28 1.1 chris * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29 1.1 chris * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 1.1 chris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 1.1 chris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 1.1 chris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 1.1 chris * SUCH DAMAGE. 34 1.1 chris */ 35 1.1 chris 36 1.1 chris /* 37 1.1 chris * Define the boot structure that is passed to the kernel 38 1.1 chris * from the cyclone firmware. 39 1.1 chris * 40 1.1 chris * The bootloader reserves a page for boot argument info. 41 1.1 chris * This page will contain the ebsaboot structure and the 42 1.1 chris * kernel argument string. 43 1.1 chris */ 44 1.1 chris 45 1.1 chris struct ebsaboot { 46 1.2 skrll uint32_t bt_magic; /* boot info magic number */ 47 1.2 skrll uint32_t bt_vargp; /* virtual addr of arg page */ 48 1.2 skrll uint32_t bt_pargp; /* physical addr of arg page */ 49 1.1 chris const char * bt_args; /* kernel args string pointer */ 50 1.1 chris pd_entry_t * bt_l1; /* active L1 page table */ 51 1.2 skrll uint32_t bt_memstart; /* start of physical memory */ 52 1.2 skrll uint32_t bt_memend; /* end of physical memory */ 53 1.2 skrll uint32_t bt_memavail; /* start of avail phys memory */ 54 1.2 skrll uint32_t bt_fclk; /* fclk frequency */ 55 1.2 skrll uint32_t bt_pciclk; /* PCI bus frequency */ 56 1.2 skrll uint32_t bt_vers; /* structure version (CATS) */ 57 1.2 skrll uint32_t bt_features; /* feature mask (CATS) */ 58 1.1 chris }; 59 1.1 chris 60 1.1 chris #define BT_MAGIC_NUMBER_EBSA 0x45425341 61 1.1 chris #define BT_MAGIC_NUMBER_CATS 0x43415453 62 1.1 chris 63 1.1 chris #define BT_BOOT_VERSION_OLD 0 64 1.1 chris #define BT_BOOT_VERSION_NEW 1 65 1.1 chris 66 1.1 chris /* End of cyclone_boot.h */ 67