blob: 6416c118f0e41437c02750c3c76e2106029be396 [file] [log] [blame]
Stefan Reinauer38cd29e2009-08-11 21:28:25 +00001/****************************************************************************
2 * YABEL BIOS Emulator
3 *
4 * This program and the accompanying materials
5 * are made available under the terms of the BSD License
6 * which accompanies this distribution, and is available at
7 * http://www.opensource.org/licenses/bsd-license.php
8 *
9 * Copyright (c) 2008 Pattrick Hueper <phueper@hueper.net>
10 ****************************************************************************/
11
12#ifndef _YABEL_PMM_H_
13#define _YABEL_PMM_H_
14
15#include <types.h>
16
17/* PMM Structure see PMM Spec Version 1.01 Chapter 3.1.1
18 * (search web for specspmm101.pdf)
19 */
20typedef struct {
21 u8 signature[4];
22 u8 struct_rev;
23 u8 length;
24 u8 checksum;
25 u32 entry_point_offset;
26 u8 reserved[5];
Martin Roth63373ed2013-07-08 16:24:19 -060027 /* Code is not part of the specced PMM struct, however, since I cannot
28 * put the handling of PMM in the virtual memory (I don't want to hack
29 * it together in x86 assembly ;-)) this code array is pointed to by
Stefan Reinauer38cd29e2009-08-11 21:28:25 +000030 * entry_point_offset, in code there is only a INT call and a RETF,
31 * thus every PMM call will issue a PMM INT (only defined in YABEL,
32 * see interrupt.c) and the INT Handler will do the actual PMM work.
33 */
34 u8 code[3];
35} __attribute__ ((__packed__)) pmm_information_t;
36
Stefan Reinauer14e22772010-04-27 06:56:47 +000037/* This function is used to setup the PMM struct in virtual memory
Stefan Reinauer38cd29e2009-08-11 21:28:25 +000038 * at a certain offset */
39u8 pmm_setup(u16 segment, u16 offset);
40
41/* This is the INT Handler mentioned above, called by my special PMM INT. */
42void pmm_handleInt(void);
43
44void pmm_test(void);
45
46#endif // _YABEL_PMM_H