[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR

From: Damien Zammit
Subject: Re: [PATCH gnumach] smp: Remove hardcoded AP_BOOT_ADDR
Date: Tue, 30 Jan 2024 01:55:32 +0000

Hi Samuel,

On 1/29/24 9:20 PM, Samuel Thibault wrote:
> Damien Zammit, le lun. 29 janv. 2024 10:07:30 +0000, a ecrit:
>> -    ljmp    $BOOT_CS, $M(0f)
>> +    xorl    %eax, %eax
>> +    mov     %cs, %ax
>> +    shll    $4, %eax
>> +    addl    $M(0f), %eax
>> +    movl    %eax, M(ljmp_offset32)
> This won't work with pipelined processors, which assume a complete
> separation between code and data, and will thus have already loaded
> the jmp instruction before your modify it.
> Rather either perform the relocation from the C code, or use a variable,
> which you can refer from the ljmp instruction.

I was unable to make the ljmpl instruction assemble with a memory location
as the second argument.

I don't know what to do, other than I could use a simple jmp instruction
to clear the instruction cache before doing the ljmpl?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]