Jump to content
30960 posts in this topic

Recommended Posts

8 hours ago, Slice said:

Can you show asm codes for both cases? Where is the difference?

Historically only i++ and --i had a sense because they came from PDP11 assembler where there are instruction like

MOV (R1)+,R2

MOV R3, -(SP)

So C languages is very close to those machine codes.

Intel codes are different.

 

It is inherent in the behavior of the operator. Those CPUs have a special instruction specifically to do that, it is not very common because it is super expensive. No modern CPU has any instruction like this. The most optimized code for an increment would look like these, prefix:

mov rax, [address_of_variable_to_increment]
inc rax
mov [address_of_variable_to_increment], rax

postfix:

mov rax, [address_of_variable_to_increment]
mov rbx, rax
inc rbx
mov [address_of_variable_to_increment], rbx

This is the MOST optimized that either of these operators could be, most likely there is other stuff in registers though so you need to use graph coloring algorithm to determine how to use the registers most efficiently. I've only ever seen the prefix operator come out this optimized.

 

EDIT: I forgot you could do direct memory access, although I doubt the compiler is using these but this will actually make the postfix operator perform even worse compared to the prefix,

prefix:

inc [address_of_variable_to_increment]

postfix still has to operate some way like above.

 

EDIT2: Forgot, that those operators were created in B for convenience not C (C followed B's development at Bell Labs), the PDP-11 just easily supported these because of it's crazy complicated access modes, it didn't even exist yet when those operators were created. Dennis Ritchie even says so:

Quote

People often guess that they were created to use the auto-increment and auto-decrement address modes provided by the DEC PDP-11 on which C and Unix first became popular. This is historically impossible, since there was no PDP-11 when B was developed. 

 

Edited by apianti
  • Like 1

@fabiosun As I have explained various times, the cause for memory allocation errors is well known and fixed (DevirtualiseMmio) - this has nothing to do with any data sheets. Why booting fails can only be debugged with serial or by trying whitelisting all devirtualised regions one-by-one, in pairs, and so on. Taking 5 steps back towards devs who also don't have the hardware will not solve your issue.

23 minutes ago, Download-Fritz said:

@fabiosun ……... by trying whitelisting all devirtualised regions one-by-one, in pairs, and so on. …….

Thank for your answer also in this thread

 

If you have some time to dedicate to explain "how to" apply your usefull advice in quoted part i will like to try to help people who have the right skills to understand.

 

By the way..it is no a problem of mine (my main interest is in Windows OS)..as it wasn't problem of mine when a pretty similar (initial problem) x99 Platform had with some highend xeon CPU and some people of acidanthera's staff were interested of doing betatesting to some people have v3 or v4 Xeon.

I know AMD it is not a main (or secondary) task for your team so i would like to understand if it the same for clover team 

 

Edited by Guest
1 hour ago, Jief_Machak said:

I've already fixed that.

I've just recompiled from scratch and it works. Are you up to date ?

Yes I am up to date its look like the same error 

Dont know why

  • Like 1
1 hour ago, chris1111 said:

Compillation is good but only error when create the Package

 

Thanks

 

1592501944_Capturedcranle2020-02-2105_00_51.png.a533b8740efbbc6c76976780ccd12a5e.png

 

 

Same issue here. :wacko:

 

Lastest commit without error, and create package: r5104 200237d492.

  • Like 1
1 hour ago, Download-Fritz said:

@fabiosun dump thr log and add the logged addresses to the whitelist array

if you mean a log via serial output , in my tries it was not possible also with pciexpress serial card, previously i have also tested an USB to serial adapter without success (i need a driver for it you or vit9696  suggested in the past)

Normal debug output of OC (or clover) seems to have no significative data on it

 

thank you again for your time

8 hours ago, Slice said:

Windows compilation by VS2017 is working

 

I don't know but your latest commit fix the issue 

thanks

Edited by chris1111
  • Like 1


 --------------------------
 Building process complete!
 --------------------------

 Build info.
 ===========
  Package name: Clover_v2.5k_r5104.pkg
  MD5:          9a9263b5e8340380bbf64a62b83d9996
  Version:      v2.5k
  Stage:        v2.5k
  Date/Time:    2020-02-21 17:11:57
  Built by:     pico
  Copyright     2012-2020

report warning message when build

Spoiler

Active Platform          = /Users/sherlocks/src/CloverBootloader/Clover.dsc

........build: : warning: Module MetaFile [Sources] is missing local header!

    Local Header: /users/sherlocks/src/cloverbootloader/refit_uefi/version.h not found in /Users/sherlocks/src/CloverBootloader/rEFIt_UEFI/refit.inf

build: : warning: Module MetaFile [Sources] is missing local header!

    Local Header: /users/sherlocks/src/cloverbootloader/refit_uefi/version.h not found in /Users/sherlocks/src/CloverBootloader/rEFIt_UEFI/refit.inf

. done!

 

  • Like 1
1 hour ago, Alpha22 said:

hi, how can i run Building Clover install package

thank you

 

If I remember well:

 

Go to Clover GitHub repo, download source

Launch buildme script in cloverbootloader folder

the "built"-script currently runs into an error:

 

Spoiler

[CPP] Events
[CPP] FixBiosDsdt
[CPP] HdaCodecDump
[CPP] Hibernate
[CPP] Injectors
[CPP] LegacyBiosThunk
[CPP] LegacyBoot
[CPP] Net
[CPP] Nvram
[CPP] PlatformDriverOverride
[CPP] Pointer
[CPP] Settings
[CPP] StartupSound
[CPP] StateGenerator
[CPP] ati
[CPP] b64cdecode
[CPP] card_vlist
[CPP] cpu
[CPP] device_inject
[CPP] gma
[CPP] guid
[CPP] hda
[CPP] kernel_patcher
[CPP] kext_inject
[CPP] kext_patcher
[CPP] nvidia
[CPP] platformdata
[CPP] plist
[CPP] smbios
[CPP] sound
[CPP] spd
[CPP] string
[CPP] usbfix
[CPP] XStringW
[CPP] global1
[CPP] global2
[CPP] globals_ctor
[CPP] globals_dtor
[CPP] memory
[CPP] operatorNewDelete
[CPP] bootscreen
[CPP] common
[CPP] legacy
[CPP] loader
[CPP] lockedgraphics
[CPP] secureboot
[CPP] securehash
[CPP] securemenu
[CPP] securevars
[CPP] tool
[CPP] BmLib
[CPP] FloatLib
[CPP] VectorGraphics
[CPP] egemb_font
[CPP] egemb_icons
[CPP] egemb_icons_dark
[CPP] image
[CPP] libscreen
[CPP] load_icns
[CPP] lodepng
[CPP] nanosvg
[CPP] nanosvgrast
[CPP] scroll_images
[CPP] text
[CPP] IO
[CPP] icns
[CPP] lib
[CPP] main
[CPP] menu
[CPP] screen
[SLINK] CLOVER
/Users/md/Documents/GitHub/CloverBootloader/toolchain/cross/lib/gcc/x86_64-clover-linux-gnu/9.2.0/../../../../x86_64-clover-linux-gnu/bin/ld: /var/folders/xx/pnhrh8mj3d33s9s8mmtxksy80000gn/T//CLOVER.dll.712WqB.ltrans13.ltrans.o: in function `RefitMain':
/Users/md/Documents/GitHub/CloverBootloader/rEFIt_UEFI/refit/main.cpp:2076: undefined reference to `all_tests()'
/Users/md/Documents/GitHub/CloverBootloader/toolchain/cross/lib/gcc/x86_64-clover-linux-gnu/9.2.0/../../../../x86_64-clover-linux-gnu/bin/ld: /Users/md/Documents/GitHub/CloverBootloader/Build/Clover/RELEASE_GCC53/X64/rEFIt_UEFI/refit/DEBUG/CLOVER.dll: hidden symbol `_Z9all_testsv' isn't defined
/Users/md/Documents/GitHub/CloverBootloader/toolchain/cross/lib/gcc/x86_64-clover-linux-gnu/9.2.0/../../../../x86_64-clover-linux-gnu/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [/Users/md/Documents/GitHub/CloverBootloader/Build/Clover/RELEASE_GCC53/X64/rEFIt_UEFI/refit/DEBUG/CLOVER.dll] Error 1


build.py...
 : error 7000: Failed to execute command
    make tbuild [/Users/md/Documents/GitHub/CloverBootloader/Build/Clover/RELEASE_GCC53/X64/rEFIt_UEFI/refit]


build.py...
 : error F002: Failed to build module
    /Users/md/Documents/GitHub/CloverBootloader/rEFIt_UEFI/refit.inf [X64, GCC53, RELEASE]

- Failed -
Build end time: 17:46:20, Feb.24 2020
Build total time: 00:00:37

 

 

  • Sad 1
×
×
  • Create New...