opal.h (8d724823220862ce289be3b50119235e03537597) opal.h (4029cd66545f0a45258eda5313b7559bfeaaaae4)
1/*
2 * PowerNV OPAL definitions.
3 *
4 * Copyright 2011 IBM Corp.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

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

162#define OPAL_FLASH_MANAGE 77
163#define OPAL_FLASH_UPDATE 78
164#define OPAL_DUMP_INIT 81
165#define OPAL_DUMP_INFO 82
166#define OPAL_DUMP_READ 83
167#define OPAL_DUMP_ACK 84
168#define OPAL_GET_MSG 85
169#define OPAL_CHECK_ASYNC_COMPLETION 86
1/*
2 * PowerNV OPAL definitions.
3 *
4 * Copyright 2011 IBM Corp.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

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

162#define OPAL_FLASH_MANAGE 77
163#define OPAL_FLASH_UPDATE 78
164#define OPAL_DUMP_INIT 81
165#define OPAL_DUMP_INFO 82
166#define OPAL_DUMP_READ 83
167#define OPAL_DUMP_ACK 84
168#define OPAL_GET_MSG 85
169#define OPAL_CHECK_ASYNC_COMPLETION 86
170#define OPAL_DUMP_RESEND 91
171#define OPAL_SYNC_HOST_REBOOT 87
170#define OPAL_SYNC_HOST_REBOOT 87
171#define OPAL_GET_PARAM 89
172#define OPAL_SET_PARAM 90
173#define OPAL_DUMP_RESEND 91
172#define OPAL_DUMP_INFO2 94
173
174#ifndef __ASSEMBLY__
175
176/* Other enums */
177enum OpalVendorApiTokens {
178 OPAL_START_VENDOR_API_RANGE = 1000, OPAL_END_VENDOR_API_RANGE = 1999
179};

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

405 * device nodes on the LPC bus
406 */
407enum OpalLPCAddressType {
408 OPAL_LPC_MEM = 0,
409 OPAL_LPC_IO = 1,
410 OPAL_LPC_FW = 2,
411};
412
174#define OPAL_DUMP_INFO2 94
175
176#ifndef __ASSEMBLY__
177
178/* Other enums */
179enum OpalVendorApiTokens {
180 OPAL_START_VENDOR_API_RANGE = 1000, OPAL_END_VENDOR_API_RANGE = 1999
181};

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

407 * device nodes on the LPC bus
408 */
409enum OpalLPCAddressType {
410 OPAL_LPC_MEM = 0,
411 OPAL_LPC_IO = 1,
412 OPAL_LPC_FW = 2,
413};
414
415/* System parameter permission */
416enum OpalSysparamPerm {
417 OPAL_SYSPARAM_READ = 0x1,
418 OPAL_SYSPARAM_WRITE = 0x2,
419 OPAL_SYSPARAM_RW = (OPAL_SYSPARAM_READ | OPAL_SYSPARAM_WRITE),
420};
421
413struct opal_msg {
414 uint32_t msg_type;
415 uint32_t reserved;
416 uint64_t params[8];
417};
418
419struct opal_machine_check_event {
420 enum OpalMCE_Version version:8; /* 0x00 */

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

854int64_t opal_dump_info2(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type);
855int64_t opal_dump_read(uint32_t dump_id, uint64_t buffer);
856int64_t opal_dump_ack(uint32_t dump_id);
857int64_t opal_dump_resend_notification(void);
858
859int64_t opal_get_msg(uint64_t buffer, size_t size);
860int64_t opal_check_completion(uint64_t buffer, size_t size, uint64_t token);
861int64_t opal_sync_host_reboot(void);
422struct opal_msg {
423 uint32_t msg_type;
424 uint32_t reserved;
425 uint64_t params[8];
426};
427
428struct opal_machine_check_event {
429 enum OpalMCE_Version version:8; /* 0x00 */

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

863int64_t opal_dump_info2(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type);
864int64_t opal_dump_read(uint32_t dump_id, uint64_t buffer);
865int64_t opal_dump_ack(uint32_t dump_id);
866int64_t opal_dump_resend_notification(void);
867
868int64_t opal_get_msg(uint64_t buffer, size_t size);
869int64_t opal_check_completion(uint64_t buffer, size_t size, uint64_t token);
870int64_t opal_sync_host_reboot(void);
871int64_t opal_get_param(uint64_t token, uint32_t param_id, uint64_t buffer,
872 size_t length);
873int64_t opal_set_param(uint64_t token, uint32_t param_id, uint64_t buffer,
874 size_t length);
862
863/* Internal functions */
864extern int early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data);
865extern int early_init_dt_scan_recoverable_ranges(unsigned long node,
866 const char *uname, int depth, void *data);
867
868extern int opal_get_chars(uint32_t vtermno, char *buf, int count);
869extern int opal_put_chars(uint32_t vtermno, const char *buf, int total_len);

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

895struct rtc_time;
896extern int opal_set_rtc_time(struct rtc_time *tm);
897extern void opal_get_rtc_time(struct rtc_time *tm);
898extern unsigned long opal_get_boot_time(void);
899extern void opal_nvram_init(void);
900extern void opal_flash_init(void);
901extern int opal_elog_init(void);
902extern void opal_platform_dump_init(void);
875
876/* Internal functions */
877extern int early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data);
878extern int early_init_dt_scan_recoverable_ranges(unsigned long node,
879 const char *uname, int depth, void *data);
880
881extern int opal_get_chars(uint32_t vtermno, char *buf, int count);
882extern int opal_put_chars(uint32_t vtermno, const char *buf, int total_len);

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

908struct rtc_time;
909extern int opal_set_rtc_time(struct rtc_time *tm);
910extern void opal_get_rtc_time(struct rtc_time *tm);
911extern unsigned long opal_get_boot_time(void);
912extern void opal_nvram_init(void);
913extern void opal_flash_init(void);
914extern int opal_elog_init(void);
915extern void opal_platform_dump_init(void);
916extern void opal_sys_param_init(void);
903
904extern int opal_machine_check(struct pt_regs *regs);
905extern bool opal_mce_check_early_recovery(struct pt_regs *regs);
906
907extern void opal_shutdown(void);
908
909extern void opal_lpc_init(void);
910
911#endif /* __ASSEMBLY__ */
912
913#endif /* __OPAL_H */
917
918extern int opal_machine_check(struct pt_regs *regs);
919extern bool opal_mce_check_early_recovery(struct pt_regs *regs);
920
921extern void opal_shutdown(void);
922
923extern void opal_lpc_init(void);
924
925#endif /* __ASSEMBLY__ */
926
927#endif /* __OPAL_H */