Hey guys,
Thanks for the tips.
On 20 Jun 2014, at 8:49 am, Andrew Fish <af...@apple.com> wrote:
>
> On Jun 19, 2014, at 2:51 PM, Andrew Fish <af...@apple.com> wrote:
>
>>
>> On Jun 19, 2014, at 2:39 PM, Reza Jelveh <reza.jel...@tuhh.de> wrote:
>>
>>> On 19/06/14 13:59, Andrew Fish wrote:
>>>>
>>>> On Jun 19, 2014, at 11:58 AM, e...@ragequ.it wrote:
>>>>
>>>>> I changed the `retf` to a `ret` to get it to assemble for now.
>>>>>
>>>>
>>>> That looks right. I think it should be ret.
>>> i'm pretty certain this should be lret. Basically either the osx assembler
>>> should support retf(which I have a patch for, but probably won't happen
>>> ever)
>>> or it should use lret, which is exactly the same instruction.
>>>
>>
>> Well the code looked like this? So I assumed they did not mean iret
>> .byte 0x48 # prefix to composite "retq" with next "retf"
>> retf # far return
>> DoIret:
>> iretq
>>
>
> I think the code is trying to generate this.
>
> 48 cb rex.W retf
> It looks like this is used for SMM.
So I ended up just changing the retf to ".byte 0xcb” since that’s what it’s
expected to generate.
>
>
>>
>>
>>>>
>>>>> Issue #2
>>>>>
>>>>> Next issue is with the ACPI tables:
>>>>>
>>>>> Issue #3
>>>> Try changing your *_*_*_ASLDLINK_FLAGS in Conf/tools_def.txt to look like:
>>>> -e _ReferenceAcpiTable -preload -segalign 0x20 -pie -seg1addr 0x240
>>>> -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
>>> the link_flags look fine, but it's like that you have a newer iasl therefore
>>> the cc and pp flags might need adjustment as well.
>>>
>>> *_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar
>>> -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h
>>> *_ASLPP_FLAGS = -x c -E -P
Andrew suggested to add a new XCODE target, I’m actually using XCLANG but I
tried the same thing - no dice.
Once I’d added all these flags suggested, I was able to compile the final
intermediate file manually like this:
$ iasl
/Users/x/code/ext/edk2/Build/OvmfX64/DEBUG_XCLANG/X64/OvmfPkg/AcpiTables/AcpiTables/OUTPUT/./Ssdt.iiii
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20130823-64 [Jun 20 2014]
Copyright (c) 2000 - 2013 Intel Corporation
ASL Input:
/Users/x/code/ext/edk2/Build/OvmfX64/DEBUG_XCLANG/X64/OvmfPkg/AcpiTables/AcpiTables/OUTPUT/./Ssdt.iiii
- 4 lines, 69 bytes, 0 keywords
AML Output:
/Users/x/code/ext/edk2/Build/OvmfX64/DEBUG_XCLANG/X64/OvmfPkg/AcpiTables/AcpiTables/OUTPUT/./Ssdt.aml
- 36 bytes, 0 named objects, 0 executable opcodes
Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations
Where previously this had errored out (so I thought I was Doing It Wrong), so
for future reference it seems that the solution is to remove the output file
from the `iasl` invocation. This:
"$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst}
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
Changes to this:
"$(ASL)" $(ASL_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii
> Try changing your *_*_*_ASLDLINK_FLAGS in Conf/tools_def.txt to look like:
> -e _ReferenceAcpiTable -preload -segalign 0x20 -pie -seg1addr 0x240
> -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
>
> So no -e _main
Yep, fixed.
Cheers,
Egon
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel