blob: 0abeae5050bc8a58f2f7eff41544b01ba5dce6f7 [file] [log] [blame]
Rudolf Marek293b5f52009-02-01 18:35:15 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2009 Rudolf Marek <>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License v2 as published by
8 * the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19#ifndef LIBACPI_H
20#define LIBACPI_H
21#include <assert.h>
22#include <stdlib.h>
23#include <stdint.h>
25void acpigen_patch_len(int len);
26void acpigen_set_current(char *curr);
27char *acpigen_get_current(void);
28int acpigen_write_package(int nr_el);
29int acpigen_write_byte(unsigned int data);
30int acpigen_emit_byte(unsigned char data);
31int acpigen_emit_stream(char *data, int size);
32int acpigen_write_dword(unsigned int data);
Carl-Daniel Hailfingerd58671c2009-02-17 21:38:51 +000033int acpigen_write_qword(uint64_t data);
Rudolf Marek293b5f52009-02-01 18:35:15 +000034int acpigen_write_name(char *name);
35int acpigen_write_name_dword(char *name, uint32_t val);
Carl-Daniel Hailfingerd58671c2009-02-17 21:38:51 +000036int acpigen_write_name_qword(char *name, uint64_t val);
Rudolf Marek293b5f52009-02-01 18:35:15 +000037int acpigen_write_name_byte(char *name, uint8_t val);
38int acpigen_write_scope(char *name);
Rudolf Marekf997b552009-02-14 15:40:23 +000039int acpigen_write_PPC(u8 nr);
40int acpigen_write_empty_PCT(void);
41int acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat, u32 busmLat,
42 u32 control, u32 status);
Patrick Georgidf444bf2009-04-21 20:34:36 +000043typedef enum { SW_ALL=0xfc, SW_ANY=0xfd, HW_ALL=0xfe } PSD_coord;
44int acpigen_write_PSD_package(u32 domain, u32 numprocs, PSD_coord coordtype);
Rudolf Marekf997b552009-02-14 15:40:23 +000045int acpigen_write_processor(u8 cpuindex, u32 pblock_addr, u8 pblock_len);
Rudolf Marek293b5f52009-02-01 18:35:15 +000046#endif