system/boot: Unify spin design, add missing symbols to asm/ld
Change-Id: I1dd98a2243d498ec1c827f7a60385237d12a0d39 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2283 Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
fa60e7a684
commit
48064fbc41
@ -123,13 +123,6 @@ arch_cpu_memory_write_barrier(void)
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
arch_spin(bigtime_t microseconds)
|
||||
{
|
||||
panic("No timing support in bootloader yet!");
|
||||
}
|
||||
|
||||
|
||||
extern "C" status_t
|
||||
boot_arch_cpu_init(void)
|
||||
{
|
||||
@ -144,3 +137,21 @@ boot_arch_cpu_init(void)
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
extern "C" bigtime_t
|
||||
system_time()
|
||||
{
|
||||
#warning Implement system_time in ARM bootloader!
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
spin(bigtime_t microseconds)
|
||||
{
|
||||
#warning Implment spin in ARM bootloader!
|
||||
//bigtime_t time = system_time();
|
||||
//while ((system_time() - time) < microseconds)
|
||||
// asm volatile ("nop;");
|
||||
}
|
||||
|
@ -13,7 +13,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void arch_spin(bigtime_t microseconds);
|
||||
extern void arch_cpu_memory_read_barrier(void);
|
||||
extern void arch_cpu_memory_write_barrier(void);
|
||||
extern status_t boot_arch_cpu_init(void);
|
||||
|
@ -69,7 +69,7 @@ extra_header_fields:
|
||||
// Everything before the kernel image is considered part of the header
|
||||
.long _start - ImageBase // SizeOfHeaders
|
||||
.long 0 // CheckSum
|
||||
.short EFI_SUBSYSTEM // Subsystem
|
||||
.short 10 // Subsystem (EFI)
|
||||
.short 0 // DllCharacteristics
|
||||
.long 0 // SizeOfStackReserve
|
||||
.long 0 // SizeOfStackCommit
|
||||
@ -122,6 +122,7 @@ section_table:
|
||||
.short 0 // NumberOfLineNumbers (0 for executables)
|
||||
.long 0xe0500020 // Characteristics (section flags)
|
||||
|
||||
.globl _start
|
||||
_start:
|
||||
stmfd sp!, {r0-r2, lr}
|
||||
|
||||
|
@ -67,7 +67,7 @@ extra_header_fields:
|
||||
// Everything before the kernel image is considered part of the header
|
||||
.long _start - ImageBase // SizeOfHeaders
|
||||
.long 0 // CheckSum
|
||||
.short EFI_SUBSYSTEM // Subsystem
|
||||
.short 10 // Subsystem (EFI)
|
||||
.short 0 // DllCharacteristics
|
||||
.quad 0 // SizeOfStackReserve
|
||||
.quad 0 // SizeOfStackCommit
|
||||
@ -110,6 +110,8 @@ section_table:
|
||||
.long 0xc0000040 // Characteristics (section flags)
|
||||
|
||||
.align 12
|
||||
|
||||
.globl _start
|
||||
_start:
|
||||
stp x29, x30, [sp, #-32]!
|
||||
mov x29, sp
|
||||
|
@ -257,7 +257,7 @@ check_cpu_features()
|
||||
|
||||
|
||||
extern "C" void
|
||||
arch_spin(bigtime_t microseconds)
|
||||
spin(bigtime_t microseconds)
|
||||
{
|
||||
for(bigtime_t i=0;i<microseconds;i=i+1)
|
||||
{
|
||||
|
@ -26,17 +26,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" void
|
||||
spin(bigtime_t microseconds)
|
||||
{
|
||||
#warning U-Boot:TODO!!
|
||||
// TODO: use API if available
|
||||
|
||||
// fallback to arch-specific code
|
||||
arch_spin(microseconds);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
cpu_init()
|
||||
{
|
||||
|
@ -13,7 +13,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void arch_spin(bigtime_t microseconds);
|
||||
extern status_t boot_arch_cpu_init(void);
|
||||
extern void cpu_init(void);
|
||||
|
||||
|
@ -55,6 +55,8 @@ SECTIONS
|
||||
. = ALIGN(4096);
|
||||
.dynstr : { *(.dynstr) }
|
||||
. = ALIGN(4096);
|
||||
|
||||
_end = . ;
|
||||
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
/DISCARD/ :
|
||||
{
|
||||
|
@ -61,6 +61,8 @@ SECTIONS
|
||||
. = ALIGN(4096);
|
||||
.dynstr : { *(.dynstr) }
|
||||
. = ALIGN(4096);
|
||||
|
||||
_end = . ;
|
||||
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||
/DISCARD/ : {
|
||||
*(.rel.reloc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user