Deleted Added
sdiff udiff text old ( 119880 ) new ( 146011 )
full compact
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/boot/pc98/libpc98/biosmem.c 146011 2005-05-08 14:17:28Z nyan $");
29
30/*
31 * Obtain memory configuration information from the BIOS
32 */
33#include <stand.h>
34#include "libi386.h"
35#include "btxv86.h"
36
37vm_offset_t memtop;
38u_int32_t bios_basemem, bios_extmem;
39
40void
41bios_getmem(void)
42{
43
44 bios_basemem = ((*(u_char *)PTOV(0xA1501) & 0x07) + 1) * 128 * 1024;
45 bios_extmem = *(u_char *)PTOV(0xA1401) * 128 * 1024 +
46 *(u_int16_t *)PTOV(0xA1594) * 1024 * 1024;
47
48 /* Set memtop to actual top of memory */
49 memtop = 0x100000 + bios_extmem;
50
51}
52