Various PowerPC fixes
* Removed atomic operations placeholders for modern ones * Fix chrpscript & hfsmaps location for CDBootImage (haiku-boot-cd target) * add of_blocks & of_blocksize openfirmware call Change-Id: Iaaddc2c566d108976ac5e5e08caea1fc59523e06 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6987 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -43,68 +43,4 @@ memory_full_barrier_inline(void)
|
||||
#define memory_full_barrier memory_full_barrier_inline
|
||||
|
||||
|
||||
static inline void
|
||||
atomic_set_inline(int32* value, int32 newValue)
|
||||
{
|
||||
memory_write_barrier();
|
||||
*(volatile int32*)value = newValue;
|
||||
}
|
||||
|
||||
|
||||
static inline int32
|
||||
atomic_get_and_set_inline(int32* value, int32 newValue)
|
||||
{
|
||||
// BIG TODO: PowerPC Atomic get and set
|
||||
// asm volatile("xchgl %0, (%1)"
|
||||
// : "+r" (newValue)
|
||||
// : "r" (value)
|
||||
// : "memory");
|
||||
return newValue;
|
||||
}
|
||||
|
||||
|
||||
static inline int32
|
||||
atomic_test_and_set_inline(int32* value, int32 newValue, int32 testAgainst)
|
||||
{
|
||||
// BIG TODO: PowerPC Atomic test and set inline
|
||||
// asm volatile("lock; cmpxchgl %2, (%3)"
|
||||
// : "=a" (newValue)
|
||||
// : "0" (testAgainst), "r" (newValue), "r" (value)
|
||||
// : "memory");
|
||||
return newValue;
|
||||
}
|
||||
|
||||
|
||||
static inline int32
|
||||
atomic_add_inline(int32* value, int32 newValue)
|
||||
{
|
||||
// BIG TODO: PowerPC Atomic add inline
|
||||
// asm volatile("lock; xaddl %0, (%1)"
|
||||
// : "+r" (newValue)
|
||||
// : "r" (value)
|
||||
// : "memory");
|
||||
return newValue;
|
||||
}
|
||||
|
||||
|
||||
static inline int32
|
||||
atomic_get_inline(int32* value)
|
||||
{
|
||||
int32 newValue = *(volatile int32*)value;
|
||||
memory_read_barrier();
|
||||
return newValue;
|
||||
}
|
||||
|
||||
|
||||
#define atomic_set atomic_set_inline
|
||||
#define atomic_get_and_set atomic_get_and_set_inline
|
||||
#ifndef atomic_test_and_set
|
||||
# define atomic_test_and_set atomic_test_and_set_inline
|
||||
#endif
|
||||
#ifndef atomic_add
|
||||
# define atomic_add atomic_add_inline
|
||||
#endif
|
||||
#define atomic_get atomic_get_inline
|
||||
|
||||
|
||||
#endif // _KERNEL_ARCH_PPC_ATOMIC_H
|
||||
|
||||
@@ -66,6 +66,8 @@ extern void of_close(intptr_t handle);
|
||||
extern intptr_t of_read(intptr_t handle, void *buffer, intptr_t bufferSize);
|
||||
extern intptr_t of_write(intptr_t handle, const void *buffer, intptr_t bufferSize);
|
||||
extern intptr_t of_seek(intptr_t handle, off_t pos);
|
||||
extern intptr_t of_blocks(intptr_t handle);
|
||||
extern intptr_t of_block_size(intptr_t handle);
|
||||
|
||||
/* memory functions */
|
||||
extern intptr_t of_release(void *virtualAddress, intptr_t size);
|
||||
|
||||
Reference in New Issue
Block a user