d5cd4a9d51
Sparcv9 runs Openboot in 64 bit mode, which means the cell size is 64bit. Use intptr_t where appropriate to make the open firmware calls work. Beware, some values are still 32bit, this matters for example for of_getprop, if you get 32bits into a 64bit variables it will be in the MSB of it (big endian only weakness...) and confuse things. See for example in console.cpp, where the input and output handles are retrieved as 32bit values. It seems wise to check the expected size when using of_getprop in these cases, instead of just checking for errors. Change-Id: Ie72ebc4afe7c6d7602a47478f0bfb6b8247004b8 Reviewed-on: https://review.haiku-os.org/c/1369 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
23 lines
495 B
C
23 lines
495 B
C
/*
|
|
* Copyright 2005-2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
|
|
* All rights reserved. Distributed under the terms of the MIT License.
|
|
*/
|
|
|
|
#ifndef _KERNEL_OPEN_FIRMWARE_DEVICES_H
|
|
#define _KERNEL_OPEN_FIRMWARE_DEVICES_H
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
status_t of_get_next_device(intptr_t *_cookie, intptr_t root, const char *type,
|
|
char *path, size_t pathSize);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif /* _KERNEL_OPEN_FIRMWARE_DEVICES_H */
|