2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 1995 Bruce D. Evans.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the author nor the names of contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * from: FreeBSD: src/sys/i386/include/md_var.h,v 1.40 2001/07/12
35 #ifndef _MACHINE_MD_VAR_H_
36 #define _MACHINE_MD_VAR_H_
38 typedef void cpu_block_copy_t(const void *src, void *dst, size_t len);
39 typedef void cpu_block_zero_t(void *dst, size_t len);
41 extern char tl0_base[];
46 extern vm_offset_t kstack0;
47 extern vm_paddr_t kstack0_phys;
52 uint32_t cpu_get_mid(u_int cpu_impl);
53 void cpu_identify(u_long vers, u_int clock, u_int id);
54 const char *cpu_portid_prop(u_int cpu_impl);
55 void cpu_setregs(struct pcpu *pc);
56 int is_physical_memory(vm_paddr_t addr);
57 struct md_utrap *utrap_alloc(void);
58 void utrap_free(struct md_utrap *ut);
59 struct md_utrap *utrap_hold(struct md_utrap *ut);
61 cpu_block_copy_t spitfire_block_copy;
62 cpu_block_zero_t spitfire_block_zero;
63 cpu_block_copy_t zeus_block_copy;
64 cpu_block_zero_t zeus_block_zero;
66 extern cpu_block_copy_t *cpu_block_copy;
67 extern cpu_block_zero_t *cpu_block_zero;
70 * Given that the VTOC8 disk label only uses 16-bit fields for cylinders,
71 * heads and sectors we might need to adjust the geometry of large disks.
73 struct ccb_calc_geometry;
74 int scsi_da_bios_params(struct ccb_calc_geometry *ccg);
76 void sparc64_ata_disk_firmware_geom_adjust(struct disk *disk);
77 #define ata_disk_firmware_geom_adjust(disk) \
78 sparc64_ata_disk_firmware_geom_adjust(disk)
80 #endif /* !_MACHINE_MD_VAR_H_ */