1/** 2 * \file 3 * \brief CMOS memory interface 4 * 5 */ 6 7/* 8 * Copyright (c) 2007, 2008, 2010, ETH Zurich. 9 * All rights reserved. 10 * 11 * This file is distributed under the terms in the attached LICENSE file. 12 * If you do not find this file, copies can be found by writing to: 13 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. 14 */ 15 16#ifndef CMOS_H_ 17#define CMOS_H_ 18 19#include <stdint.h> 20 21/** 22 * This byte is read upon startup after CPU reset in order to determine if 23 * the reset was used as a way to get out of 80286 protected mode. 24 */ 25#define CMOS_RAM_SHUTDOWN_ADDR 0x0f 26 27/** 28 * Shutdown with FAR JMP (immediate jmp to address at 0:[0467H]) 29 * \sa CMOS_RAM_BIOS_WARM_START_INIT_VECTOR 30 **/ 31#define CMOS_RAM_WARM_SHUTDOWN 0x0a 32#define CMOS_RAM_BIOS_WARM_START_INIT_VECTOR 0x467 33 34void cmos_write(int addr, uint8_t b); 35void cmos_write_extended(int addr, uint8_t b); 36uint8_t cmos_read(int addr); 37uint8_t cmos_read_extended(int addr, uint8_t b); 38 39#endif // CMOS_H_ 40