Check-in [b14aea8e31]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:changed typecasts in acpi_utils.hpp to c++style casts
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b14aea8e31c5fd600d3d9b4d60a1bdf7aa09efb1
User & Date: maxi 2018-11-11 20:31:06
Context
2018-11-12
12:56
Changed more C-Style Casts check-in: 5f36b15924 user: maxi tags: trunk
2018-11-11
20:31
changed typecasts in acpi_utils.hpp to c++style casts check-in: b14aea8e31 user: maxi tags: trunk
12:03
Removed unnessecary files from standard library extension check-in: 115fecab42 user: maxi tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to include/acpi/acpi_utils.hpp.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    for (int i = 0; i < sizeof(T); ++i, ++bptr)
        check += *bptr;
    return check == 0;
}

inline bool check_for_correct_rsdp(sign_8_type *ptr)
{
    struct SDT::RSDP *rsdp_ptr = (SDT::RSDP *)ptr;
    constexpr char *sig = "RSD PTR ";

    if (memcmp(ptr, sig, 8) == 0)
        if (correct_table_checksum(rsdp_ptr))
            return true;
    return false;
}
................................................................................
inline bool is_rsdp_v2(char revision)
{
    return revision != 0;
}

inline SDT::RSDP *find_lower_rsdp()
{
    ksdk::buffer<sign_8_type> search_buf{(sign_8_type *)0x000E0000,
                                         (sign_8_type *)0x00100000};
    for (auto it = search_buf.begin(); it != search_buf.end(); ++it)
        if (check_for_correct_rsdp(&*it))
            return (SDT::RSDP *)&*it;
}

inline SDT::RSDP *find_upper_rsdp()
{
    ksdk::buffer<sign_8_type> ebda_search_buf{(sign_8_type *)((short *)0x40E), (sign_8_type *)(((short *)0x40E) + 1025)};

    for (auto it = ebda_search_buf.begin(); it != ebda_search_buf.end(); ++it)
        if (check_for_correct_rsdp(&*it))
            return (SDT::RSDP *)&*it;
}

inline SDT::RSDP *find_rsdp()
{
    SDT::RSDP *ptr1 = find_lower_rsdp();
    if (ptr1 != nullptr)
        return ptr1;






|







 







|
|


|




|



|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    for (int i = 0; i < sizeof(T); ++i, ++bptr)
        check += *bptr;
    return check == 0;
}

inline bool check_for_correct_rsdp(sign_8_type *ptr)
{
    struct SDT::RSDP *rsdp_ptr = reinterpret_cast<SDT::RSDP*> (ptr);
    constexpr char *sig = "RSD PTR ";

    if (memcmp(ptr, sig, 8) == 0)
        if (correct_table_checksum(rsdp_ptr))
            return true;
    return false;
}
................................................................................
inline bool is_rsdp_v2(char revision)
{
    return revision != 0;
}

inline SDT::RSDP *find_lower_rsdp()
{
    ksdk::buffer<sign_8_type> search_buf{reinterpret_cast<sign_8_type *>(0x000E0000),
                                         reinterpret_cast<sign_8_type *>(0x00100000)};
    for (auto it = search_buf.begin(); it != search_buf.end(); ++it)
        if (check_for_correct_rsdp(&*it))
            return reinterpret_cast<SDT::RSDP *>(&*it);
}

inline SDT::RSDP *find_upper_rsdp()
{
    ksdk::buffer<sign_8_type> ebda_search_buf{reinterpret_cast<sign_8_type *>(0x40E), reinterpret_cast<sign_8_type *>(0x40E + 1025)};

    for (auto it = ebda_search_buf.begin(); it != ebda_search_buf.end(); ++it)
        if (check_for_correct_rsdp(&*it))
            return reinterpret_cast<SDT::RSDP *>(&*it);
}

inline SDT::RSDP *find_rsdp()
{
    SDT::RSDP *ptr1 = find_lower_rsdp();
    if (ptr1 != nullptr)
        return ptr1;